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
2df4914e
Commit
2df4914e
authored
Aug 24, 2005
by
petr@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test for a bug to use correct tables
parent
5d736f10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
32 deletions
+34
-32
mysql-test/r/sp.result
mysql-test/r/sp.result
+17
-16
mysql-test/t/sp.test
mysql-test/t/sp.test
+17
-16
No files found.
mysql-test/r/sp.result
View file @
2df4914e
...
...
@@ -3101,16 +3101,16 @@ call p_bug11247(10)|
drop function f_bug11247|
drop procedure p_bug11247|
drop procedure if exists bug12168|
drop table if exists t
1, t2
|
create table t
1
(a int)|
insert into t
1
values (1),(2),(3),(4)|
create table t
2
(a int)|
drop table if exists t
3, t4
|
create table t
3
(a int)|
insert into t
3
values (1),(2),(3),(4)|
create table t
4
(a int)|
create procedure bug12168(arg1 char(1))
begin
declare b, c integer;
if arg1 = 'a' then
begin
declare c1 cursor for select a from t
1
where a % 2;
declare c1 cursor for select a from t
3
where a % 2;
declare continue handler for not found set b = 1;
set b = 0;
open c1;
...
...
@@ -3119,14 +3119,14 @@ fetch c1 into c;
if (b = 1) then
leave c1_repeat;
end if;
insert into t
2
values (c);
insert into t
4
values (c);
until b = 1
end repeat;
end;
end if;
if arg1 = 'b' then
begin
declare c2 cursor for select a from t
1
where not a % 2;
declare c2 cursor for select a from t
3
where not a % 2;
declare continue handler for not found set b = 1;
set b = 0;
open c2;
...
...
@@ -3135,35 +3135,36 @@ fetch c2 into c;
if (b = 1) then
leave c2_repeat;
end if;
insert into t
2
values (c);
insert into t
4
values (c);
until b = 1
end repeat;
end;
end if;
end|
call bug12168('a')|
select * from t
2
|
select * from t
4
|
a
1
3
truncate t
2
|
truncate t
4
|
call bug12168('b')|
select * from t
2
|
select * from t
4
|
a
2
4
truncate t
2
|
truncate t
4
|
call bug12168('a')|
select * from t
2
|
select * from t
4
|
a
1
3
truncate t
2
|
truncate t
4
|
call bug12168('b')|
select * from t
2
|
select * from t
4
|
a
2
4
truncate t2|
truncate t4|
drop table t3, t4|
drop procedure if exists bug12168|
drop table t1,t2;
mysql-test/t/sp.test
View file @
2df4914e
...
...
@@ -3934,20 +3934,20 @@ drop procedure p_bug11247|
#
--
disable_warnings
drop
procedure
if
exists
bug12168
|
drop
table
if
exists
t
1
,
t2
|
drop
table
if
exists
t
3
,
t4
|
--
enable_warnings
create
table
t
1
(
a
int
)
|
insert
into
t
1
values
(
1
),(
2
),(
3
),(
4
)
|
create
table
t
3
(
a
int
)
|
insert
into
t
3
values
(
1
),(
2
),(
3
),(
4
)
|
create
table
t
2
(
a
int
)
|
create
table
t
4
(
a
int
)
|
create
procedure
bug12168
(
arg1
char
(
1
))
begin
declare
b
,
c
integer
;
if
arg1
=
'a'
then
begin
declare
c1
cursor
for
select
a
from
t
1
where
a
%
2
;
declare
c1
cursor
for
select
a
from
t
3
where
a
%
2
;
declare
continue
handler
for
not
found
set
b
=
1
;
set
b
=
0
;
open
c1
;
...
...
@@ -3957,14 +3957,14 @@ begin
leave
c1_repeat
;
end
if
;
insert
into
t
2
values
(
c
);
insert
into
t
4
values
(
c
);
until
b
=
1
end
repeat
;
end
;
end
if
;
if
arg1
=
'b'
then
begin
declare
c2
cursor
for
select
a
from
t
1
where
not
a
%
2
;
declare
c2
cursor
for
select
a
from
t
3
where
not
a
%
2
;
declare
continue
handler
for
not
found
set
b
=
1
;
set
b
=
0
;
open
c2
;
...
...
@@ -3974,7 +3974,7 @@ begin
leave
c2_repeat
;
end
if
;
insert
into
t
2
values
(
c
);
insert
into
t
4
values
(
c
);
until
b
=
1
end
repeat
;
end
;
...
...
@@ -3982,17 +3982,18 @@ begin
end
|
call
bug12168
(
'a'
)
|
select
*
from
t
2
|
truncate
t
2
|
select
*
from
t
4
|
truncate
t
4
|
call
bug12168
(
'b'
)
|
select
*
from
t
2
|
truncate
t
2
|
select
*
from
t
4
|
truncate
t
4
|
call
bug12168
(
'a'
)
|
select
*
from
t
2
|
truncate
t
2
|
select
*
from
t
4
|
truncate
t
4
|
call
bug12168
(
'b'
)
|
select
*
from
t2
|
truncate
t2
|
select
*
from
t4
|
truncate
t4
|
drop
table
t3
,
t4
|
drop
procedure
if
exists
bug12168
|
#
...
...
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