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
89345986
Commit
89345986
authored
Feb 25, 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
parents
c5d4d50a
948bb77d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
0 deletions
+48
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+16
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+31
-0
sql/sp_head.cc
sql/sp_head.cc
+1
-0
No files found.
mysql-test/r/sp.result
View file @
89345986
...
...
@@ -2158,6 +2158,22 @@ call bug8116(42)|
userid
drop procedure bug8116|
drop table t3|
drop procedure if exists bug6857|
create procedure bug6857(counter int)
begin
declare t0, t1 int;
declare plus bool default 0;
set t0 = current_time();
while counter > 0 do
set counter = counter - 1;
end while;
set t1 = current_time();
if t1 > t0 then
set plus = 1;
end if;
select plus;
end|
drop procedure bug6857|
drop table if exists fac|
create table fac (n int unsigned not null primary key, f bigint unsigned)|
drop procedure if exists ifac|
...
...
mysql-test/t/sp.test
View file @
89345986
...
...
@@ -2645,6 +2645,37 @@ call bug8116(42)|
drop
procedure
bug8116
|
drop
table
t3
|
#
# BUG#6857: current_time() in STORED PROCEDURES
#
--
disable_warnings
drop
procedure
if
exists
bug6857
|
--
enable_warnings
create
procedure
bug6857
(
counter
int
)
begin
declare
t0
,
t1
int
;
declare
plus
bool
default
0
;
set
t0
=
current_time
();
while
counter
>
0
do
set
counter
=
counter
-
1
;
end
while
;
set
t1
=
current_time
();
if
t1
>
t0
then
set
plus
=
1
;
end
if
;
select
plus
;
end
|
# QQ: This is currently disabled. Not only does it slow down a normal test
# run, it makes running with valgrind (or similar tools) extremely
# painful.
# Make sure this takes at least one second on all machines in all builds.
# 30000 makes it about 3 seconds on an old 1.1GHz linux.
#call bug6857(300000)|
drop
procedure
bug6857
|
#
# Some "real" examples
...
...
sql/sp_head.cc
View file @
89345986
...
...
@@ -503,6 +503,7 @@ sp_head::execute(THD *thd)
if
(
i
==
NULL
)
break
;
DBUG_PRINT
(
"execute"
,
(
"Instruction %u"
,
ip
));
thd
->
set_time
();
// Make current_time() et al work
ret
=
i
->
execute
(
thd
,
&
ip
);
thd
->
rollback_item_tree_changes
();
if
(
i
->
free_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