summaryrefslogtreecommitdiff
path: root/innobase/include
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-04-02 16:25:48 +0300
committerunknown <marko@hundin.mysql.fi>2004-04-02 16:25:48 +0300
commitfac3642cc850d86dd927dec456aea19bae706918 (patch)
tree751da20f73c4984ede631acbed2ecfa9bcfe50f6 /innobase/include
parentca68cb6625029607663412584aa361fe563fd9a5 (diff)
downloadmariadb-git-fac3642cc850d86dd927dec456aea19bae706918.tar.gz
InnoDB: ignore intra-database foreign key references between tables
when dropping database (Bug #3058) innobase/dict/dict0crea.c: Add a parameter to row_drop_table_for_mysql() innobase/dict/dict0dict.c: Make dict_tables_have_same_db() a global function innobase/include/dict0dict.h: Make dict_tables_have_same_db() a global function innobase/include/row0mysql.h: Add a parameter to row_drop_table_for_mysql() innobase/row/row0mysql.c: Add a parameter "drop_db" to row_drop_table_for_mysql() to skip foreign constraint checks on tables in same database innobase/trx/trx0roll.c: Add a parameter to row_drop_table_for_mysql() sql/ha_innodb.cc: Add a parameter "drop_db" to row_drop_table_for_mysql() innobase_drop_database(): allocate namebuf dynamically
Diffstat (limited to 'innobase/include')
-rw-r--r--innobase/include/dict0dict.h11
-rw-r--r--innobase/include/row0mysql.h3
2 files changed, 13 insertions, 1 deletions
diff --git a/innobase/include/dict0dict.h b/innobase/include/dict0dict.h
index f0523c5f204..7d7739021e2 100644
--- a/innobase/include/dict0dict.h
+++ b/innobase/include/dict0dict.h
@@ -834,6 +834,17 @@ Releases the dictionary system mutex for MySQL. */
void
dict_mutex_exit_for_mysql(void);
/*===========================*/
+/************************************************************************
+Checks if the database name in two table names is the same. */
+
+ibool
+dict_tables_have_same_db(
+/*=====================*/
+ /* out: TRUE if same db name */
+ const char* name1, /* in: table name in the form
+ dbname '/' tablename */
+ const char* name2); /* in: table name in the form
+ dbname '/' tablename */
/* The following len must be at least 10000 bytes! */
#define DICT_FOREIGN_ERR_BUF_LEN 10000
diff --git a/innobase/include/row0mysql.h b/innobase/include/row0mysql.h
index 940b4c61b2f..f28e1b6f048 100644
--- a/innobase/include/row0mysql.h
+++ b/innobase/include/row0mysql.h
@@ -329,7 +329,8 @@ row_drop_table_for_mysql(
/*=====================*/
/* out: error code or DB_SUCCESS */
char* name, /* in: table name */
- trx_t* trx); /* in: transaction handle */
+ trx_t* trx, /* in: transaction handle */
+ ibool drop_db);/* in: TRUE=dropping whole database */
/*************************************************************************
Drops a database for MySQL. */