summaryrefslogtreecommitdiff
path: root/mysql-test/main/func_str.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-03-22 14:41:36 +0400
committerAlexander Barkov <bar@mariadb.com>2019-03-22 14:41:36 +0400
commit1c60f40868f6067be81a50198e1c72df08814adf (patch)
treed5570ecfa377236d527d3c6a1db2a6b508c5a005 /mysql-test/main/func_str.test
parentf4484dfdbf2d78b0f357916ebd8ade024dd73c09 (diff)
parent50a8fc52988d13a5164a1a542b9d7a85e3ecc1c1 (diff)
downloadmariadb-git-1c60f40868f6067be81a50198e1c72df08814adf.tar.gz
Merge remote-tracking branch 'origin/10.2' into 10.3
Diffstat (limited to 'mysql-test/main/func_str.test')
-rw-r--r--mysql-test/main/func_str.test45
1 files changed, 45 insertions, 0 deletions
diff --git a/mysql-test/main/func_str.test b/mysql-test/main/func_str.test
index 4165e147768..64aca38c115 100644
--- a/mysql-test/main/func_str.test
+++ b/mysql-test/main/func_str.test
@@ -1664,6 +1664,51 @@ drop table t1,t2;
select md5(_filename "a"), sha(_filename "a");
--echo #
+--echo # MDEV-18881 Assertion `0' failed in make_sortkey upon SELECT with GROUP BY after LOAD DATA
+--echo #
+
+CREATE TABLE t1 (a BIT(22), b CHAR(8) NOT NULL, c CHAR(8));
+INSERT INTO t1 VALUES (0xA4B,'foo','qux');
+INSERT INTO t1 VALUES (0x8F5,'bar','foobar');
+INSERT INTO t1 VALUES (0x0, '', NULL);
+INSERT INTO t1 VALUES (0x4B, 'foo','qux');
+INSERT INTO t1 VALUES (0x8F5, 'bar', 'foobar');
+SET SESSION SQL_MODE= '';
+SELECT GROUP_CONCAT(c) AS f FROM t1 GROUP BY LPAD('foo', 20, b);
+DROP TABLE t1;
+SET SESSION SQL_MODE=DEFAULT;
+
+CREATE TABLE t1 AS SELECT
+ LPAD('a',10,' '),
+ RPAD('a',10,' '),
+ LPAD('a',10,' '),
+ RPAD('a',10,' '),
+ LPAD('a',10,NULL),
+ RPAD('a',10,NULL),
+ LPAD('a',10,''),
+ RPAD('a',10,''),
+ LPAD('a',10,RAND()),
+ RPAD('a',10,RAND());
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+SET SESSION SQL_MODE= '';
+CREATE TABLE t1 AS SELECT
+ LPAD('a',10,' '),
+ RPAD('a',10,' '),
+ LPAD('a',10,' '),
+ RPAD('a',10,' '),
+ LPAD('a',10,NULL),
+ RPAD('a',10,NULL),
+ LPAD('a',10,''),
+ RPAD('a',10,''),
+ LPAD('a',10,RAND()),
+ RPAD('a',10,RAND());
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+SET SESSION SQL_MODE=DEFAULT;
+
+
+--echo #
--echo # End of 5.5 tests
--echo #