[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)
committerOtto Kekäläinen <otto@debian.org>
Thu, 10 Mar 2022 06:26:32 +0000 (06:26 +0000)
commit94799f3b3533a40bf71bcdd1cba3689042d29335
treea994ab981dc35319d907c8103b54c3fa6adcafea
parentd97e98dee91f8de4b04c8258f8194aeb33ab9d0e
[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