mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 23:04:20 +01:00
Merge vajra.(none):/opt/local/work/mysql-5.0-runtime
into vajra.(none):/opt/local/work/mysql-5.1-runtime
This commit is contained in:
commit
4eeee57c4b
1 changed files with 38 additions and 0 deletions
|
@ -7068,6 +7068,44 @@ select bug20777(18446744073709551613)+1;
|
|||
drop function bug20777;
|
||||
delimiter |;
|
||||
|
||||
|
||||
#
|
||||
# BUG#5274: Stored procedure crash if length of CHAR variable too great.
|
||||
#
|
||||
|
||||
# Prepare.
|
||||
|
||||
--disable_warnings
|
||||
DROP FUNCTION IF EXISTS bug5274_f1|
|
||||
DROP FUNCTION IF EXISTS bug5274_f2|
|
||||
--enable_warnings
|
||||
|
||||
# Test.
|
||||
|
||||
CREATE FUNCTION bug5274_f1(p1 CHAR) RETURNS CHAR
|
||||
RETURN CONCAT(p1, p1)|
|
||||
|
||||
CREATE FUNCTION bug5274_f2() RETURNS CHAR
|
||||
BEGIN
|
||||
DECLARE v1 INT DEFAULT 0;
|
||||
DECLARE v2 CHAR DEFAULT 'x';
|
||||
|
||||
WHILE v1 < 30 DO
|
||||
SET v1 = v1 + 1;
|
||||
SET v2 = bug5274_f1(v2);
|
||||
END WHILE;
|
||||
|
||||
RETURN v2;
|
||||
END|
|
||||
|
||||
SELECT bug5274_f2()|
|
||||
|
||||
# Cleanup.
|
||||
|
||||
DROP FUNCTION bug5274_f1|
|
||||
DROP FUNCTION bug5274_f2|
|
||||
|
||||
|
||||
###
|
||||
--echo End of 5.0 tests.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue