diff options
author | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-11-27 00:45:29 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@montyprogram.com> | 2012-11-27 00:45:29 +0100 |
commit | 0f8450b2fb0f3f21a1829254b19bd61c46d09ead (patch) | |
tree | b367876fb76aa2f780f1885cddeaf78473d7943f /tests | |
parent | 980664bf2378d2bb57ec2f34016f0ff0a7ff4818 (diff) | |
download | mariadb-git-0f8450b2fb0f3f21a1829254b19bd61c46d09ead.tar.gz |
MDEV-3885 - connection suicide via mysql_kill() causes assertion in server
Assertion happened because sql_kill did not set OK status in diagnostic area
in the case of connection suicide (id to kill == thd->thread_id), issued
via COM_PROCESS_KILL , e.g using mysql_kill()
This patch ensures that diagnostic area is initialized in this specific case.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mysql_client_test.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 95fc61f2b72..285e5fd0aee 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -18554,6 +18554,22 @@ static void test_progress_reporting() mysql_close(conn); } +/** + MDEV-3885 - connection suicide via mysql_kill() causes assertion in server +*/ + +static void test_mdev3885() +{ + int rc; + MYSQL *conn; + + myheader("test_mdev3885"); + conn= client_connect(0, MYSQL_PROTOCOL_TCP, 0); + rc= mysql_kill(conn, mysql_thread_id(conn)); + DIE_UNLESS(rc == 0); + mysql_close(conn); +} + /** Bug#57058 SERVER_QUERY_WAS_SLOW not wired up. @@ -19056,6 +19072,7 @@ static struct my_tests_st my_tests[]= { { "test_bug58036", test_bug58036 }, { "test_bug57058", test_bug57058 }, { "test_bug56976", test_bug56976 }, + { "test_mdev3855", test_mdev3885 }, { "test_bug11766854", test_bug11766854 }, { "test_bug12337762", test_bug12337762 }, { "test_progress_reporting", test_progress_reporting }, |