Commit 1f9259df authored by Olivier Bertrand's avatar Olivier Bertrand

- Fix MDEV-6988 and MDEV-6994

modified:
  storage/connect/ha_connect.cc
parent ea5d7a5c
...@@ -3835,6 +3835,8 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd, ...@@ -3835,6 +3835,8 @@ MODE ha_connect::CheckMode(PGLOBAL g, THD *thd,
case SQLCOM_OPTIMIZE: case SQLCOM_OPTIMIZE:
newmode= MODE_READ; newmode= MODE_READ;
break; break;
case SQLCOM_FLUSH:
locked= 0;
case SQLCOM_DROP_TABLE: case SQLCOM_DROP_TABLE:
case SQLCOM_RENAME_TABLE: case SQLCOM_RENAME_TABLE:
newmode= MODE_ANY; newmode= MODE_ANY;
...@@ -4014,6 +4016,8 @@ int ha_connect::external_lock(THD *thd, int lock_type) ...@@ -4014,6 +4016,8 @@ int ha_connect::external_lock(THD *thd, int lock_type)
// This is unlocking, do it by closing the table // This is unlocking, do it by closing the table
if (xp->CheckQueryID() && sqlcom != SQLCOM_UNLOCK_TABLES if (xp->CheckQueryID() && sqlcom != SQLCOM_UNLOCK_TABLES
&& sqlcom != SQLCOM_LOCK_TABLES && sqlcom != SQLCOM_LOCK_TABLES
&& sqlcom != SQLCOM_FLUSH
&& sqlcom != SQLCOM_BEGIN
&& sqlcom != SQLCOM_DROP_TABLE) { && sqlcom != SQLCOM_DROP_TABLE) {
sprintf(g->Message, "external_lock: unexpected command %d", sqlcom); sprintf(g->Message, "external_lock: unexpected command %d", sqlcom);
push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message); push_warning(thd, Sql_condition::WARN_LEVEL_WARN, 0, g->Message);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment