summaryrefslogtreecommitdiff
path: root/mysql-test/r/sp-error.result
diff options
context:
space:
mode:
authorkonstantin@mysql.com <>2005-09-03 03:13:18 +0400
committerkonstantin@mysql.com <>2005-09-03 03:13:18 +0400
commit38486e83c1ee11abb7c52ea6a215960aca0c92a8 (patch)
tree981df38c4f1f46f7080926e10ff505778048f4af /mysql-test/r/sp-error.result
parenta3ddcdf8fbf2058eeae6d7db7f1dc99785329d7b (diff)
downloadmariadb-git-38486e83c1ee11abb7c52ea6a215960aca0c92a8.tar.gz
Implement WL#2661 "Prepared Statements: Dynamic SQL in Stored Procedures".
The idea of the patch is to separate statement processing logic, such as parsing, validation of the parsed tree, execution and cleanup, from global query processing logic, such as logging, resetting priorities of a thread, resetting stored procedure cache, resetting thread count of errors and warnings. This makes PREPARE and EXECUTE behave similarly to the rest of SQL statements and allows their use in stored procedures. This patch contains a change in behaviour: until recently for each SQL prepared statement command, 2 queries were written to the general log, e.g. [Query] prepare stmt from @stmt_text; [Prepare] select * from t1 <-- contents of @stmt_text The chagne was necessary to prevent [Prepare] commands from being written to the general log when executing a stored procedure with Dynamic SQL. We should consider whether the old behavior is preferrable and probably restore it. This patch refixes Bug#7115, Bug#10975 (partially), Bug#10605 (various bugs in Dynamic SQL reported before it was disabled).
Diffstat (limited to 'mysql-test/r/sp-error.result')
-rw-r--r--mysql-test/r/sp-error.result16
1 files changed, 1 insertions, 15 deletions
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index 23644f57353..61e931e146c 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -618,7 +618,7 @@ select * from t1|
call bug8408_p()|
val x
select bug8408_f()|
-ERROR 0A000: PROCEDURE test.bug8408_p can't return a result set in the given context
+ERROR 0A000: Not allowed to return a result set from a function
drop procedure bug8408_p|
drop function bug8408_f|
create function bug8408() returns int
@@ -665,20 +665,6 @@ select default(t30.s1) from t30;
end|
drop procedure bug10969|
drop table t1|
-prepare stmt from "select 1";
-create procedure p() deallocate prepare stmt;
-ERROR 0A000: DEALLOCATE is not allowed in stored procedures
-create function f() returns int begin deallocate prepare stmt;
-ERROR 0A000: DEALLOCATE is not allowed in stored procedures
-create procedure p() prepare stmt from "select 1";
-ERROR 0A000: PREPARE is not allowed in stored procedures
-create function f() returns int begin prepare stmt from "select 1";
-ERROR 0A000: PREPARE is not allowed in stored procedures
-create procedure p() execute stmt;
-ERROR 0A000: EXECUTE is not allowed in stored procedures
-create function f() returns int begin execute stmt;
-ERROR 0A000: EXECUTE is not allowed in stored procedures
-deallocate prepare stmt;
create table t1(f1 int);
create table t2(f1 int);
CREATE PROCEDURE SP001()