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
Merge branch 'connector_c_2.2' of http://github.com/MariaDB/mariadb-connector-c
Conflicts: cmake/FindIconv.cmake
This commit is contained in:
@@ -200,10 +200,17 @@ static int test_conc131(MYSQL *my)
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int test_conc129(MYSQL *my)
|
||||
{
|
||||
MYSQL *mysql= mysql_init(NULL);
|
||||
FAIL_IF(mysql_close_start(mysql), "No error expected");
|
||||
}
|
||||
|
||||
|
||||
struct my_tests_st my_tests[] = {
|
||||
{"async1", async1, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||
{"test_conc131", test_conc131, TEST_CONNECTION_NONE, 0, NULL, NULL},
|
||||
{"test_conc129", test_conc129, TEST_CONNECTION_NONE, 0, NULL, NULL},
|
||||
{NULL, NULL, 0, 0, NULL, NULL}
|
||||
};
|
||||
|
||||
|
@@ -3868,7 +3868,46 @@ static int test_conc_5(MYSQL *mysql)
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int test_conc141(MYSQL *mysql)
|
||||
{
|
||||
int rc;
|
||||
MYSQL_RES *res;
|
||||
char *query= "CALL p_conc141";
|
||||
MYSQL_STMT *stmt= mysql_stmt_init(mysql);
|
||||
|
||||
rc= mysql_query(mysql, "DROP TABLE IF EXISTS conc141");
|
||||
check_mysql_rc(rc, mysql);
|
||||
rc= mysql_query(mysql, "CREATE TABLE conc141 (KeyVal int not null primary key)");
|
||||
check_mysql_rc(rc, mysql);
|
||||
rc= mysql_query(mysql, "INSERT INTO conc141 VALUES(1)");
|
||||
check_mysql_rc(rc, mysql);
|
||||
rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p_conc141");
|
||||
check_mysql_rc(rc, mysql);
|
||||
rc= mysql_query(mysql, "CREATE PROCEDURE p_conc141()\n"
|
||||
"BEGIN\n"
|
||||
"select * from conc141;\n"
|
||||
"insert into conc141(KeyVal) VALUES(1);\n"
|
||||
"END");
|
||||
check_mysql_rc(rc, mysql);
|
||||
|
||||
rc= mysql_stmt_prepare(stmt, query, strlen(query));
|
||||
check_stmt_rc(rc, stmt);
|
||||
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_stmt_rc(rc, stmt);
|
||||
/* skip first result */
|
||||
rc= mysql_stmt_next_result(stmt);
|
||||
FAIL_IF(rc==-1, "No more results and error expected");
|
||||
mysql_stmt_free_result(stmt);
|
||||
FAIL_IF(mysql_stmt_errno(stmt), "No Error expected");
|
||||
rc= mysql_stmt_execute(stmt);
|
||||
check_stmt_rc(rc, stmt);
|
||||
mysql_stmt_close(stmt);
|
||||
return OK;
|
||||
}
|
||||
|
||||
struct my_tests_st my_tests[] = {
|
||||
{"test_conc141", test_conc141, TEST_CONNECTION_NEW, 0, NULL , NULL},
|
||||
{"test_conc67", test_conc67, TEST_CONNECTION_DEFAULT, 0, NULL , NULL},
|
||||
{"test_conc_5", test_conc_5, TEST_CONNECTION_DEFAULT, 0, NULL , NULL},
|
||||
{"test_bug1115", test_bug1115, TEST_CONNECTION_DEFAULT, 0, NULL , NULL},
|
||||
|
Reference in New Issue
Block a user