[Commits] c688086: Re-commit in git: fake support for UNIQUE indexes. They can be created for RocksDB but won't be enforced.

Sergei Petrunia psergey at askmonty.org
Fri Jul 11 22:01:40 EEST 2014


revision-id: c68808616e12d55fc4b9dfb6b34c53e15ff42818
parent(s): 9edd9d9f711b299646f81d1bece8efe349d98bef
committer: Sergei Petrunia
branch nick: webscalesql-5.6
timestamp: 2014-07-11 23:01:40 +0400
message:

Re-commit in git: fake support for UNIQUE indexes. They can be created for RocksDB but won't be enforced.

-----------------------

 storage/rocksdb/ha_rocksdb.cc |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc
index 5c39fe1..66b7276 100644
--- a/storage/rocksdb/ha_rocksdb.cc
+++ b/storage/rocksdb/ha_rocksdb.cc
@@ -925,6 +925,7 @@ int ha_rocksdb::create_key_defs(TABLE *table_arg, const char *db_table, uint len
   uint n_keys= table_arg->s->keys;
    
   /* Don't allow to create unique indexes */
+/* TODO mdcallag: disable this for now to pretend to support UNIQUE indexes
   for (i= 0; i < table_arg->s->keys; i++)
   {
     if (table_arg->key_info[i].flags & HA_NOSAME && 
@@ -933,6 +934,7 @@ int ha_rocksdb::create_key_defs(TABLE *table_arg, const char *db_table, uint len
       DBUG_RETURN(HA_ERR_ROCKSDB_UNIQUE_NOT_SUPPORTED); 
     }
   }
+*/
 
   /* Create table/key descriptions and put them into the data dictionary */
   if (!(key_descr= (RDBSE_KEYDEF**)my_malloc(sizeof(RDBSE_KEYDEF*) * n_keys,
@@ -1051,6 +1053,7 @@ int ha_rocksdb::create(const char *name, TABLE *table_arg,
   */ 
   Field *field;
   //if ((field= table_arg->next_number_field))
+  /* TODO mdcallag: disable this for now to let UNIQUE indexes kind of work
   if ((field= table_arg->found_next_number_field))
   {
     int pk= table_arg->s->primary_key;
@@ -1058,6 +1061,7 @@ int ha_rocksdb::create(const char *name, TABLE *table_arg,
     if (field->field_index !=  pk_field->field_index)
       DBUG_RETURN(HA_ERR_INTERNAL_ERROR);
   }
+  */
   DBUG_RETURN(0);
 }
 


More information about the commits mailing list