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
58d0b0ea
Commit
58d0b0ea
authored
Feb 02, 2003
by
pem@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added another select into test.
parent
44390c8c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
18 deletions
+39
-18
mysql-test/r/sp.result
mysql-test/r/sp.result
+20
-11
mysql-test/t/sp.test
mysql-test/t/sp.test
+19
-7
No files found.
mysql-test/r/sp.result
View file @
58d0b0ea
...
@@ -137,14 +137,17 @@ insert into test.t1 values ("h1", x);
...
@@ -137,14 +137,17 @@ insert into test.t1 values ("h1", x);
else
else
insert into test.t1 values ("h?", x);
insert into test.t1 values ("h?", x);
end case;
end case;
create procedure into_test()
create procedure into_test(x char(16), y int)
begin
insert into test.t1 values (x, y);
select id,data into x,y from test.t1 limit 1;
insert into test.t1 values (concat(x, "2"), y+2);
end;
create procedure into_test2(x char(16), y int)
begin
begin
declare x char(16);
declare y int;
set x="aaaaa";
set y=22;
select id,data into x,y from test.t1 limit 2,1;
insert into test.t1 values (x, y);
insert into test.t1 values (x, y);
select id,data into x,@z from test.t1 limit 1;
insert into test.t1 values (concat(x, "2"), y+2);
end;
end;
call foo42();
call foo42();
select * from t1;
select * from t1;
...
@@ -258,13 +261,18 @@ id data
...
@@ -258,13 +261,18 @@ id data
h0 0
h0 0
h1 1
h1 1
h? 17
h? 17
call into_test();
delete from t1;
call into_test("into", 100);
select * from t1;
select * from t1;
id data
id data
h0 0
into 100
h1 1
into2 102
h? 17
delete from t1;
h? 17
call into_test2("into", 100);
select id,data,@z from t1;
id data @z
into 100 100
into2 102 100
delete from t1;
delete from t1;
drop procedure foo42;
drop procedure foo42;
drop procedure bar;
drop procedure bar;
...
@@ -288,4 +296,5 @@ drop procedure f;
...
@@ -288,4 +296,5 @@ drop procedure f;
drop procedure g;
drop procedure g;
drop procedure h;
drop procedure h;
drop procedure into_test;
drop procedure into_test;
drop procedure into_test2;
drop table t1;
drop table t1;
mysql-test/t/sp.test
View file @
58d0b0ea
...
@@ -205,14 +205,19 @@ else
...
@@ -205,14 +205,19 @@ else
insert
into
test
.
t1
values
(
"h?"
,
x
);
insert
into
test
.
t1
values
(
"h?"
,
x
);
end
case
|
end
case
|
create
procedure
into_test
()
create
procedure
into_test
(
x
char
(
16
),
y
int
)
begin
insert
into
test
.
t1
values
(
x
,
y
);
select
id
,
data
into
x
,
y
from
test
.
t1
limit
1
;
insert
into
test
.
t1
values
(
concat
(
x
,
"2"
),
y
+
2
);
end
|
# Test INTO with a mix of local and global variables
create
procedure
into_test2
(
x
char
(
16
),
y
int
)
begin
begin
declare
x
char
(
16
);
declare
y
int
;
set
x
=
"aaaaa"
;
set
y
=
22
;
select
id
,
data
into
x
,
y
from
test
.
t1
limit
2
,
1
;
insert
into
test
.
t1
values
(
x
,
y
);
insert
into
test
.
t1
values
(
x
,
y
);
select
id
,
data
into
x
,
@
z
from
test
.
t1
limit
1
;
insert
into
test
.
t1
values
(
concat
(
x
,
"2"
),
y
+
2
);
end
|
end
|
delimiter
;
|
delimiter
;
|
...
@@ -291,10 +296,16 @@ call h(0);
...
@@ -291,10 +296,16 @@ call h(0);
call
h
(
1
);
call
h
(
1
);
call
h
(
17
);
call
h
(
17
);
select
*
from
t1
;
select
*
from
t1
;
call
into_test
();
delete
from
t1
;
call
into_test
(
"into"
,
100
);
select
*
from
t1
;
select
*
from
t1
;
delete
from
t1
;
delete
from
t1
;
call
into_test2
(
"into"
,
100
);
select
id
,
data
,
@
z
from
t1
;
delete
from
t1
;
drop
procedure
foo42
;
drop
procedure
foo42
;
drop
procedure
bar
;
drop
procedure
bar
;
drop
procedure
two
;
drop
procedure
two
;
...
@@ -317,5 +328,6 @@ drop procedure f;
...
@@ -317,5 +328,6 @@ drop procedure f;
drop
procedure
g
;
drop
procedure
g
;
drop
procedure
h
;
drop
procedure
h
;
drop
procedure
into_test
;
drop
procedure
into_test
;
drop
procedure
into_test2
;
drop
table
t1
;
drop
table
t1
;
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