summaryrefslogtreecommitdiff
path: root/mysql-test/main/ps.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/ps.test')
-rw-r--r--mysql-test/main/ps.test29
1 files changed, 15 insertions, 14 deletions
diff --git a/mysql-test/main/ps.test b/mysql-test/main/ps.test
index e260803a8d3..bb6ce7d4048 100644
--- a/mysql-test/main/ps.test
+++ b/mysql-test/main/ps.test
@@ -37,14 +37,12 @@ deallocate prepare no_such_statement;
--error 1210
execute stmt1;
-# Nesting ps commands is not allowed:
---error ER_UNSUPPORTED_PS
+# Nesting ps commands is now allowed:
+--error ER_UNSUPPORTED_PS
prepare stmt2 from 'prepare nested_stmt from "select 1"';
-
---error ER_UNSUPPORTED_PS
+--error ER_UNSUPPORTED_PS
prepare stmt2 from 'execute stmt1';
-
---error ER_UNSUPPORTED_PS
+--error ER_UNSUPPORTED_PS
prepare stmt2 from 'deallocate prepare z';
# PS insert
@@ -2763,12 +2761,11 @@ delimiter ;|
select func_1(), func_1(), func_1() from dual;
--error ER_SP_DOES_NOT_EXIST
drop function func_1;
---error ER_UNSUPPORTED_PS
+
+# CREATE EVENT is now supported by prepared statements
prepare abc from "create event xyz on schedule at now() do select 123";
---error ER_UNKNOWN_STMT_HANDLER
deallocate prepare abc;
-
--disable_warnings
drop event if exists xyz;
create event xyz on schedule every 5 minute disable do select 123;
@@ -2787,9 +2784,9 @@ delimiter |;
--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin alter event xyz comment 'xyz'; return 1; end|
delimiter ;|
---error ER_UNSUPPORTED_PS
+
+# ALTER EVENT is now supported by prepared statements
prepare abc from "alter event xyz comment 'xyz'";
---error ER_UNKNOWN_STMT_HANDLER
deallocate prepare abc;
@@ -2808,9 +2805,8 @@ delimiter |;
--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
create function func_1() returns int begin drop event xyz; return 1; end|
delimiter ;|
---error ER_UNSUPPORTED_PS
+# DROP EVENT is now supported by prepared statements
prepare abc from "drop event xyz";
---error ER_UNKNOWN_STMT_HANDLER
deallocate prepare abc;
@@ -4414,7 +4410,12 @@ EXECUTE IMMEDIATE CONCAT(NULL);
--error ER_PARSE_ERROR
PREPARE stmt FROM CONCAT(NULL);
---error ER_PARSE_ERROR
+# Expects any of the following errors CR_PARAMS_NOT_BOUND, ER_PARSE_ERROR.
+# ER_PARSE_ERROR is generated in case the EXECUTE IMMEDIATE statement
+# is sent as a regular statement via text protocol. The error
+# CR_PARAMS_NOT_BOUND is generated by the MySQL API function mysql_stmt_execute
+# when this test file is run with the option --ps-protocol
+--error 2031,ER_PARSE_ERROR
EXECUTE IMMEDIATE ? USING 'SELECT 1';
--error ER_PARSE_ERROR