summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2002-02-14 10:24:27 +0200
committerunknown <heikki@hundin.mysql.fi>2002-02-14 10:24:27 +0200
commit199e17e577163252c0ba5ecec4f4a655e621ce00 (patch)
tree3c4a3aabddd03f0b49b650f268a1c2f1716f3760 /sql
parent5c08b0fbabd600d54305462bf004845c2f5e7c68 (diff)
downloadmariadb-git-199e17e577163252c0ba5ecec4f4a655e621ce00.tar.gz
dict0dict.h, dict0dict.c, row0mysql.c, ha_innobase.cc:
Add some more safety if MySQL tries to drop a table on which there are open handles sql/ha_innobase.cc: Add some more safety if MySQL tries to drop a table on which there are open handles innobase/row/row0mysql.c: Add some more safety if MySQL tries to drop a table on which there are open handles innobase/dict/dict0dict.c: Add some more safety if MySQL tries to drop a table on which there are open handles innobase/include/dict0dict.h: Add some more safety if MySQL tries to drop a table on which there are open handles
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_innobase.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index cbc78bbd6fc..2cdf15ce974 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -981,7 +981,10 @@ ha_innobase::open(
/* Get pointer to a table object in InnoDB dictionary cache */
- if (NULL == (ib_table = dict_table_get(norm_name, NULL))) {
+ ib_table = dict_table_get_and_increment_handle_count(
+ norm_name, NULL);
+
+ if (NULL == ib_table) {
fprintf(stderr,
"InnoDB: Error: cannot find table %s from the internal data dictionary\n"