diff options
author | igor@olga.mysql.com <> | 2007-06-17 11:35:14 -0700 |
---|---|---|
committer | igor@olga.mysql.com <> | 2007-06-17 11:35:14 -0700 |
commit | e81be02850ea0ae87be760b6f36ab96548a130b4 (patch) | |
tree | 1b616e203a8d17a1857f75d2f248d6ce78ae43b6 /mysql-test/t/func_str.test | |
parent | dac7ce2d12e39a456b21c4252ef9518ab790c57f (diff) | |
parent | 63ab91090ddc6ff0588dd4616fb90a77a2036970 (diff) | |
download | mariadb-git-e81be02850ea0ae87be760b6f36ab96548a130b4.tar.gz |
Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug27130
Diffstat (limited to 'mysql-test/t/func_str.test')
-rw-r--r-- | mysql-test/t/func_str.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index c8fd06cd1cd..1a32580aa0f 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1109,4 +1109,19 @@ SELECT id FROM t1 WHERE LOCATE(a,p) <=> NULL; DROP TABLE t1; +# +# Bug #27130: SUBSTR with UNSIGNED 0 as the last argument +# + +SELECT SUBSTR('foo',1,0) FROM DUAL; +SELECT SUBSTR('foo',1,CAST(0 AS SIGNED)) FROM DUAL; +SELECT SUBSTR('foo',1,CAST(0 AS UNSIGNED)) FROM DUAL; + +CREATE TABLE t1 (a varchar(10), len int unsigned); +INSERT INTO t1 VALUES ('bar', 2), ('foo', 0); + +SELECT SUBSTR(a,1,len) FROM t1; + +DROP TABLE t1; + --echo End of 5.0 tests |