[Groonga-mysql-commit] mroonga/mroonga [fix-for-visual-studio] Define a meaningful variable

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Thu Oct 4 10:43:34 JST 2012


Kouhei Sutou	2012-05-28 23:43:39 +0900 (Mon, 28 May 2012)

  New Revision: 9817d84cb40f765b07b7f3b406567fe390260933
  https://github.com/mroonga/mroonga/commit/9817d84cb40f765b07b7f3b406567fe390260933

  Log:
    Define a meaningful variable

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+3 -3)
===================================================================
--- ha_mroonga.cpp    2012-05-28 19:44:28 +0900 (a980f69)
+++ ha_mroonga.cpp    2012-05-28 23:43:39 +0900 (9390323)
@@ -2691,11 +2691,11 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name,
     DBUG_RETURN(error);
 
   mrn::IndexTableName index_table_name(grn_table_name, key_info->name);
-  int key_parts = key_info->key_parts;
+  bool is_multiple_column_index = key_info->key_parts > 1;
   grn_obj_flags index_table_flags = GRN_OBJ_PERSISTENT;
   grn_obj_flags index_column_flags =
     GRN_OBJ_COLUMN_INDEX | GRN_OBJ_WITH_POSITION | GRN_OBJ_PERSISTENT;
-  if (key_parts == 1) {
+  if (!is_multiple_column_index) {
     Field *field = key_info->key_part[0].field;
     const char *column_name = field->field_name;
     int column_name_size = strlen(column_name);
@@ -2773,7 +2773,7 @@ int ha_mroonga::storage_create_index(TABLE *table, const char *grn_table_name,
   }
 
   mrn_change_encoding(ctx, system_charset_info);
-  if (key_parts == 1) {
+  if (!is_multiple_column_index) {
     if (column) {
       grn_obj source_ids;
       grn_id source_id = grn_obj_id(ctx, column);
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-mysql-commit mailing list
アーカイブの一覧に戻る