summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-08-17 07:07:11 +0400
committerAlexander Barkov <bar@mariadb.org>2017-08-17 07:07:11 +0400
commita70809c0fcd5eca38c5f6bafa92270f1704a0597 (patch)
tree3e93cf1f8c41cf67b4b82bbaaec1c371d838eb6a /mysql-test
parentff3cf7497447a4fce4554f571950fcde7f7e493a (diff)
downloadmariadb-git-a70809c0fcd5eca38c5f6bafa92270f1704a0597.tar.gz
MDEV-13555 Assertion `!item->null_value' failed in Type_handler::Item_send_str
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_str.result14
-rw-r--r--mysql-test/t/func_str.test12
2 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 464178124ec..b1862d46613 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -4887,5 +4887,19 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select octet_length('a') AS `LENGTH('a')`,octet_length('a') AS `LENGTHB('a')`
#
+# MDEV-13555 Assertion `!item->null_value' failed in Type_handler::Item_send_str
+#
+CREATE TABLE t1 (c VARCHAR(8));
+INSERT INTO t1 VALUES (NULL),('bar');
+SELECT LPAD( c, 0, '?' ) FROM t1;
+LPAD( c, 0, '?' )
+NULL
+
+SELECT RPAD( c, 0, '?' ) FROM t1;
+RPAD( c, 0, '?' )
+NULL
+
+DROP TABLE t1;
+#
# End of 10.3 tests
#
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 2f7dd638445..a75330ab981 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1889,6 +1889,18 @@ DROP TABLE t1;
SELECT LENGTHB('a'), LENGTHB(_utf8 0xC39F), LENGTHB(123), LENGTH(null);
EXPLAIN EXTENDED SELECT LENGTH('a'), LENGTHB('a');
+
+--echo #
+--echo # MDEV-13555 Assertion `!item->null_value' failed in Type_handler::Item_send_str
+--echo #
+
+CREATE TABLE t1 (c VARCHAR(8));
+INSERT INTO t1 VALUES (NULL),('bar');
+SELECT LPAD( c, 0, '?' ) FROM t1;
+SELECT RPAD( c, 0, '?' ) FROM t1;
+DROP TABLE t1;
+
+
--echo #
--echo # End of 10.3 tests
--echo #