Commit e571eaae authored by Jan Lindström's avatar Jan Lindström

MDEV-23328 Server hang due to Galera lock conflict resolution

Use better error message when KILL fails even in case TOI
fails.
parent ea239034
......@@ -15,10 +15,10 @@ Killing server ...
connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1c;
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
ERROR 40001: WSREP replication failed. Check your wsrep connection state and retry the query.
ERROR 40001: WSREP replication failed. Check your wsrep connection state and retry the query.
Got one of the listed errors
Got one of the listed errors
CREATE UNIQUE INDEX b2 ON t2(b);
ERROR 08S01: WSREP has not yet prepared node for application use
Got one of the listed errors
connection node_1;
disconnect node_1a;
disconnect node_1b;
......
......@@ -34,16 +34,16 @@ BEGIN;
--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1c
--error ER_LOCK_DEADLOCK
--error ER_LOCK_DEADLOCK,ER_UNKNOWN_COM_ERROR
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB;
--disable_query_log
--error ER_LOCK_DEADLOCK
--error ER_LOCK_DEADLOCK, ER_CANNOT_USER,ER_KILL_QUERY_DENIED_ERROR
--eval KILL QUERY $k_thread;
--enable_query_log
# Reset the master and restart the slave so that post-test checks can run
--error 1047
--error ER_LOCK_DEADLOCK,ER_UNKNOWN_COM_ERROR
CREATE UNIQUE INDEX b2 ON t2(b);
--connection node_1
......
......@@ -9093,7 +9093,9 @@ void sql_kill(THD *thd, longlong id, killed_state state, killed_type type)
#ifdef WITH_WSREP
return;
wsrep_error_label:
my_error(ER_CANNOT_USER, MYF(0), " ");
error= (type == KILL_TYPE_QUERY ? ER_KILL_QUERY_DENIED_ERROR :
ER_KILL_DENIED_ERROR);
my_error(error, MYF(0), id);
#endif /* WITH_WSREP */
}
......@@ -9128,7 +9130,7 @@ void sql_kill_user(THD *thd, LEX_USER *user, killed_state state)
#ifdef WITH_WSREP
return;
wsrep_error_label:
my_error(ER_CANNOT_USER, MYF(0), " ");
my_error(ER_CANNOT_USER, MYF(0), user ? user->user.str : "NULL");
#endif /* WITH_WSREP */
}
......
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