diff options
-rw-r--r-- | sql/sql_parse.cc | 4 | ||||
-rw-r--r-- | tests/mysql_client_test.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index acd4873b212..5dac052b749 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6717,8 +6717,10 @@ void sql_kill(THD *thd, ulong id, killed_state state) uint error; if (!(error= kill_one_thread(thd, id, state))) { - if ((!thd->killed) || (thd->thread_id == id && thd->killed >= KILL_CONNECTION)) + if ((!thd->killed)) my_ok(thd); + else + my_error(killed_errno(thd->killed), MYF(0), id); } else my_error(error, MYF(0), id); diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 285e5fd0aee..91e7da6ff32 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -18566,7 +18566,7 @@ static void test_mdev3885() myheader("test_mdev3885"); conn= client_connect(0, MYSQL_PROTOCOL_TCP, 0); rc= mysql_kill(conn, mysql_thread_id(conn)); - DIE_UNLESS(rc == 0); + DIE_UNLESS(rc); mysql_close(conn); } |