diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-06-18 17:08:56 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-06-18 17:08:56 +0500 |
commit | 751e32072f260a39d9c1b4ca2a5d80fff13ad925 (patch) | |
tree | 5a3f0331e4c22301ccc757da3090d947ac0d598d /mysql-test/t/func_str.test | |
parent | 200c69e3e6dd7a59796f1fd1ac78f90ec402a6c3 (diff) | |
parent | 6e315bfae2fdd147c901647bb28ed09359aa0add (diff) | |
download | mariadb-git-751e32072f260a39d9c1b4ca2a5d80fff13ad925.tar.gz |
Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into gleb.loc:/home/uchum/work/bk/5.1-opt
mysql-test/r/func_str.result:
Auto merged
mysql-test/t/func_str.test:
Auto merged
sql/item_strfunc.cc:
Auto merged
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 9148b757b29..945f5a050f4 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1216,4 +1216,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 |