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:
unknown 2005-04-12 16:12:34 +03:00
commit dec90f5b36
6 changed files with 34 additions and 18 deletions

View file

@ -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. */

View file

@ -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. */