mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug10963/my50-bug10963
into zippy.cornsilk.net:/home/cmiller/work/mysql/bug10963/my51-bug10963 mysql-test/r/func_str.result: Auto merged mysql-test/t/func_str.test: Auto merged sql/item_func.cc: Auto merged sql/item_strfunc.cc: Auto merged
This commit is contained in:
@@ -780,4 +780,193 @@ SELECT * FROM t1 INNER JOIN t2 ON code=id
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
#
|
||||
# Bug #10963
|
||||
# 4294967296 18446744073709551616
|
||||
|
||||
select locate('he','hello',-2);
|
||||
select locate('lo','hello',-4294967295);
|
||||
select locate('lo','hello',4294967295);
|
||||
select locate('lo','hello',-4294967296);
|
||||
select locate('lo','hello',4294967296);
|
||||
select locate('lo','hello',-4294967297);
|
||||
select locate('lo','hello',4294967297);
|
||||
select locate('lo','hello',-18446744073709551615);
|
||||
select locate('lo','hello',18446744073709551615);
|
||||
select locate('lo','hello',-18446744073709551616);
|
||||
select locate('lo','hello',18446744073709551616);
|
||||
select locate('lo','hello',-18446744073709551617);
|
||||
select locate('lo','hello',18446744073709551617);
|
||||
|
||||
select left('hello', 10);
|
||||
select left('hello', 0);
|
||||
select left('hello', -1);
|
||||
select left('hello', -4294967295);
|
||||
select left('hello', 4294967295);
|
||||
select left('hello', -4294967296);
|
||||
select left('hello', 4294967296);
|
||||
select left('hello', -4294967297);
|
||||
select left('hello', 4294967297);
|
||||
select left('hello', -18446744073709551615);
|
||||
select left('hello', 18446744073709551615);
|
||||
select left('hello', -18446744073709551616);
|
||||
select left('hello', 18446744073709551616);
|
||||
select left('hello', -18446744073709551617);
|
||||
select left('hello', 18446744073709551617);
|
||||
|
||||
select right('hello', 10);
|
||||
select right('hello', 0);
|
||||
select right('hello', -1);
|
||||
select right('hello', -4294967295);
|
||||
select right('hello', 4294967295);
|
||||
select right('hello', -4294967296);
|
||||
select right('hello', 4294967296);
|
||||
select right('hello', -4294967297);
|
||||
select right('hello', 4294967297);
|
||||
select right('hello', -18446744073709551615);
|
||||
select right('hello', 18446744073709551615);
|
||||
select right('hello', -18446744073709551616);
|
||||
select right('hello', 18446744073709551616);
|
||||
select right('hello', -18446744073709551617);
|
||||
select right('hello', 18446744073709551617);
|
||||
|
||||
select substring('hello', 2, -1);
|
||||
|
||||
select substring('hello', -1, 1);
|
||||
select substring('hello', -2, 1);
|
||||
select substring('hello', -4294967295, 1);
|
||||
select substring('hello', 4294967295, 1);
|
||||
select substring('hello', -4294967296, 1);
|
||||
select substring('hello', 4294967296, 1);
|
||||
select substring('hello', -4294967297, 1);
|
||||
select substring('hello', 4294967297, 1);
|
||||
select substring('hello', -18446744073709551615, 1);
|
||||
select substring('hello', 18446744073709551615, 1);
|
||||
select substring('hello', -18446744073709551616, 1);
|
||||
select substring('hello', 18446744073709551616, 1);
|
||||
select substring('hello', -18446744073709551617, 1);
|
||||
select substring('hello', 18446744073709551617, 1);
|
||||
select substring('hello', 1, -1);
|
||||
select substring('hello', 1, -4294967295);
|
||||
select substring('hello', 1, 4294967295);
|
||||
select substring('hello', 1, -4294967296);
|
||||
select substring('hello', 1, 4294967296);
|
||||
select substring('hello', 1, -4294967297);
|
||||
select substring('hello', 1, 4294967297);
|
||||
select substring('hello', 1, -18446744073709551615);
|
||||
select substring('hello', 1, 18446744073709551615);
|
||||
select substring('hello', 1, -18446744073709551616);
|
||||
select substring('hello', 1, 18446744073709551616);
|
||||
select substring('hello', 1, -18446744073709551617);
|
||||
select substring('hello', 1, 18446744073709551617);
|
||||
select substring('hello', -1, -1);
|
||||
select substring('hello', -4294967295, -4294967295);
|
||||
select substring('hello', 4294967295, 4294967295);
|
||||
select substring('hello', -4294967296, -4294967296);
|
||||
select substring('hello', 4294967296, 4294967296);
|
||||
select substring('hello', -4294967297, -4294967297);
|
||||
select substring('hello', 4294967297, 4294967297);
|
||||
select substring('hello', -18446744073709551615, -18446744073709551615);
|
||||
select substring('hello', 18446744073709551615, 18446744073709551615);
|
||||
select substring('hello', -18446744073709551616, -18446744073709551616);
|
||||
select substring('hello', 18446744073709551616, 18446744073709551616);
|
||||
select substring('hello', -18446744073709551617, -18446744073709551617);
|
||||
select substring('hello', 18446744073709551617, 18446744073709551617);
|
||||
|
||||
select insert('hello', -1, 1, 'hi');
|
||||
select insert('hello', -4294967295, 1, 'hi');
|
||||
select insert('hello', 4294967295, 1, 'hi');
|
||||
select insert('hello', -4294967296, 1, 'hi');
|
||||
select insert('hello', 4294967296, 1, 'hi');
|
||||
select insert('hello', -4294967297, 1, 'hi');
|
||||
select insert('hello', 4294967297, 1, 'hi');
|
||||
select insert('hello', -18446744073709551615, 1, 'hi');
|
||||
select insert('hello', 18446744073709551615, 1, 'hi');
|
||||
select insert('hello', -18446744073709551616, 1, 'hi');
|
||||
select insert('hello', 18446744073709551616, 1, 'hi');
|
||||
select insert('hello', -18446744073709551617, 1, 'hi');
|
||||
select insert('hello', 18446744073709551617, 1, 'hi');
|
||||
select insert('hello', 1, -1, 'hi');
|
||||
select insert('hello', 1, -4294967295, 'hi');
|
||||
select insert('hello', 1, 4294967295, 'hi');
|
||||
select insert('hello', 1, -4294967296, 'hi');
|
||||
select insert('hello', 1, 4294967296, 'hi');
|
||||
select insert('hello', 1, -4294967297, 'hi');
|
||||
select insert('hello', 1, 4294967297, 'hi');
|
||||
select insert('hello', 1, -18446744073709551615, 'hi');
|
||||
select insert('hello', 1, 18446744073709551615, 'hi');
|
||||
select insert('hello', 1, -18446744073709551616, 'hi');
|
||||
select insert('hello', 1, 18446744073709551616, 'hi');
|
||||
select insert('hello', 1, -18446744073709551617, 'hi');
|
||||
select insert('hello', 1, 18446744073709551617, 'hi');
|
||||
select insert('hello', -1, -1, 'hi');
|
||||
select insert('hello', -4294967295, -4294967295, 'hi');
|
||||
select insert('hello', 4294967295, 4294967295, 'hi');
|
||||
select insert('hello', -4294967296, -4294967296, 'hi');
|
||||
select insert('hello', 4294967296, 4294967296, 'hi');
|
||||
select insert('hello', -4294967297, -4294967297, 'hi');
|
||||
select insert('hello', 4294967297, 4294967297, 'hi');
|
||||
select insert('hello', -18446744073709551615, -18446744073709551615, 'hi');
|
||||
select insert('hello', 18446744073709551615, 18446744073709551615, 'hi');
|
||||
select insert('hello', -18446744073709551616, -18446744073709551616, 'hi');
|
||||
select insert('hello', 18446744073709551616, 18446744073709551616, 'hi');
|
||||
select insert('hello', -18446744073709551617, -18446744073709551617, 'hi');
|
||||
select insert('hello', 18446744073709551617, 18446744073709551617, 'hi');
|
||||
|
||||
select repeat('hello', -1);
|
||||
select repeat('hello', -4294967295);
|
||||
select repeat('hello', 4294967295);
|
||||
select repeat('hello', -4294967296);
|
||||
select repeat('hello', 4294967296);
|
||||
select repeat('hello', -4294967297);
|
||||
select repeat('hello', 4294967297);
|
||||
select repeat('hello', -18446744073709551615);
|
||||
select repeat('hello', 18446744073709551615);
|
||||
select repeat('hello', -18446744073709551616);
|
||||
select repeat('hello', 18446744073709551616);
|
||||
select repeat('hello', -18446744073709551617);
|
||||
select repeat('hello', 18446744073709551617);
|
||||
|
||||
select space(-1);
|
||||
select space(-4294967295);
|
||||
select space(4294967295);
|
||||
select space(-4294967296);
|
||||
select space(4294967296);
|
||||
select space(-4294967297);
|
||||
select space(4294967297);
|
||||
select space(-18446744073709551615);
|
||||
select space(18446744073709551615);
|
||||
select space(-18446744073709551616);
|
||||
select space(18446744073709551616);
|
||||
select space(-18446744073709551617);
|
||||
select space(18446744073709551617);
|
||||
|
||||
select rpad('hello', -1, '1');
|
||||
select rpad('hello', -4294967295, '1');
|
||||
select rpad('hello', 4294967295, '1');
|
||||
select rpad('hello', -4294967296, '1');
|
||||
select rpad('hello', 4294967296, '1');
|
||||
select rpad('hello', -4294967297, '1');
|
||||
select rpad('hello', 4294967297, '1');
|
||||
select rpad('hello', -18446744073709551615, '1');
|
||||
select rpad('hello', 18446744073709551615, '1');
|
||||
select rpad('hello', -18446744073709551616, '1');
|
||||
select rpad('hello', 18446744073709551616, '1');
|
||||
select rpad('hello', -18446744073709551617, '1');
|
||||
select rpad('hello', 18446744073709551617, '1');
|
||||
|
||||
select lpad('hello', -1, '1');
|
||||
select lpad('hello', -4294967295, '1');
|
||||
select lpad('hello', 4294967295, '1');
|
||||
select lpad('hello', -4294967296, '1');
|
||||
select lpad('hello', 4294967296, '1');
|
||||
select lpad('hello', -4294967297, '1');
|
||||
select lpad('hello', 4294967297, '1');
|
||||
select lpad('hello', -18446744073709551615, '1');
|
||||
select lpad('hello', 18446744073709551615, '1');
|
||||
select lpad('hello', -18446744073709551616, '1');
|
||||
select lpad('hello', 18446744073709551616, '1');
|
||||
select lpad('hello', -18446744073709551617, '1');
|
||||
select lpad('hello', 18446744073709551617, '1');
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user