diff options
Diffstat (limited to 'mysql-test/main/ps.test')
-rw-r--r-- | mysql-test/main/ps.test | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/mysql-test/main/ps.test b/mysql-test/main/ps.test index 837fa6f2b6e..5933aea4a03 100644 --- a/mysql-test/main/ps.test +++ b/mysql-test/main/ps.test @@ -37,15 +37,11 @@ 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: prepare stmt2 from 'prepare nested_stmt from "select 1"'; - ---error ER_UNSUPPORTED_PS prepare stmt2 from 'execute stmt1'; - ---error ER_UNSUPPORTED_PS prepare stmt2 from 'deallocate prepare z'; +deallocate prepare stmt2; # PS insert prepare stmt3 from 'insert into t1 values (?,?)'; @@ -2763,12 +2759,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 +2782,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 +2803,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; @@ -4199,16 +4193,12 @@ EXECUTE IMMEDIATE 'SELECT 1' USING @a; --error ER_WRONG_ARGUMENTS EXECUTE IMMEDIATE 'SELECT ?'; ---error ER_UNSUPPORTED_PS EXECUTE IMMEDIATE 'EXECUTE IMMEDIATE "SELECT 1"'; ---error ER_UNSUPPORTED_PS EXECUTE IMMEDIATE 'PREPARE stmt FROM "SELECT 1"'; ---error ER_UNSUPPORTED_PS EXECUTE IMMEDIATE 'EXECUTE stmt'; ---error ER_UNSUPPORTED_PS EXECUTE IMMEDIATE 'DEALLOCATE PREPARE stmt'; --error ER_CANT_AGGREGATE_2COLLATIONS @@ -4414,7 +4404,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 |