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
ba7cd0b5
Commit
ba7cd0b5
authored
Apr 18, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0 sql/sql_yacc.yy: Auto merged
parents
d682dc43
58b0d7b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
2 deletions
+53
-2
mysql-test/r/sp.result
mysql-test/r/sp.result
+22
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+25
-0
sql/sql_yacc.yy
sql/sql_yacc.yy
+6
-2
No files found.
mysql-test/r/sp.result
View file @
ba7cd0b5
...
...
@@ -2936,4 +2936,26 @@ select @tmp1, @tmp2|
50 60
drop procedure bug9598_1|
drop procedure bug9598_2|
drop procedure if exists bug9902|
create function bug9902() returns int(11)
begin
set @x = @x + 1;
return @x;
end|
set @qcs1 = @@query_cache_size|
set global query_cache_size = 100000|
set @x = 1|
insert into t1 values ("qc", 42)|
select bug9902() from t1|
bug9902()
2
select bug9902() from t1|
bug9902()
3
select @x|
@x
3
set global query_cache_size = @qcs1|
delete from t1|
drop function bug9902|
drop table t1,t2;
mysql-test/t/sp.test
View file @
ba7cd0b5
...
...
@@ -3603,6 +3603,31 @@ drop procedure bug9598_1|
drop
procedure
bug9598_2
|
#
# BUG#9902: Crash with simple stored function using user defined variables
#
--
disable_warnings
drop
procedure
if
exists
bug9902
|
--
enable_warnings
create
function
bug9902
()
returns
int
(
11
)
begin
set
@
x
=
@
x
+
1
;
return
@
x
;
end
|
set
@
qcs1
=
@@
query_cache_size
|
set
global
query_cache_size
=
100000
|
set
@
x
=
1
|
insert
into
t1
values
(
"qc"
,
42
)
|
select
bug9902
()
from
t1
|
select
bug9902
()
from
t1
|
select
@
x
|
set
global
query_cache_size
=
@
qcs1
|
delete
from
t1
|
drop
function
bug9902
|
#
# BUG#NNNN: New bug synopsis
#
...
...
sql/sql_yacc.yy
View file @
ba7cd0b5
...
...
@@ -4597,14 +4597,16 @@ simple_expr:
{ $$= new Item_int((char*) "TRUE",1,1); }
| ident '.' ident '(' udf_expr_list ')'
{
LEX *lex= Lex;
sp_name *name= new sp_name($1, $3);
name->init_qname(YYTHD);
sp_add_to_hash(&
L
ex->spfuns, name);
sp_add_to_hash(&
l
ex->spfuns, name);
if ($5)
$$= new Item_func_sp(name, *$5);
else
$$= new Item_func_sp(name);
lex->safe_to_cache_query=0;
}
| IDENT_sys '(' udf_expr_list ')'
{
...
...
@@ -4685,13 +4687,15 @@ simple_expr:
else
#endif /* HAVE_DLOPEN */
{
LEX *lex= Lex;
sp_name *name= sp_name_current_db_new(YYTHD, $1);
sp_add_to_hash(&
L
ex->spfuns, name);
sp_add_to_hash(&
l
ex->spfuns, name);
if ($3)
$$= new Item_func_sp(name, *$3);
else
$$= new Item_func_sp(name);
lex->safe_to_cache_query=0;
}
}
| UNIQUE_USERS '(' text_literal ',' NUM ',' NUM ',' expr_list ')'
...
...
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