[PATCH] MDEV-23915 ER_KILL_DENIED_ERROR not passed a thread id
authorDaniel Black <daniel@mariadb.org>
Tue, 22 Feb 2022 23:10:01 +0000 (10:10 +1100)
committerPeter Michael Green <plugwash@raspbian.org>
Thu, 17 Mar 2022 23:44:37 +0000 (23:44 +0000)
commit043fb95aa673eb5fa2d0a59c1450782cf1335bde
tree5d8227aa91a3be74dc052864786fc127f1474449
parentdebc9ac9bb8811e2d788e415ce7669afb76ffa86
[PATCH] MDEV-23915 ER_KILL_DENIED_ERROR not passed a thread id

The 10.5 test error main.grant_kill showed up a incorrect
thread id on a big endian architecture.

The cause of this is the sql_kill_user function assumed the
error was ER_OUT_OF_RESOURCES, when the the actual error was
ER_KILL_DENIED_ERROR. ER_KILL_DENIED_ERROR as an error message
requires a thread id to be passed as unsigned long, however a
user/host was passed.

ER_OUT_OF_RESOURCES doesn't even take a user/host, despite
the optimistic comment. We remove this being passed as an
argument to the function so that when MDEV-21978 is implemented
one less compiler format warning is generated (which would
have caught this error sooner).

Thanks Otto for reporting and Marko for analysis.

Gbp-Pq: Name 2028-MDEV-23915-fix-test-main.grat_kill.patch
mysql-test/suite/galera/r/galera_kill_applier.result
mysql-test/suite/galera/t/galera_kill_applier.test
sql/sql_parse.cc