diff options
author | unknown <marko@hundin.mysql.fi> | 2005-04-12 16:12:34 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-04-12 16:12:34 +0300 |
commit | dec90f5b36f3977849009031fcd6b1891c08a884 (patch) | |
tree | ec3a9f371d8bab7dc419ea679440283c202ffb34 /sql | |
parent | 3fcbdd761c99a83fd48330d4e141fc3d59d53ab2 (diff) | |
download | mariadb-git-dec90f5b36f3977849009031fcd6b1891c08a884.tar.gz |
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.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_innodb.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 322d5188a75..bd2a5139021 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -4183,6 +4183,10 @@ ha_innobase::rename_table( trx->mysql_thd = current_thd; trx->mysql_query_str = &((*current_thd).query); + if (current_thd->options & OPTION_NO_FOREIGN_KEY_CHECKS) { + trx->check_foreigns = FALSE; + } + name_len1 = strlen(from); name_len2 = strlen(to); |