You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-08 14:02:17 +03:00
Better test of warnings during prepare.
This commit is contained in:
@@ -4275,13 +4275,7 @@ static int test_conc179(MYSQL *mysql)
|
|||||||
{
|
{
|
||||||
MYSQL_STMT *stmt;
|
MYSQL_STMT *stmt;
|
||||||
int rc;
|
int rc;
|
||||||
const char *stmtstr= "CREATE TABLE t1 (`blurb_id` int NOT NULL DEFAULT 0, `blurb` text default '', PRIMARY KEY (blurb_id)) ENGINE='FEDERATED' DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/test/t1'";
|
const char *stmtstr= "select 1 as ' '";
|
||||||
|
|
||||||
rc= mysql_query(mysql, "set sql_mode=''");
|
|
||||||
check_mysql_rc(rc, mysql);
|
|
||||||
|
|
||||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1");
|
|
||||||
check_mysql_rc(rc, mysql);
|
|
||||||
|
|
||||||
stmt= mysql_stmt_init(mysql);
|
stmt= mysql_stmt_init(mysql);
|
||||||
rc= mysql_stmt_prepare(stmt, SL(stmtstr));
|
rc= mysql_stmt_prepare(stmt, SL(stmtstr));
|
||||||
@@ -4289,8 +4283,8 @@ static int test_conc179(MYSQL *mysql)
|
|||||||
|
|
||||||
if (mysql_get_server_version(mysql) >= 100100)
|
if (mysql_get_server_version(mysql) >= 100100)
|
||||||
{
|
{
|
||||||
FAIL_IF(mysql_warning_count(mysql) < 2, "expected 2 or more warnings");
|
FAIL_IF(mysql_warning_count(mysql) < 1, "expected 1 or more warnings");
|
||||||
FAIL_IF(mysql_stmt_warning_count(stmt) < 2, "expected 2 or more warnings");
|
FAIL_IF(mysql_stmt_warning_count(stmt) < 1, "expected 1 or more warnings");
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_stmt_close(stmt);
|
mysql_stmt_close(stmt);
|
||||||
|
Reference in New Issue
Block a user