You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-07 02:42:49 +03:00
Test fixes:
for api functions which require string with length parameter (e.g. mysql_real_connect() or mysql_stmt_prepare() we now use the macro SL(string) which substitutes string and string length.
This commit is contained in:
@@ -37,11 +37,11 @@ static int test_bug15752(MYSQL *mysql)
|
||||
rc= mysql_query(mysql, "create procedure p1() select 1");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
rc= mysql_real_query(mysql, query, (unsigned long)strlen(query));
|
||||
rc= mysql_real_query(mysql, SL(query));
|
||||
check_mysql_rc(rc, mysql);
|
||||
mysql_free_result(mysql_store_result(mysql));
|
||||
|
||||
rc= mysql_real_query(mysql, query, (unsigned long)strlen(query));
|
||||
rc= mysql_real_query(mysql, SL(query));
|
||||
FAIL_UNLESS(rc && mysql_errno(mysql) == CR_COMMANDS_OUT_OF_SYNC, "Error expected");
|
||||
|
||||
rc= mysql_next_result(mysql);
|
||||
@@ -54,7 +54,7 @@ static int test_bug15752(MYSQL *mysql)
|
||||
|
||||
for (i = 0; i < ITERATION_COUNT; i++)
|
||||
{
|
||||
rc= mysql_real_query(mysql, query, (unsigned long)strlen(query));
|
||||
rc= mysql_real_query(mysql, SL(query));
|
||||
check_mysql_rc(rc, mysql);
|
||||
mysql_free_result(mysql_store_result(mysql));
|
||||
rc= mysql_next_result(mysql);
|
||||
|
Reference in New Issue
Block a user