summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2016-12-05 16:50:12 +0400
committerAlexander Barkov <bar@mariadb.org>2016-12-06 06:54:52 +0400
commit46dee0d1848e24e39fc236e78a438efa22356f8d (patch)
treeb3e1d20d0c889514330682ec36225bfbc7a13db1 /mysql-test
parent18cdff6765b954431934f6e6d0b1e281c8f0e0b8 (diff)
downloadmariadb-git-46dee0d1848e24e39fc236e78a438efa22356f8d.tar.gz
MDEV-10717 Assertion `!null_value' failed in virtual bool Item::send(Protocol*, String*)
The problem was that null_value was not set to "false" on a well-formed row. If an ill-formed row was followed by a well-forned row, null_value remained "true" in the call of Item::send() for the well-formed row.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_utf8.result26
-rw-r--r--mysql-test/t/ctype_utf8.test14
2 files changed, 40 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 121168c2a2a..294c2cb2be1 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -5869,5 +5869,31 @@ SELECT length(data) AS len FROM (SELECT REPEAT('ä', 65537) AS data) AS sub;
len
131074
#
+# MDEV-10717 Assertion `!null_value' failed in virtual bool Item::send(Protocol*, String*)
+#
+CREATE TABLE t1 (i INT, KEY(i));
+INSERT INTO t1 VALUES (20081205),(20050327);
+SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
+HEX(i) HEX(CHAR(i USING utf8))
+131F197 0131
+1326A35 01326A35
+Warnings:
+Warning 1300 Invalid utf8 character string: 'F197'
+SET sql_mode='STRICT_ALL_TABLES';
+SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
+HEX(i) HEX(CHAR(i USING utf8))
+131F197 NULL
+1326A35 01326A35
+Warnings:
+Warning 1300 Invalid utf8 character string: 'F197'
+SELECT CHAR(i USING utf8) FROM t1;
+CHAR(i USING utf8)
+###
+###
+Warnings:
+### 1300 Invalid utf8 character string: 'F197'
+SET sql_mode=DEFAULT;
+DROP TABLE t1;
+#
# End of 5.5 tests
#
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index d6fdc6c6a2c..75581ede8fa 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -1682,5 +1682,19 @@ SELECT length(data) AS len FROM (SELECT REPEAT('ä', 65536) AS data) AS sub;
SELECT length(data) AS len FROM (SELECT REPEAT('ä', 65537) AS data) AS sub;
--echo #
+--echo # MDEV-10717 Assertion `!null_value' failed in virtual bool Item::send(Protocol*, String*)
+--echo #
+CREATE TABLE t1 (i INT, KEY(i));
+INSERT INTO t1 VALUES (20081205),(20050327);
+SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
+SET sql_mode='STRICT_ALL_TABLES';
+SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
+# Avoid garbage in the output
+--replace_column 1 ###
+SELECT CHAR(i USING utf8) FROM t1;
+SET sql_mode=DEFAULT;
+DROP TABLE t1;
+
+--echo #
--echo # End of 5.5 tests
--echo #