You've already forked mariadb-connector-c
mirror of
https://github.com/mariadb-corporation/mariadb-connector-c.git
synced 2025-08-05 15:55:58 +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:
@@ -78,7 +78,7 @@ static int test_logs(MYSQL *mysql)
|
||||
stmt= mysql_stmt_init(mysql);
|
||||
FAIL_IF(!stmt, mysql_error(mysql));
|
||||
|
||||
rc= mysql_stmt_prepare(stmt, data, (unsigned long)strlen(data));
|
||||
rc= mysql_stmt_prepare(stmt, SL(data));
|
||||
check_stmt_rc(rc, stmt);
|
||||
|
||||
memset(my_bind, '\0', sizeof(my_bind));
|
||||
@@ -129,7 +129,7 @@ static int test_logs(MYSQL *mysql)
|
||||
stmt= mysql_stmt_init(mysql);
|
||||
FAIL_IF(!stmt, mysql_error(mysql));
|
||||
|
||||
rc= mysql_stmt_prepare(stmt, data, (unsigned long)strlen(data));
|
||||
rc= mysql_stmt_prepare(stmt, SL(data));
|
||||
check_stmt_rc(rc, stmt);
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
@@ -144,7 +144,7 @@ static int test_logs(MYSQL *mysql)
|
||||
stmt= mysql_stmt_init(mysql);
|
||||
FAIL_IF(!stmt, mysql_error(mysql));
|
||||
|
||||
rc= mysql_stmt_prepare(stmt, data, (unsigned long)strlen(data));
|
||||
rc= mysql_stmt_prepare(stmt, SL(data));
|
||||
check_stmt_rc(rc, stmt);
|
||||
|
||||
rc= mysql_stmt_bind_param(stmt, my_bind);
|
||||
|
Reference in New Issue
Block a user