From fb85d99d13f0a5f47e3ba1a25a81f8ddcc4400e2 Mon Sep 17 00:00:00 2001 From: diego Dupin Date: Wed, 23 Mar 2022 11:46:40 +0100 Subject: [PATCH] Adding xpand to test suite --- .travis.yml | 3 ++ unittest/libmariadb/basic-t.c | 1 + unittest/libmariadb/connection.c | 5 +++ unittest/libmariadb/cursor.c | 17 ++++++++ unittest/libmariadb/errors.c | 10 +++++ unittest/libmariadb/features-10_2.c | 6 +++ unittest/libmariadb/logs.c | 6 +++ unittest/libmariadb/misc.c | 4 +- unittest/libmariadb/my_test.h | 17 ++++++++ unittest/libmariadb/ps.c | 65 +++++++++++++++++++++++++++-- unittest/libmariadb/ps_bugs.c | 51 +++++++++++++++++++++- unittest/libmariadb/ps_new.c | 15 +++++++ unittest/libmariadb/result.c | 3 ++ unittest/libmariadb/view.c | 26 ++++++++++++ 14 files changed, 222 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 45f56ad7..eb61e031 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,7 @@ jobs: - env: srv=maxscale - env: srv=skysql - env: srv=skysql-ha + - env: srv=xpand include: - env: srv=mariadb v=10.5 os: windows @@ -54,6 +55,8 @@ jobs: env: srv=mariadb-es v=10.5 - if: type = push AND fork = false env: srv=maxscale + - if: type = push AND fork = false + env: srv=xpand - if: type = push AND fork = false env: srv=build v=10.6 - env: srv=mysql v=5.7 native=1 diff --git a/unittest/libmariadb/basic-t.c b/unittest/libmariadb/basic-t.c index 87bff9a9..90e7189f 100644 --- a/unittest/libmariadb/basic-t.c +++ b/unittest/libmariadb/basic-t.c @@ -39,6 +39,7 @@ static int test_conc75(MYSQL *my) SKIP_SKYSQL; SKIP_MAXSCALE; + SKIP_XPAND; mysql= mysql_init(NULL); diff --git a/unittest/libmariadb/connection.c b/unittest/libmariadb/connection.c index 22c01a2c..93f7e1db 100644 --- a/unittest/libmariadb/connection.c +++ b/unittest/libmariadb/connection.c @@ -1151,6 +1151,9 @@ static int test_auth256(MYSQL *my) if (IS_SKYSQL(hostname)) return SKIP; + // xpand doesn't have information_schema.plugins + SKIP_XPAND; + if (!mysql_client_find_plugin(mysql, "sha256_password", MYSQL_CLIENT_AUTHENTICATION_PLUGIN)) { diag("sha256_password plugin not available"); @@ -1867,6 +1870,8 @@ static int test_gtid(MYSQL *mysql) if (is_mariadb) return SKIP; + // https://jira.mariadb.org/browse/XPT-182 + SKIP_XPAND; rc= mysql_query(mysql, "SET @@session.session_track_state_change=1"); check_mysql_rc(rc, mysql); diff --git a/unittest/libmariadb/cursor.c b/unittest/libmariadb/cursor.c index 332202dc..c75cdf35 100644 --- a/unittest/libmariadb/cursor.c +++ b/unittest/libmariadb/cursor.c @@ -450,6 +450,12 @@ static int test_bug10794(MYSQL *mysql) int i= 0; ulong type; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc= mysql_query(mysql, "drop table if exists t1"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "create table t1 (id integer not null primary key," @@ -477,6 +483,7 @@ static int test_bug10794(MYSQL *mysql) rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); } + stmt_text= "select name from t1"; rc= mysql_stmt_prepare(stmt, SL(stmt_text)); type= (ulong) CURSOR_TYPE_READ_ONLY; @@ -725,6 +732,13 @@ static int test_bug11656(MYSQL *mysql) my_bind[i].buffer= (uchar* *)&buf[i]; my_bind[i].buffer_length= (unsigned long)strlen(buf[i]); } + + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc= mysql_stmt_bind_param(stmt, my_bind); check_stmt_rc(rc, stmt); @@ -1378,6 +1392,9 @@ static int test_bug24179(MYSQL *mysql) int rc; MYSQL_STMT *stmt; + // works with xpand + SKIP_XPAND; + stmt= open_cursor(mysql, "select 1 into @a"); rc= mysql_stmt_execute(stmt); FAIL_UNLESS(rc, "Error expected"); diff --git a/unittest/libmariadb/errors.c b/unittest/libmariadb/errors.c index 79060a50..2e1e7263 100644 --- a/unittest/libmariadb/errors.c +++ b/unittest/libmariadb/errors.c @@ -29,6 +29,8 @@ static int test_client_warnings(MYSQL *mysql) { int rc; + SKIP_XPAND; + rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); @@ -44,6 +46,9 @@ static int test_ps_client_warnings(MYSQL *mysql) { int rc; MYSQL_STMT *stmt; + + SKIP_XPAND; + const char *query= "DROP TABLE IF EXISTS test_non_exists"; rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); @@ -68,6 +73,8 @@ static int test_server_warnings(MYSQL *mysql) int rc; MYSQL_RES *result; + SKIP_XPAND; + rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "DROP TABLE if exists test_non_exists"); @@ -256,6 +263,9 @@ static int test_parse_error_and_bad_length(MYSQL *mysql) stmt= mysql_stmt_init(mysql); FAIL_UNLESS(stmt, ""); memset(stmt_str, 0, 100); + + SKIP_XPAND; + strcpy(stmt_str, "SHOW DATABASES"); rc= mysql_stmt_prepare(stmt, stmt_str, 99); FAIL_IF(!rc, "Error expected"); diff --git a/unittest/libmariadb/features-10_2.c b/unittest/libmariadb/features-10_2.c index e09db5aa..6e5064dc 100644 --- a/unittest/libmariadb/features-10_2.c +++ b/unittest/libmariadb/features-10_2.c @@ -96,6 +96,12 @@ static int execute_direct_example(MYSQL *mysql) bind[1].buffer= (char *)strval; bind[1].buffer_length= (unsigned long)strlen(strval); + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + /* set number of parameters */ rc= mysql_stmt_attr_set(stmt, STMT_ATTR_PREBIND_PARAMS, ¶m_count); check_stmt_rc(rc, stmt); diff --git a/unittest/libmariadb/logs.c b/unittest/libmariadb/logs.c index e66144cf..60554a06 100644 --- a/unittest/libmariadb/logs.c +++ b/unittest/libmariadb/logs.c @@ -91,6 +91,12 @@ static int test_logs(MYSQL *mysql) my_bind[1].buffer_length= 255; my_bind[1].length= (unsigned long *)&length; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + id= 9876; strcpy((char *)data, "MySQL - Open Source Database"); length= strlen(data); diff --git a/unittest/libmariadb/misc.c b/unittest/libmariadb/misc.c index 4b5c2297..f84bb674 100644 --- a/unittest/libmariadb/misc.c +++ b/unittest/libmariadb/misc.c @@ -841,6 +841,7 @@ static int test_conc49(MYSQL *mysql) SKIP_LOAD_INFILE_DISABLE; SKIP_SKYSQL; + SKIP_XPAND; rc= mysql_query(mysql, "select @@LOCAL_INFILE"); check_mysql_rc(rc, mysql); @@ -1076,8 +1077,7 @@ static int test_remote1(MYSQL *mysql) MYSQL_RES *res; MYSQL_ROW row; SKIP_SKYSQL; - - SKIP_SKYSQL; + SKIP_XPAND; remote_plugin= (void *)mysql_client_find_plugin(mysql, "remote_io", MARIADB_CLIENT_REMOTEIO_PLUGIN); if (!remote_plugin) diff --git a/unittest/libmariadb/my_test.h b/unittest/libmariadb/my_test.h index 10fff941..fa1d9c4a 100644 --- a/unittest/libmariadb/my_test.h +++ b/unittest/libmariadb/my_test.h @@ -79,6 +79,7 @@ MYSQL *mysql_default = NULL; /* default connection */ ((mysql_default && strstr(mysql_get_server_info(mysql_default), "maxScale")) ||\ (getenv("srv")!=NULL && (strcmp(getenv("srv"), "maxscale") == 0 ||\ strcmp(getenv("srv"), "skysql-ha") == 0))) + #define SKIP_MAXSCALE \ if (IS_MAXSCALE()) \ { \ @@ -86,6 +87,17 @@ if (IS_MAXSCALE()) \ return SKIP; \ } +#define IS_XPAND()\ + ((mysql_default && strstr(mysql_get_server_info(mysql_default), "Xpand")) ||\ + (getenv("srv")!=NULL && strcmp(getenv("srv"), "xpand") == 0)) + +#define SKIP_XPAND \ +if (IS_XPAND()) \ +{ \ + diag("test disabled with xpand"); \ + return SKIP; \ +} + #define SKIP_LOAD_INFILE_DISABLE \ if (!((mysql->server_capabilities & CLIENT_LOCAL_FILES) && \ (mysql->options.client_flag & CLIENT_LOCAL_FILES))) { \ @@ -617,6 +629,11 @@ void get_envvars() { } if ((envvar= getenv("MYSQL_TEST_PLUGINDIR"))) plugindir= envvar; + + if (IS_XPAND()) + { + + } } MYSQL *my_test_connect(MYSQL *mysql, diff --git a/unittest/libmariadb/ps.c b/unittest/libmariadb/ps.c index cea4af1f..fd3f091a 100644 --- a/unittest/libmariadb/ps.c +++ b/unittest/libmariadb/ps.c @@ -57,6 +57,7 @@ static int test_conc83(MYSQL *unused __attribute__((unused))) const char *query= "SELECT 1,2,3 FROM DUAL"; SKIP_MAXSCALE; + SKIP_XPAND; stmt= mysql_stmt_init(mysql); @@ -513,6 +514,12 @@ static int test_prepare(MYSQL *mysql) "col6 float, col7 double )"); check_mysql_rc(rc, mysql); + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + /* insert by prepare */ strcpy(query, "INSERT INTO my_prepare VALUES(?, ?, ?, ?, ?, ?, ?)"); stmt= mysql_stmt_init(mysql); @@ -1101,6 +1108,12 @@ static int test_simple_update(MYSQL *mysql) int rowcount= 0; char query[MAX_TEST_QUERY_LENGTH]; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc= mysql_autocommit(mysql, TRUE); check_mysql_rc(rc, mysql); @@ -1189,11 +1202,17 @@ static int test_long_data(MYSQL *mysql) rc= mysql_autocommit(mysql, TRUE); check_mysql_rc(rc, mysql); + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_long_data"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE TABLE test_long_data(col1 int, " - " col2 long varchar, col3 long varbinary)"); + " col2 MEDIUMTEXT, col3 MEDIUMTEXT)"); check_mysql_rc(rc, mysql); strcpy(query, "INSERT INTO test_long_data(col1, col2) VALUES(?)"); @@ -1294,7 +1313,7 @@ static int test_long_data_str(MYSQL *mysql) rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_long_data_str"); check_mysql_rc(rc, mysql); - rc= mysql_query(mysql, "CREATE TABLE test_long_data_str(id int, longstr long varchar)"); + rc= mysql_query(mysql, "CREATE TABLE test_long_data_str(id int, longstr MEDIUMTEXT)"); check_mysql_rc(rc, mysql); strcpy(query, "INSERT INTO test_long_data_str VALUES(?, ?)"); @@ -1393,7 +1412,7 @@ static int test_long_data_str1(MYSQL *mysql) rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_long_data_str"); check_mysql_rc(rc, mysql); - rc= mysql_query(mysql, "CREATE TABLE test_long_data_str(longstr long varchar, blb long varbinary)"); + rc= mysql_query(mysql, "CREATE TABLE test_long_data_str(longstr MEDIUMTEXT, blb MEDIUMBLOB)"); check_mysql_rc(rc, mysql); strcpy(query, "INSERT INTO test_long_data_str VALUES(?, ?)"); @@ -1637,6 +1656,12 @@ static int test_simple_delete(MYSQL *mysql) rc= mysql_autocommit(mysql, TRUE); check_mysql_rc(rc, mysql); + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_simple_delete"); check_mysql_rc(rc, mysql); @@ -1722,6 +1747,12 @@ static int test_update(MYSQL *mysql) rc= mysql_autocommit(mysql, TRUE); check_mysql_rc(rc, mysql); + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_update"); check_mysql_rc(rc, mysql); @@ -2388,6 +2419,12 @@ static int test_union_param(MYSQL *mysql) strcpy(my_val, "abc"); + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + query= (char*)"select ? as my_col union distinct select ?"; stmt= mysql_stmt_init(mysql); FAIL_IF(!stmt, mysql_error(mysql)); @@ -3391,6 +3428,9 @@ static int test_do_set(MYSQL *mysql) char *query; int rc, i; + // XPAND doesn't support DO command + SKIP_XPAND; + rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); check_mysql_rc(rc, mysql); @@ -3433,6 +3473,11 @@ static int test_double_compare(MYSQL *mysql) ulong length[3]; char query[MAX_TEST_QUERY_LENGTH]; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } rc= mysql_autocommit(mysql, TRUE); check_mysql_rc(rc, mysql); @@ -4091,6 +4136,12 @@ static int test_select(MYSQL *mysql) rc= mysql_commit(mysql); check_mysql_rc(rc, mysql); + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + strcpy(query, "SELECT * FROM test_select WHERE id= ? " "AND CONVERT(name USING utf8) =?"); stmt= mysql_stmt_init(mysql); @@ -4768,7 +4819,7 @@ static int test_long_data1(MYSQL *mysql) check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE TABLE tld (col1 int, " - "col2 long varbinary)"); + "col2 MEDIUMTEXT)"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "INSERT INTO tld VALUES (1,'test')"); check_mysql_rc(rc, mysql); @@ -4806,6 +4857,12 @@ int test_blob_9000(MYSQL *mysql) rc= mysql_query(mysql, "CREATE TABLE tb9000 (a blob)"); check_mysql_rc(rc, mysql); + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL(query)); diff --git a/unittest/libmariadb/ps_bugs.c b/unittest/libmariadb/ps_bugs.c index bc5dfb17..ba9d2852 100644 --- a/unittest/libmariadb/ps_bugs.c +++ b/unittest/libmariadb/ps_bugs.c @@ -48,6 +48,12 @@ static int test_conc67(MYSQL *mysql) ulong prefetch_rows= 1000; ulong cursor_type= CURSOR_TYPE_READ_ONLY; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc= mysql_query(mysql, "DROP TABLE IF EXISTS conc67"); check_mysql_rc(rc, mysql); @@ -232,6 +238,12 @@ static int test_bug1180(MYSQL *mysql) char szData[11]; char query[MAX_TEST_QUERY_LENGTH]; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_select"); check_mysql_rc(rc, mysql); @@ -557,6 +569,8 @@ static int test_bug1500(MYSQL *mysql) const char *data; const char *query; + // XPAND doesn't support AGAINST + SKIP_XPAND rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bg1500"); check_mysql_rc(rc, mysql); @@ -767,6 +781,9 @@ static int test_bug15613(MYSQL *mysql) MYSQL_FIELD *field; int rc; + //https://jira.mariadb.org/browse/XPT-273 + SKIP_XPAND; + /* I. Prepare the table */ rc= mysql_query(mysql, "set names latin1"); check_mysql_rc(rc, mysql); @@ -838,11 +855,16 @@ static int test_bug1664(MYSQL *mysql) MYSQL_BIND my_bind[2]; const char *query= "INSERT INTO test_long_data(col2, col1) VALUES(?, ?)"; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_long_data"); check_mysql_rc(rc, mysql); - rc= mysql_query(mysql, "CREATE TABLE test_long_data(col1 int, col2 long varchar)"); + rc= mysql_query(mysql, "CREATE TABLE test_long_data(col1 int, col2 MEDIUMTEXT)"); check_mysql_rc(rc, mysql); stmt= mysql_stmt_init(mysql); @@ -1628,6 +1650,12 @@ static int test_ps_conj_select(MYSQL *mysql) unsigned long str_length; char query[MAX_TEST_QUERY_LENGTH]; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc= mysql_query(mysql, "drop table if exists t1"); check_mysql_rc(rc, mysql); @@ -2126,6 +2154,11 @@ static int test_bug3796(MYSQL *mysql) const char *stmt_text; int rc; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } /* Create and fill test table */ stmt_text= "DROP TABLE IF EXISTS t1"; @@ -3145,6 +3178,9 @@ static int test_field_misc(MYSQL *mysql) mysql_free_result(result); mysql_stmt_close(stmt); + // XPAND doesn't support @@max_error_count + SKIP_XPAND + stmt= mysql_stmt_init(mysql); FAIL_IF(!stmt, mysql_error(mysql)); rc= mysql_stmt_prepare(stmt, SL("SELECT @@max_error_count")); @@ -3791,6 +3827,7 @@ static int test_bug53311(MYSQL *mysql) int i; const char *query= "INSERT INTO bug53311 VALUES (1)"; SKIP_MAXSCALE; + SKIP_XPAND; rc= mysql_options(mysql, MYSQL_OPT_RECONNECT, "1"); check_mysql_rc(rc, mysql); @@ -4113,6 +4150,9 @@ static int test_conc168(MYSQL *mysql) char buffer[100]; int rc; + //https://jira.mariadb.org/browse/XPT-273 + SKIP_XPAND; + rc= mysql_query(mysql, "DROP TABLE IF EXISTS conc168"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE TABLE conc168(a datetime(3))"); @@ -4209,6 +4249,9 @@ static int test_conc177(MYSQL *mysql) const char *stmt_str= "SELECT a,b FROM t1"; char buf1[128], buf2[128]; + // https://jira.mariadb.org/browse/XPT-286 + SKIP_XPAND + rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); check_mysql_rc(rc, mysql); @@ -5426,6 +5469,12 @@ static int test_mdev19838(MYSQL *mysql) MYSQL_STMT *stmt; SKIP_MAXSCALE; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc = mysql_query(mysql, "CREATE temporary TABLE mdev19838(" "f1 char(36)," diff --git a/unittest/libmariadb/ps_new.c b/unittest/libmariadb/ps_new.c index f9bd9ad0..ea228f1c 100644 --- a/unittest/libmariadb/ps_new.c +++ b/unittest/libmariadb/ps_new.c @@ -31,6 +31,9 @@ static int test_multi_result(MYSQL *mysql) my_bool is_null[3]; /* output value nullability */ int rc, i; + //https://jira.mariadb.org/browse/XPT-268 + SKIP_XPAND; + /* set up stored procedure */ rc = mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); check_mysql_rc(rc, mysql); @@ -140,6 +143,9 @@ int test_sp_params(MYSQL *mysql) const char *stmtstr= "CALL P1(?,?,?)"; char res[3][20]; + //https://jira.mariadb.org/browse/XPT-268 + SKIP_XPAND; + rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); check_mysql_rc(rc, mysql); @@ -223,6 +229,9 @@ int test_sp_reset(MYSQL *mysql) MYSQL_BIND bind[3]; const char *stmtstr= "CALL P1(?,?,?)"; + //https://jira.mariadb.org/browse/XPT-268 + SKIP_XPAND; + rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); check_mysql_rc(rc, mysql); @@ -278,6 +287,9 @@ int test_sp_reset1(MYSQL *mysql) char tmp[20]; const char *stmtstr= "CALL P1(?)"; + // https://jira.mariadb.org/browse/XPT-268 + SKIP_XPAND; + rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE PROCEDURE p1(OUT p_out VARCHAR(19))" @@ -431,6 +443,9 @@ int test_query(MYSQL *mysql) char tmp[20]; const char *stmtstr= "CALL P1(?)"; + // https://jira.mariadb.org/browse/XPT-268 + SKIP_XPAND; + rc= mysql_query(mysql, "DROP PROCEDURE IF EXISTS p1"); check_mysql_rc(rc, mysql); rc= mysql_query(mysql, "CREATE PROCEDURE p1(OUT p_out VARCHAR(19))" diff --git a/unittest/libmariadb/result.c b/unittest/libmariadb/result.c index 13f40b2c..9f62ae05 100644 --- a/unittest/libmariadb/result.c +++ b/unittest/libmariadb/result.c @@ -656,6 +656,9 @@ static int test_field_flags(MYSQL *mysql) MYSQL_RES *result; MYSQL_FIELD *field; + // https://jira.mariadb.org/browse/XPT-287 + SKIP_XPAND; + rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_field_flags"); check_mysql_rc(rc, mysql); diff --git a/unittest/libmariadb/view.c b/unittest/libmariadb/view.c index 1cf4c862..ac2c1e56 100644 --- a/unittest/libmariadb/view.c +++ b/unittest/libmariadb/view.c @@ -34,6 +34,12 @@ static int test_view(MYSQL *mysql) const char *query= "SELECT COUNT(*) FROM v1 WHERE SERVERNAME=?"; + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + rc = mysql_query(mysql, "DROP TABLE IF EXISTS t1,t2,t3,v1"); check_mysql_rc(rc, mysql); @@ -216,6 +222,13 @@ static int test_view_2where(MYSQL *mysql) length[i] = 1; my_bind[i].length = &length[i]; } + + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL(query)); check_stmt_rc(rc, stmt); @@ -268,6 +281,12 @@ static int test_view_star(MYSQL *mysql) length[i] = 1; } + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL(query)); check_stmt_rc(rc, stmt); @@ -447,6 +466,13 @@ static int test_view_insert_fields(MYSQL *mysql) my_bind[i].buffer_length= 2; my_bind[i].length= &l[i]; } + + // https://jira.mariadb.org/browse/XPT-266 + if (IS_XPAND()) { + rc= mysql_query(mysql, "SET NAMES UTF8"); + check_mysql_rc(rc, mysql); + } + stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL(query)); check_stmt_rc(rc, stmt);