Kouhei Sutou
null+****@clear*****
Mon Mar 16 22:59:29 JST 2015
Kouhei Sutou 2015-03-16 22:59:29 +0900 (Mon, 16 Mar 2015) New Revision: 830ce09c12ea6f5b34869c99db95314f42cd041f https://github.com/mroonga/mroonga/commit/830ce09c12ea6f5b34869c99db95314f42cd041f Message: mysql57: follow data type inf Foreign_key change Modified files: ha_mroonga.cpp ha_mroonga.hpp Modified: ha_mroonga.cpp (+8 -0) =================================================================== --- ha_mroonga.cpp 2015-03-16 22:52:46 +0900 (dbb294d) +++ ha_mroonga.cpp 2015-03-16 22:59:29 +0900 (3b89a98) @@ -3316,7 +3316,11 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, Key_part_spec *key_part_ref_col = key_part_ref_col_iterator++; LEX_STRING ref_field_name = key_part_ref_col->field_name; DBUG_PRINT("info", ("mroonga: ref_field_name=%s", ref_field_name.str)); +#ifdef MRN_FOREIGN_KEY_USE_CONST_STRING + LEX_CSTRING ref_db_name = fk->ref_db; +#else LEX_STRING ref_db_name = fk->ref_db; +#endif DBUG_PRINT("info", ("mroonga: ref_db_name=%s", ref_db_name.str)); if (ref_db_name.str && lower_case_table_names) { strmake(ref_db_buff, ref_db_name.str, sizeof(ref_db_buff) - 1); @@ -3324,7 +3328,11 @@ bool ha_mroonga::storage_create_foreign_key(TABLE *table, ref_db_name.str = ref_db_buff; DBUG_PRINT("info", ("mroonga: casedn ref_db_name=%s", ref_db_name.str)); } +#ifdef MRN_FOREIGN_KEY_USE_CONST_STRING + LEX_CSTRING ref_table_name = fk->ref_table; +#else LEX_STRING ref_table_name = fk->ref_table; +#endif DBUG_PRINT("info", ("mroonga: ref_table_name=%s", ref_table_name.str)); if (ref_table_name.str && lower_case_table_names) { strmake(ref_table_buff, ref_table_name.str, sizeof(ref_table_buff) - 1); Modified: ha_mroonga.hpp (+4 -0) =================================================================== --- ha_mroonga.hpp 2015-03-16 22:52:46 +0900 (11e2d1d) +++ ha_mroonga.hpp 2015-03-16 22:59:29 +0900 (6d15627) @@ -213,6 +213,10 @@ extern "C" { # define MRN_HAVE_HTON_ALTER_TABLE_FLAGS #endif +#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) +# define MRN_FOREIGN_KEY_USE_CONST_STRING +#endif + class ha_mroonga; /* structs */ -------------- next part -------------- HTML����������������������������... 下載