diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2006-09-29 11:14:28 -0400 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2006-09-29 11:14:28 -0400 |
commit | 53de6c3901a1cb6a1097dfff66750e41e8024ab2 (patch) | |
tree | a3b1dd3a830cce074b08b130940c510097af9e79 /mysql-test/t/warnings.test | |
parent | e1f08634ce6c1b0f8a7fed304d172eabc89c1f6a (diff) | |
parent | 033db2d038a05a61eabeba40a581720b0845da39 (diff) | |
download | mariadb-git-53de6c3901a1cb6a1097dfff66750e41e8024ab2.tar.gz |
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug20778/my50-bug20778
into zippy.cornsilk.net:/home/cmiller/work/mysql/bug20778/my51-bug20778
mysql-test/r/warnings.result:
Auto merged
mysql-test/t/warnings.test:
Auto merged
sql/field.cc:
Auto merged
Diffstat (limited to 'mysql-test/t/warnings.test')
-rw-r--r-- | mysql-test/t/warnings.test | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test index c20763f203f..a8b8e5f5103 100644 --- a/mysql-test/t/warnings.test +++ b/mysql-test/t/warnings.test @@ -147,4 +147,60 @@ select * from t1 limit 1, 0; select * from t1 limit 0, 0; drop table t1; -# End of 4.1 tests +--echo End of 4.1 tests + +# +# Bug#20778: strange characters in warning message 1366 when called in SP +# + +let $engine_type= innodb; + +CREATE TABLE t1( f1 CHAR(20) ); +CREATE TABLE t2( f1 CHAR(20), f2 CHAR(25) ); +CREATE TABLE t3( f1 CHAR(20), f2 CHAR(25), f3 DATE ); + +INSERT INTO t1 VALUES ( 'a`' ); +INSERT INTO t2 VALUES ( 'a`', 'a`' ); +INSERT INTO t3 VALUES ( 'a`', 'a`', '1000-01-1' ); + +DROP PROCEDURE IF EXISTS sp1; +DROP PROCEDURE IF EXISTS sp2; +DROP PROCEDURE IF EXISTS sp3; +delimiter //; +CREATE PROCEDURE sp1() +BEGIN + DECLARE x NUMERIC ZEROFILL; + SELECT f1 INTO x FROM t1 LIMIT 1; +END// +CREATE PROCEDURE sp2() +BEGIN + DECLARE x NUMERIC ZEROFILL; + SELECT f1 INTO x FROM t2 LIMIT 1; +END// +CREATE PROCEDURE sp3() +BEGIN + DECLARE x NUMERIC ZEROFILL; + SELECT f1 INTO x FROM t3 LIMIT 1; +END// +delimiter ;// +CALL sp1(); +CALL sp2(); +CALL sp3(); + +DROP PROCEDURE IF EXISTS sp1; +delimiter //; +CREATE PROCEDURE sp1() +BEGIN +declare x numeric unsigned zerofill; +SELECT f1 into x from t2 limit 1; +END// +delimiter ;// +CALL sp1(); +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; +DROP PROCEDURE sp1; +DROP PROCEDURE sp2; +DROP PROCEDURE sp3; + +--echo End of 5.0 tests |