[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] disable secondary keys.

Back to archive index

Tetsuro IKEDA null+****@clear*****
Thu Oct 4 10:20:50 JST 2012


Tetsuro IKEDA	2010-06-11 16:14:24 +0900 (Fri, 11 Jun 2010)

  New Revision: 91c65f833d6c66ec71675db5247acffd1784d30c
  https://github.com/mroonga/mroonga/commit/91c65f833d6c66ec71675db5247acffd1784d30c

  Log:
    disable secondary keys.

  Modified files:
    ha_mroonga.cc

  Modified: ha_mroonga.cc (+8 -1)
===================================================================
--- ha_mroonga.cc    2010-05-25 19:15:30 +0900 (93a7bab)
+++ ha_mroonga.cc    2010-06-11 16:14:24 +0900 (48a03a7)
@@ -673,6 +673,13 @@ int ha_mroonga::create(const char *name, TABLE *table, HA_CREATE_INFO *info)
       continue; // pkey is already handled
     }
 
+    // disable secondary key
+    if (i != pkeynr) {
+      GRN_LOG(ctx, GRN_LOG_ERROR, "secondary key is not supported (%s)", db_path);
+      grn_obj_remove(ctx, tbl_obj);
+      DBUG_RETURN(-1);
+    }
+
     grn_obj *idx_tbl_obj, *idx_col_obj, *col_obj, *col_type, buf;
     KEY key_info = table->s->key_info[i];
 
@@ -680,7 +687,7 @@ int ha_mroonga::create(const char *name, TABLE *table, HA_CREATE_INFO *info)
     int key_parts = key_info.key_parts;
     if (key_parts != 1) {
       GRN_LOG(ctx, GRN_LOG_ERROR, "complex key is not supported (%s)", db_path);
-      return -1;
+      DBUG_RETURN(-1);
     }
 
     mrn_index_name_gen(tbl_name, i, idx_name);
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-mysql-commit mailing list
Back to archive index