summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
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"