summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-09-07 16:44:18 +0200
committerunknown <msvensson@neptunus.(none)>2006-09-07 16:44:18 +0200
commit7f713ab402628ddbdf7a5024801d267b9ee7c078 (patch)
tree7044e2ed85855a805b74f1815d3ade1b459ce5ca /tests
parentbd8309cce6793352cebcf54459fa301eaab0b3b8 (diff)
downloadmariadb-git-7f713ab402628ddbdf7a5024801d267b9ee7c078.tar.gz
Bug#17039 Cursor with procedure crashes client
- Change 'get_unit_column_type" to return the field list for the procedure sql/sql_union.cc: Change 'get_unit_column_type' to return the procedure field list if this is the execution of a procedure. tests/mysql_client_test.c: Add test case for using "procedure" in cursor.
Diffstat (limited to 'tests')
-rw-r--r--tests/mysql_client_test.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index 5ee63cb8738..15be89ca760 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -11931,6 +11931,19 @@ static void test_cursors_with_union()
fetch_n(queries, sizeof(queries)/sizeof(*queries), USE_STORE_RESULT);
}
+
+static void test_cursors_with_procedure()
+{
+ const char *queries[]=
+ {
+ "SELECT * FROM t1 procedure analyse()"
+ };
+ myheader("test_cursors_with_procedure");
+ fetch_n(queries, sizeof(queries)/sizeof(*queries), USE_ROW_BY_ROW_FETCH);
+ fetch_n(queries, sizeof(queries)/sizeof(*queries), USE_STORE_RESULT);
+}
+
+
/*
Altough mysql_create_db(), mysql_rm_db() are deprecated since 4.0 they
should not crash server and should not hang in case of errors.
@@ -15297,6 +15310,7 @@ static struct my_tests_st my_tests[]= {
{ "test_view_insert_fields", test_view_insert_fields },
{ "test_basic_cursors", test_basic_cursors },
{ "test_cursors_with_union", test_cursors_with_union },
+ { "test_cursors_with_procedure", test_cursors_with_procedure },
{ "test_truncation", test_truncation },
{ "test_truncation_option", test_truncation_option },
{ "test_client_character_set", test_client_character_set },