summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2004-04-30 00:00:54 +0400
committerunknown <sergefp@mysql.com>2004-04-30 00:00:54 +0400
commit242fe78d2b79d40862f8f979921831883e3ac1e4 (patch)
tree0c76ff65b77490d9d6eef4e5d593b9568d97b382 /tests
parent8033292dbb171c66281146c5f011e55282e3746c (diff)
parenta8dfb78df08772c2adda57376b4f689f0321b7b5 (diff)
downloadmariadb-git-242fe78d2b79d40862f8f979921831883e3ac1e4.tar.gz
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/dbdata/psergey/mysql-4.1-my-ps-bugs tests/client_test.c: Auto merged
Diffstat (limited to 'tests')
-rw-r--r--tests/client_test.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/client_test.c b/tests/client_test.c
index 77ae9044e18..7d7b21bd4bf 100644
--- a/tests/client_test.c
+++ b/tests/client_test.c
@@ -5009,6 +5009,34 @@ DROP TABLE IF EXISTS test_multi_tab";
mysql_close(mysql_local);
}
+/********************************************************
+* Check that Prepared statement cannot contain several *
+* SQL statements *
+*********************************************************/
+static void test_prepare_multi_statements()
+{
+ MYSQL *mysql_local;
+ MYSQL_STMT *stmt;
+ myheader("test_prepare_multi_statements");
+
+ if (!(mysql_local = mysql_init(NULL)))
+ {
+ fprintf(stdout,"\n mysql_init() failed");
+ exit(1);
+ }
+
+ if (!(mysql_real_connect(mysql_local,opt_host,opt_user,
+ opt_password, current_db, opt_port,
+ opt_unix_socket, CLIENT_MULTI_STATEMENTS)))
+ {
+ fprintf(stdout,"\n connection failed(%s)", mysql_error(mysql_local));
+ exit(1);
+ }
+ strmov(query, "select 1; select 'another value'");
+ stmt = mysql_simple_prepare(mysql_local,query);
+ mystmt_init_r(stmt);
+ mysql_close(mysql_local);
+}
/********************************************************
* to test simple bind store result *
@@ -6804,7 +6832,7 @@ static void test_explain_bug()
"","","",10,0);
verify_prepare_field(result,4,"possible_keys","",MYSQL_TYPE_VAR_STRING,
- "","","",NAME_LEN*32,0);
+ "","","",NAME_LEN*64,0);
verify_prepare_field(result,5,"key","",MYSQL_TYPE_VAR_STRING,
"","","",NAME_LEN,0);
@@ -9280,6 +9308,8 @@ int main(int argc, char **argv)
test_prepare_field_result(); /* prepare meta info */
test_multi_stmt(); /* multi stmt test */
test_multi_statements();/* test multi statement execution */
+ test_prepare_multi_statements(); /* check that multi statements are
+ disabled in PS */
test_store_result(); /* test the store_result */
test_store_result1(); /* test store result without buffers */
test_store_result2(); /* test store result for misc case */