diff options
author | heikki@hundin.mysql.fi <> | 2004-02-16 09:58:47 +0200 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2004-02-16 09:58:47 +0200 |
commit | f5fedf54e4d0501d941cc831a2ace197ae3cde0e (patch) | |
tree | d3a040eca43b41055a69ef5516dd4c8f1191d2c4 /sql/ha_innodb.cc | |
parent | 158ba5ab5b6779f588d1bd705eecab82f50eb94c (diff) | |
download | mariadb-git-f5fedf54e4d0501d941cc831a2ace197ae3cde0e.tar.gz |
ha_innodb.cc:
Make the drop InnoDB database operation aware of the setting FOREIGN_KEY_CHECKS=0; DROP DATABASE seems to work ok anyway, but that is because MySQL first calls DROP TABLE for each table which has an .frm file
Diffstat (limited to 'sql/ha_innodb.cc')
-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 73f517285a0..172f5b969cb 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -3687,6 +3687,10 @@ innobase_drop_database( 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; + } + error = row_drop_database_for_mysql(namebuf, trx); /* Flush the log to reduce probability that the .frm files and |