mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
InnoDB: Ignore character set mismatch in ALTER TABLE and RENAME TABLE
if foreign_key_checks=0. (Bug #9802) innobase/dict/dict0dict.c: dict_foreign_add_to_cache(): Add flag check_types. If the flag is FALSE, ignore character set mismatch. innobase/dict/dict0load.c: dict_load_foreign(), dict_load_foreigns(): Add flag check_types. If the flag is FALSE, differences in character sets will be ignored. innobase/include/dict0dict.h: dict_foreign_add_to_cache(): Add flag check_types. If the flag is FALSE, differences in character sets will be ignored. innobase/include/dict0load.h: dict_load_foreigns(): Add flag check_types. If the flag is FALSE, differences in character sets will be ignored. innobase/row/row0mysql.c: row_table_add_foreign_constraints(), row_rename_table_for_mysql(): Pass trx->check_foreigns to dict_load_foreigns() sql/ha_innodb.cc: ha_innobase::rename_table(): Clear trx->check_foreign if necessary.
This commit is contained in:
parent
3fcbdd761c
commit
dec90f5b36
6 changed files with 34 additions and 18 deletions
|
|
@ -189,7 +189,8 @@ ulint
|
|||
dict_foreign_add_to_cache(
|
||||
/*======================*/
|
||||
/* out: DB_SUCCESS or error code */
|
||||
dict_foreign_t* foreign); /* in, own: foreign key constraint */
|
||||
dict_foreign_t* foreign, /* in, own: foreign key constraint */
|
||||
ibool check_types); /* in: TRUE=check type compatibility */
|
||||
/*************************************************************************
|
||||
Checks if a table is referenced by foreign keys. */
|
||||
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ ulint
|
|||
dict_load_foreigns(
|
||||
/*===============*/
|
||||
/* out: DB_SUCCESS or error code */
|
||||
const char* table_name); /* in: table name */
|
||||
const char* table_name, /* in: table name */
|
||||
ibool check_types); /* in: TRUE=check type compatibility */
|
||||
/************************************************************************
|
||||
Prints to the standard output information on all tables found in the data
|
||||
dictionary system table. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue