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
3dce5fa4
Commit
3dce5fa4
authored
May 07, 2005
by
antony@ltantony.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0
into ltantony.mysql.com:/usr/home/antony/work2/megapatch-5.0
parents
4fe845e8
25cf90ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
7 deletions
+28
-7
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+12
-4
mysql-test/t/sp.test
mysql-test/t/sp.test
+15
-3
No files found.
BitKeeper/etc/logging_ok
View file @
3dce5fa4
...
@@ -115,6 +115,7 @@ jcole@sarvik.tfr.cafe.ee
...
@@ -115,6 +115,7 @@ jcole@sarvik.tfr.cafe.ee
jcole@tetra.spaceapes.com
jcole@tetra.spaceapes.com
jimw@mysql.com
jimw@mysql.com
joerg@mysql.com
joerg@mysql.com
joerg@trift-lap.fambruehe
jon@gigan.
jon@gigan.
jonas@mysql.com
jonas@mysql.com
joreland@bk-internal.mysql.com
joreland@bk-internal.mysql.com
...
...
mysql-test/r/sp.result
View file @
3dce5fa4
...
@@ -1404,11 +1404,10 @@ show procedure status like '%p%'|
...
@@ -1404,11 +1404,10 @@ show procedure status like '%p%'|
Db Name Type Definer Modified Created Security_type Comment
Db Name Type Definer Modified Created Security_type Comment
drop table if exists fib|
drop table if exists fib|
create table fib ( f bigint unsigned not null )|
create table fib ( f bigint unsigned not null )|
insert into fib values (1), (1)|
drop procedure if exists fib|
drop procedure if exists fib|
create procedure fib(n int unsigned)
create procedure fib(n int unsigned)
begin
begin
if n >
0
then
if n >
1
then
begin
begin
declare x, y bigint unsigned;
declare x, y bigint unsigned;
declare c cursor for select f from fib order by f desc limit 2;
declare c cursor for select f from fib order by f desc limit 2;
...
@@ -1421,9 +1420,20 @@ call fib(n-1);
...
@@ -1421,9 +1420,20 @@ call fib(n-1);
end;
end;
end if;
end if;
end|
end|
insert into fib values (0), (1)|
call fib(3)|
select * from fib order by f asc|
f
0
1
1
2
delete from fib|
insert into fib values (0), (1)|
call fib(20)|
call fib(20)|
select * from fib order by f asc|
select * from fib order by f asc|
f
f
0
1
1
1
1
2
2
...
@@ -1444,8 +1454,6 @@ f
...
@@ -1444,8 +1454,6 @@ f
2584
2584
4181
4181
6765
6765
10946
17711
drop table fib|
drop table fib|
drop procedure fib|
drop procedure fib|
drop procedure if exists bar|
drop procedure if exists bar|
...
...
mysql-test/t/sp.test
View file @
3dce5fa4
...
@@ -1634,8 +1634,6 @@ drop table if exists fib|
...
@@ -1634,8 +1634,6 @@ drop table if exists fib|
--
enable_warnings
--
enable_warnings
create
table
fib
(
f
bigint
unsigned
not
null
)
|
create
table
fib
(
f
bigint
unsigned
not
null
)
|
insert
into
fib
values
(
1
),
(
1
)
|
# We deliberately do it the awkward way, fetching the last two
# We deliberately do it the awkward way, fetching the last two
# values from the table, in order to exercise various statements
# values from the table, in order to exercise various statements
# and table accesses at each turn.
# and table accesses at each turn.
...
@@ -1644,7 +1642,7 @@ drop procedure if exists fib|
...
@@ -1644,7 +1642,7 @@ drop procedure if exists fib|
--
enable_warnings
--
enable_warnings
create
procedure
fib
(
n
int
unsigned
)
create
procedure
fib
(
n
int
unsigned
)
begin
begin
if
n
>
0
then
if
n
>
1
then
begin
begin
declare
x
,
y
bigint
unsigned
;
declare
x
,
y
bigint
unsigned
;
declare
c
cursor
for
select
f
from
fib
order
by
f
desc
limit
2
;
declare
c
cursor
for
select
f
from
fib
order
by
f
desc
limit
2
;
...
@@ -1659,6 +1657,20 @@ begin
...
@@ -1659,6 +1657,20 @@ begin
end
if
;
end
if
;
end
|
end
|
# Minimum test: recursion of 3 levels
insert
into
fib
values
(
0
),
(
1
)
|
call
fib
(
3
)
|
select
*
from
fib
order
by
f
asc
|
delete
from
fib
|
# Original test: 20 levels (may run into memory limits!)
insert
into
fib
values
(
0
),
(
1
)
|
call
fib
(
20
)
|
call
fib
(
20
)
|
select
*
from
fib
order
by
f
asc
|
select
*
from
fib
order
by
f
asc
|
...
...
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