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
02bacd81
Commit
02bacd81
authored
May 18, 2006
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test case for BUG#18037: Server crash when returning system
variable in stored procedures.
parent
ab9eadf2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
0 deletions
+76
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+30
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+46
-0
No files found.
mysql-test/r/sp.result
View file @
02bacd81
...
@@ -4960,4 +4960,34 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
...
@@ -4960,4 +4960,34 @@ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DROP FUNCTION bug18589_f1|
DROP FUNCTION bug18589_f1|
DROP PROCEDURE bug18589_p1|
DROP PROCEDURE bug18589_p1|
DROP PROCEDURE bug18589_p2|
DROP PROCEDURE bug18589_p2|
DROP FUNCTION IF EXISTS bug18037_f1|
DROP PROCEDURE IF EXISTS bug18037_p1|
DROP PROCEDURE IF EXISTS bug18037_p2|
CREATE FUNCTION bug18037_f1() RETURNS INT
BEGIN
RETURN @@server_id;
END|
CREATE PROCEDURE bug18037_p1()
BEGIN
DECLARE v INT DEFAULT @@server_id;
END|
CREATE PROCEDURE bug18037_p2()
BEGIN
CASE @@server_id
WHEN -1 THEN
SELECT 0;
ELSE
SELECT 1;
END CASE;
END|
SELECT bug18037_f1()|
bug18037_f1()
1
CALL bug18037_p1()|
CALL bug18037_p2()|
1
1
DROP FUNCTION bug18037_f1|
DROP PROCEDURE bug18037_p1|
DROP PROCEDURE bug18037_p2|
drop table t1,t2;
drop table t1,t2;
mysql-test/t/sp.test
View file @
02bacd81
...
@@ -5843,6 +5843,52 @@ DROP PROCEDURE bug18589_p1|
...
@@ -5843,6 +5843,52 @@ DROP PROCEDURE bug18589_p1|
DROP
PROCEDURE
bug18589_p2
|
DROP
PROCEDURE
bug18589_p2
|
#
# BUG#18037: Server crash when returning system variable in stored procedures
# BUG#19633: Stack corruption in fix_fields()/THD::rollback_item_tree_changes()
#
# Prepare.
--
disable_warnings
DROP
FUNCTION
IF
EXISTS
bug18037_f1
|
DROP
PROCEDURE
IF
EXISTS
bug18037_p1
|
DROP
PROCEDURE
IF
EXISTS
bug18037_p2
|
--
enable_warnings
# Test case.
CREATE
FUNCTION
bug18037_f1
()
RETURNS
INT
BEGIN
RETURN
@@
server_id
;
END
|
CREATE
PROCEDURE
bug18037_p1
()
BEGIN
DECLARE
v
INT
DEFAULT
@@
server_id
;
END
|
CREATE
PROCEDURE
bug18037_p2
()
BEGIN
CASE
@@
server_id
WHEN
-
1
THEN
SELECT
0
;
ELSE
SELECT
1
;
END
CASE
;
END
|
SELECT
bug18037_f1
()
|
CALL
bug18037_p1
()
|
CALL
bug18037_p2
()
|
# Cleanup.
DROP
FUNCTION
bug18037_f1
|
DROP
PROCEDURE
bug18037_p1
|
DROP
PROCEDURE
bug18037_p2
|
#
#
# BUG#NNNN: New bug synopsis
# BUG#NNNN: New bug synopsis
#
#
...
...
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