summaryrefslogtreecommitdiff
path: root/tests/mysql_client_test.c
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2022-01-20 16:25:43 +0700
committerMarko Mäkelä <marko.makela@mariadb.com>2022-01-20 12:50:27 +0200
commit7dcef6504620114f503dea92eadbb0e0fe95eb17 (patch)
treecb167d25cfe13afef5e113414fdc5a35fd540f67 /tests/mysql_client_test.c
parent1d27b5789aaa353175f5331d3a8b104b22dd1fce (diff)
downloadmariadb-git-7dcef6504620114f503dea92eadbb0e0fe95eb17.tar.gz
MDEV-24827: Follow-up patch to fix compilation warning
Mixed declarations and code is not allowed for C90 so fix it to avoid compilation break on some platforms.
Diffstat (limited to 'tests/mysql_client_test.c')
-rw-r--r--tests/mysql_client_test.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index acd9b61327b..69e451c3019 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -19967,6 +19967,9 @@ static void test_mdev24827()
int rc;
MYSQL_STMT *stmt;
unsigned long cursor = CURSOR_TYPE_READ_ONLY;
+ const char* query=
+ "SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 "
+ "WHERE EXISTS (SELECT 1 FROM t1 WHERE c2 = -1) ORDER BY c1";
myheader("test_mdev24827");
@@ -19991,10 +19994,6 @@ static void test_mdev24827()
"SELECT seq, seq FROM seq_1_to_20000");
myquery(rc);
- const char* query=
- "SELECT t2.c1 AS c1 FROM t1 LEFT JOIN t2 ON t1.c1 = t2.c1 "
- "WHERE EXISTS (SELECT 1 FROM t1 WHERE c2 = -1) ORDER BY c1";
-
stmt= mysql_stmt_init(mysql);
check_stmt(stmt);