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
10d2528a
Commit
10d2528a
authored
Mar 23, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge aelkin@bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
into andrepl.(none):/home/elkin/MySQL/MAIN/mysql-5.0-marvel
parents
bd49d8de
df3a48ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
1 deletion
+52
-1
mysql-test/r/sp.result
mysql-test/r/sp.result
+25
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+24
-0
sql/item_func.h
sql/item_func.h
+3
-1
No files found.
mysql-test/r/sp.result
View file @
10d2528a
...
...
@@ -5779,3 +5779,28 @@ SUM(f2) bug25373(f1)
DROP FUNCTION bug25373|
DROP TABLE t3|
drop table t1,t2;
CREATE TABLE t1 (a int auto_increment primary key) engine=MyISAM;
CREATE TABLE t2 (a int auto_increment primary key, b int) engine=innodb;
set @a=0;
CREATE function bug27354() RETURNS int deterministic
begin
insert into t1 values (null);
set @a=@a+1;
return @a;
end|
update t2 set b=1 where a=bug27354();
select count(t_1.a),count(t_2.a) from t1 as t_1, t2 as t_2 /* must be 0,0 */;
count(t_1.a) count(t_2.a)
0 0
insert into t2 values (1,1),(2,2),(3,3);
update t2 set b=-b where a=bug27354();
select * from t2 /* must return 1,-1 ... */;
a b
1 -1
2 -2
3 -3
select count(*) from t1 /* must be 3 */;
count(*)
3
drop table t1,t2;
drop function bug27354;
mysql-test/t/sp.test
View file @
10d2528a
...
...
@@ -6770,3 +6770,27 @@ DROP TABLE t3|
# practical, or create table t3, t4 etc temporarily (and drop them).
delimiter
;
|
drop
table
t1
,
t2
;
CREATE
TABLE
t1
(
a
int
auto_increment
primary
key
)
engine
=
MyISAM
;
CREATE
TABLE
t2
(
a
int
auto_increment
primary
key
,
b
int
)
engine
=
innodb
;
set
@
a
=
0
;
delimiter
|
;
CREATE
function
bug27354
()
RETURNS
int
deterministic
begin
insert
into
t1
values
(
null
);
set
@
a
=@
a
+
1
;
return
@
a
;
end
|
delimiter
;
|
update
t2
set
b
=
1
where
a
=
bug27354
();
select
count
(
t_1
.
a
),
count
(
t_2
.
a
)
from
t1
as
t_1
,
t2
as
t_2
/* must be 0,0 */
;
insert
into
t2
values
(
1
,
1
),(
2
,
2
),(
3
,
3
);
update
t2
set
b
=-
b
where
a
=
bug27354
();
select
*
from
t2
/* must return 1,-1 ... */
;
select
count
(
*
)
from
t1
/* must be 3 */
;
drop
table
t1
,
t2
;
drop
function
bug27354
;
sql/item_func.h
View file @
10d2528a
...
...
@@ -1411,7 +1411,7 @@ class Item_func_sp :public Item_func
bool
execute
(
Field
**
flp
);
bool
execute_impl
(
THD
*
thd
,
Field
*
return_value_fld
);
Field
*
sp_result_field
(
void
)
const
;
public:
Item_func_sp
(
Name_resolution_context
*
context_arg
,
sp_name
*
name
);
...
...
@@ -1422,6 +1422,8 @@ class Item_func_sp :public Item_func
virtual
~
Item_func_sp
()
{}
table_map
used_tables
()
const
{
return
RAND_TABLE_BIT
;
}
void
cleanup
();
const
char
*
func_name
()
const
;
...
...
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