diff options
Diffstat (limited to 'innobase/dict/dict0load.c')
-rw-r--r-- | innobase/dict/dict0load.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/innobase/dict/dict0load.c b/innobase/dict/dict0load.c index e9076db08f3..c6a8ebc4b55 100644 --- a/innobase/dict/dict0load.c +++ b/innobase/dict/dict0load.c @@ -43,7 +43,9 @@ dict_get_first_table_name_in_db( char* table_name; mtr_t mtr; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(1000); @@ -307,7 +309,9 @@ dict_load_columns( ulint i; mtr_t mtr; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); @@ -360,6 +364,15 @@ dict_load_columns( field = rec_get_nth_field(rec, 6, &len); prtype = mach_read_from_4(field); + if (dtype_is_non_binary_string_type(mtype, prtype) + && dtype_get_charset_coll(prtype) == 0) { + /* This is a non-binary string type, and the table + was created with < 4.1.2. Use the default charset. */ + + prtype = dtype_form_prtype(prtype, + data_mysql_default_charset_coll); + } + field = rec_get_nth_field(rec, 7, &len); col_len = mach_read_from_4(field); @@ -405,7 +418,9 @@ dict_load_fields( ulint i; mtr_t mtr; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ UT_NOT_USED(table); @@ -517,7 +532,9 @@ dict_load_indexes( dulint id; mtr_t mtr; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ if ((ut_dulint_get_high(table->id) == 0) && (ut_dulint_get_low(table->id) < DICT_HDR_FIRST_ID)) { @@ -691,7 +708,9 @@ dict_load_table( ulint err; mtr_t mtr; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(1000); @@ -782,7 +801,7 @@ dict_load_table( table->type = mach_read_from_4(field); if (table->type == DICT_TABLE_CLUSTER_MEMBER) { - ut_a(0); + ut_error; field = rec_get_nth_field(rec, 6, &len); table->mix_id = mach_read_from_8(field); @@ -863,7 +882,9 @@ dict_load_table_on_id( char* name; mtr_t mtr; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ /* NOTE that the operation of this function is protected by the dictionary mutex, and therefore no deadlocks can occur @@ -948,7 +969,9 @@ dict_load_sys_table( { mem_heap_t* heap; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(1000); @@ -979,7 +1002,9 @@ dict_load_foreign_cols( ulint i; mtr_t mtr; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ foreign->foreign_col_names = mem_heap_alloc(foreign->heap, foreign->n_fields * sizeof(void*)); @@ -1060,7 +1085,9 @@ dict_load_foreign( ulint err; mtr_t mtr; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ heap2 = mem_heap_create(1000); @@ -1192,7 +1219,9 @@ dict_load_foreigns( ulint err; mtr_t mtr; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#endif /* UNIV_SYNC_DEBUG */ sys_foreign = dict_table_get_low((char *) "SYS_FOREIGN"); |