diff options
author | sergefp@mysql.com <> | 2005-02-04 09:14:22 +0300 |
---|---|---|
committer | sergefp@mysql.com <> | 2005-02-04 09:14:22 +0300 |
commit | 38339e1c516f2c7d466c440f88013e5c92c40445 (patch) | |
tree | df20fcb468895423bb135dd8c9ec93140e32963b /mysql-test/t/func_misc.test | |
parent | e87bd60c12452e5cac8cc72708de8ed222bbd066 (diff) | |
download | mariadb-git-38339e1c516f2c7d466c440f88013e5c92c40445.tar.gz |
Fix for BUG#7716: in in_string::set() take into account that the value returned
by item->val_str() may be a substring of the passed string.
Disallow string=its_substring assignment in String::operator=().
Diffstat (limited to 'mysql-test/t/func_misc.test')
-rw-r--r-- | mysql-test/t/func_misc.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index e73f2a1b26c..89aba7ee583 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -23,3 +23,18 @@ select length(format('nan', 2)) > 0; # Test for bug #628 # select concat("$",format(2500,2)); + +# Test for BUG#7716 +create table t1 ( a timestamp ); +insert into t1 values ( '2004-01-06 12:34' ); +select a from t1 where left(a+0,6) in ( left(20040106,6) ); +select a from t1 where left(a+0,6) = ( left(20040106,6) ); + +select a from t1 where right(a+0,6) in ( right(20040106123400,6) ); +select a from t1 where right(a+0,6) = ( right(20040106123400,6) ); + +select a from t1 where mid(a+0,6,3) in ( mid(20040106123400,6,3) ); +select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) ); + +drop table t1; + |