Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
207ac749
Commit
207ac749
authored
Jun 09, 2005
by
dlenev@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-bgmd
parents
fae0b7f7
9b2e653a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
0 deletions
+50
-0
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+14
-0
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+21
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+15
-0
No files found.
mysql-test/r/sp-error.result
View file @
207ac749
...
...
@@ -672,3 +672,17 @@ 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;
mysql-test/t/sp-error.test
View file @
207ac749
...
...
@@ -965,3 +965,24 @@ drop procedure bug10969|
drop
table
t1
|
delimiter
;
|
#
# Bug#10975, #10605, #7115: Dynamic SQL by means of
# PREPARE/EXECUTE/DEALLOCATE is not supported yet.
# Check that an error message is returned.
#
prepare
stmt
from
"select 1"
;
--
error
ER_SP_BADSTATEMENT
create
procedure
p
()
deallocate
prepare
stmt
;
--
error
ER_SP_BADSTATEMENT
create
function
f
()
returns
int
begin
deallocate
prepare
stmt
;
--
error
ER_SP_BADSTATEMENT
create
procedure
p
()
prepare
stmt
from
"select 1"
;
--
error
ER_SP_BADSTATEMENT
create
function
f
()
returns
int
begin
prepare
stmt
from
"select 1"
;
--
error
ER_SP_BADSTATEMENT
create
procedure
p
()
execute
stmt
;
--
error
ER_SP_BADSTATEMENT
create
function
f
()
returns
int
begin
execute
stmt
;
deallocate
prepare
stmt
;
sql/sql_yacc.yy
View file @
207ac749
...
...
@@ -919,6 +919,11 @@ deallocate:
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
}
if (lex->sphead)
{
my_error(ER_SP_BADSTATEMENT, MYF(0), "DEALLOCATE");
YYABORT;
}
lex->sql_command= SQLCOM_DEALLOCATE_PREPARE;
lex->prepared_stmt_name= $3;
};
...
...
@@ -939,6 +944,11 @@ prepare:
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
}
if (lex->sphead)
{
my_error(ER_SP_BADSTATEMENT, MYF(0), "PREPARE");
YYABORT;
}
lex->sql_command= SQLCOM_PREPARE;
lex->prepared_stmt_name= $2;
};
...
...
@@ -969,6 +979,11 @@ execute:
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
}
if (lex->sphead)
{
my_error(ER_SP_BADSTATEMENT, MYF(0), "EXECUTE");
YYABORT;
}
lex->sql_command= SQLCOM_EXECUTE;
lex->prepared_stmt_name= $2;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment