1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Test fix for test_bug4236

This commit is contained in:
Georg Richter
2022-06-29 13:27:28 +02:00
parent 3f7719c74d
commit 35826cd51c
2 changed files with 2 additions and 18 deletions

View File

@@ -2507,12 +2507,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);
@@ -2526,20 +2524,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;