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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
60534415
Commit
60534415
authored
Oct 12, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/usr/home/pem/bug13510/mysql-5.0
parents
efd99d95
71c89622
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
0 deletions
+116
-0
mysql-test/r/sp-error.result
mysql-test/r/sp-error.result
+38
-0
mysql-test/t/sp-error.test
mysql-test/t/sp-error.test
+53
-0
sql/share/errmsg.txt
sql/share/errmsg.txt
+2
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+23
-0
No files found.
mysql-test/r/sp-error.result
View file @
60534415
...
...
@@ -834,3 +834,41 @@ ERROR HY000: Not allowed to set autocommit from a stored function or trigger
create trigger bug12712
before insert on t1 for each row set session autocommit = 0;
ERROR HY000: Not allowed to set autocommit from a stored function or trigger
drop procedure if exists bug13510_1|
drop procedure if exists bug13510_2|
drop procedure if exists bug13510_3|
drop procedure if exists bug13510_4|
create procedure bug13510_1()
begin
declare password varchar(10);
set password = 'foo1';
select password;
end|
ERROR 42000: Variable 'password' must be quoted with `...`, or renamed
create procedure bug13510_2()
begin
declare names varchar(10);
set names = 'foo2';
select names;
end|
ERROR 42000: Variable 'names' must be quoted with `...`, or renamed
create procedure bug13510_3()
begin
declare password varchar(10);
set `password` = 'foo3';
select password;
end|
create procedure bug13510_4()
begin
declare names varchar(10);
set `names` = 'foo4';
select names;
end|
call bug13510_3()|
password
foo3
call bug13510_4()|
names
foo4
drop procedure bug13510_3|
drop procedure bug13510_4|
mysql-test/t/sp-error.test
View file @
60534415
...
...
@@ -1212,6 +1212,59 @@ call bug9367();
drop
procedure
bug9367
;
drop
table
t1
;
--
enable_parsing
#
# BUG#13510: Setting password local variable changes current password
#
delimiter
|
;
--
disable_warnings
drop
procedure
if
exists
bug13510_1
|
drop
procedure
if
exists
bug13510_2
|
drop
procedure
if
exists
bug13510_3
|
drop
procedure
if
exists
bug13510_4
|
--
enable_warnings
--
error
ER_SP_BAD_VAR_SHADOW
create
procedure
bug13510_1
()
begin
declare
password
varchar
(
10
);
set
password
=
'foo1'
;
select
password
;
end
|
--
error
ER_SP_BAD_VAR_SHADOW
create
procedure
bug13510_2
()
begin
declare
names
varchar
(
10
);
set
names
=
'foo2'
;
select
names
;
end
|
create
procedure
bug13510_3
()
begin
declare
password
varchar
(
10
);
set
`password`
=
'foo3'
;
select
password
;
end
|
create
procedure
bug13510_4
()
begin
declare
names
varchar
(
10
);
set
`names`
=
'foo4'
;
select
names
;
end
|
call
bug13510_3
()
|
call
bug13510_4
()
|
drop
procedure
bug13510_3
|
drop
procedure
bug13510_4
|
delimiter
;
|
#
# BUG#NNNN: New bug synopsis
#
...
...
sql/share/errmsg.txt
View file @
60534415
...
...
@@ -5420,3 +5420,5 @@ ER_ROW_IS_REFERENCED_2 23000
eng "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)"
ER_NO_REFERENCED_ROW_2 23000
eng "Cannot add or update a child row: a foreign key constraint fails (%.192s)"
ER_SP_BAD_VAR_SHADOW 42000
eng "Variable '%-.64s' must be quoted with `...`, or renamed"
sql/sql_yacc.yy
View file @
60534415
...
...
@@ -7992,6 +7992,18 @@ option_value:
$2= $2 ? $2: global_system_variables.character_set_client;
lex->var_list.push_back(new set_var_collation_client($2,thd->variables.collation_database,$2));
}
| NAMES_SYM equal expr
{
LEX *lex= Lex;
sp_pcontext *spc= lex->spcont;
LEX_STRING names;
names.str= (char *)"names";
names.length= 5;
if (spc && spc->find_pvar(&names))
my_error(ER_SP_BAD_VAR_SHADOW, MYF(0), names.str);
YYABORT;
}
| NAMES_SYM charset_name_or_default opt_collate
{
LEX *lex= Lex;
...
...
@@ -8009,6 +8021,17 @@ option_value:
{
THD *thd=YYTHD;
LEX_USER *user;
LEX *lex= Lex;
sp_pcontext *spc= lex->spcont;
LEX_STRING pw;
pw.str= (char *)"password";
pw.length= 8;
if (spc && spc->find_pvar(&pw))
{
my_error(ER_SP_BAD_VAR_SHADOW, MYF(0), pw.str);
YYABORT;
}
if (!(user=(LEX_USER*) thd->alloc(sizeof(LEX_USER))))
YYABORT;
user->host=null_lex_str;
...
...
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