From 1d3fd5818a0f97832b69bb60ee1a49d5c1faea4c Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Wed, 29 Jun 2022 13:27:28 +0200 Subject: [PATCH] Test fix for test_bug4236 --- client/ma_plugin_info.c | 2 +- unittest/libmariadb/ps_bugs.c | 18 +----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/client/ma_plugin_info.c b/client/ma_plugin_info.c index 15951318..73834e12 100644 --- a/client/ma_plugin_info.c +++ b/client/ma_plugin_info.c @@ -204,7 +204,7 @@ int main(int argc, char *argv[]) usage(); break; default: - printf("unrecocognized option: %s", argv[1]); + printf("unrecognized option: %s", argv[1]); exit(1); } exit(0); diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index b5173a76..8e0a102f 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -2474,12 +2474,10 @@ static int test_bug4231(MYSQL *mysql) static int test_bug4236(MYSQL *mysql) { - MYSQL_STMT *stmt, *stmt1; + MYSQL_STMT *stmt; const char *stmt_text; int rc; MYSQL_STMT backup; - MYSQL *mysql1; - stmt= mysql_stmt_init(mysql); @@ -2493,20 +2491,6 @@ static int test_bug4236(MYSQL *mysql) rc= mysql_stmt_execute(stmt); FAIL_IF(!rc, "Error expected"); - /* lets try to hack with a new connection */ - mysql1= test_connect(NULL); - stmt1= mysql_stmt_init(mysql1); - stmt_text= "SELECT 2"; - rc= mysql_stmt_prepare(stmt1, SL(stmt_text)); - check_stmt_rc(rc, stmt); - - stmt->stmt_id= stmt1->stmt_id; - rc= mysql_stmt_execute(stmt); - FAIL_IF(!rc, "Error expected"); - - mysql_stmt_close(stmt1); - mysql_close(mysql1); - /* Restore original statement id to be able to reprepare it */ stmt->stmt_id= backup.stmt_id;