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 remote-tracking branch 'origin/master' into cio
Conflicts: CMakeLists.txt include/mysql/client_plugin.h libmariadb/client_plugin.c.in libmariadb/libmariadb.c libmariadb/ma_secure.c libmariadb/my_malloc.c libmariadb/net.c plugins/io/CMakeLists.txt unittest/libmariadb/misc.c
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}
|
||||
};
|
||||
|
||||
|
@@ -57,7 +57,7 @@ static int test_conc66(MYSQL *my)
|
||||
diag("Error: %s", mysql_error(mysql));
|
||||
return FAIL;
|
||||
}
|
||||
rc= mysql_query(my, "DROP USER conc66@%");
|
||||
rc= mysql_query(my, "DROP USER conc66@localhost");
|
||||
|
||||
check_mysql_rc(rc, my);
|
||||
mysql_close(mysql);
|
||||
|
@@ -26,7 +26,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
#include <mysql/client_plugin.h>
|
||||
|
||||
void *remote_plugin;
|
||||
|
||||
/*
|
||||
Bug#28075 "COM_DEBUG crashes mysqld"
|
||||
@@ -974,6 +973,8 @@ static int test_conc117(MYSQL *mysql)
|
||||
return OK;
|
||||
}
|
||||
|
||||
#ifdef HAVE_REMOTEIO
|
||||
void *remote_plugin;
|
||||
static int test_remote1(MYSQL *mysql)
|
||||
{
|
||||
int rc;
|
||||
@@ -1019,11 +1020,14 @@ static int test_remote2(MYSQL *my)
|
||||
mysql_close(mysql);
|
||||
return OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct my_tests_st my_tests[] = {
|
||||
#ifdef HAVE_REMOTEIO
|
||||
{"test_remote1", test_remote1, TEST_CONNECTION_NEW, 0, NULL, NULL},
|
||||
{"test_remote2", test_remote2, TEST_CONNECTION_NEW, 0, NULL, NULL},
|
||||
{"test_conc117", test_conc117, TEST_CONNECTION_NEW, 0, NULL, NULL},
|
||||
{"test_remote2", test_remote2, TEST_CONNECTION_NEW, 0, NULL, NULL},
|
||||
#endif
|
||||
{"test_conc117", test_conc117, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||
{"test_conc_114", test_conc_114, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||
{"test_connect_attrs", test_connect_attrs, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||
{"test_conc49", test_conc49, TEST_CONNECTION_DEFAULT, 0, NULL, NULL},
|
||||
|
@@ -3868,7 +3868,45 @@ static int test_conc_5(MYSQL *mysql)
|
||||
return OK;
|
||||
}
|
||||
|
||||
static int test_conc141(MYSQL *mysql)
|
||||
{
|
||||
int rc;
|
||||
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