mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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
|
||||
#
|
||||
|
@ -1681,6 +1681,20 @@ SELECT length(data) AS len FROM (SELECT REPEAT('ä', 65535) AS data) AS sub;
|
||||
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 #
|
||||
|
@ -5743,6 +5743,7 @@ String *Item::check_well_formed_result(String *str, bool send_error)
|
||||
uint wlen= cs->cset->well_formed_len(cs,
|
||||
str->ptr(), str->ptr() + str->length(),
|
||||
str->length(), &well_formed_error);
|
||||
null_value= false;
|
||||
if (wlen < str->length())
|
||||
{
|
||||
THD *thd= current_thd;
|
||||
|
Reference in New Issue
Block a user