summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2017-02-02 12:09:49 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-12 13:10:48 +0100
commit01c49e66b559d311725ff4c0d86592c3c9eaa58d (patch)
tree64ec1b8e35440ecc8f0ffa9a93f41b69115a73a4 /tests
parent32de60bb2e9f06b24c76fc41bef81e35c14ca528 (diff)
downloadmariadb-git-01c49e66b559d311725ff4c0d86592c3c9eaa58d.tar.gz
MDEV-11966: Impossible to execute prepared ANALYZE SELECT
Prepare os ANALYZE now respond as EXPLAIN.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index b63bcbaa037..350da29e67f 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -19479,6 +19479,25 @@ static void test_big_packet()
}
+/* Test simple prepares of all DML statements */
+
+static void test_prepare_analyze()
+{
+ MYSQL_STMT *stmt;
+ int rc;
+ myheader("test_prepare_analyze");
+
+ stmt= mysql_stmt_init(mysql);
+ check_stmt(stmt);
+ rc= mysql_stmt_prepare(stmt, STRING_WITH_LEN("ANALYZE SELECT 1"));
+ check_execute(stmt, rc);
+ verify_param_count(stmt, 0);
+ rc= mysql_stmt_execute(stmt);
+ check_execute(stmt, rc);
+
+ mysql_stmt_close(stmt);
+}
+
static struct my_tests_st my_tests[]= {
{ "disable_query_logs", disable_query_logs },
{ "test_view_sp_list_fields", test_view_sp_list_fields },
@@ -19755,6 +19774,7 @@ static struct my_tests_st my_tests[]= {
#endif
{ "test_compressed_protocol", test_compressed_protocol },
{ "test_big_packet", test_big_packet },
+ { "test_prepare_analyze", test_prepare_analyze },
{ 0, 0 }
};