Commit e975cd0b authored by Alexander Barkov's avatar Alexander Barkov

MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis

parent 3fc6a8b8
......@@ -18730,3 +18730,21 @@ DROP TABLE t1;
#
# End of 10.0 tests
#
#
# Start of 10.2 tests
#
#
# MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
#
CREATE TABLE t1 (a TEXT CHARACTER SET sjis);
LOAD DATA INFILE '../../std_data/loaddata/mdev9842.txt' INTO TABLE t1 CHARACTER SET sjis;
SELECT HEX(a) FROM t1;
HEX(a)
78835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C
SELECT a=CONCAT('x', REPEAT(_sjis 0x835C, 200)) FROM t1;
a=CONCAT('x', REPEAT(_sjis 0x835C, 200))
1
DROP TABLE t1;
#
# End of 10.2 tests
#
x\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
......@@ -231,3 +231,21 @@ SET NAMES sjis;
--echo #
--echo # End of 10.0 tests
--echo #
--echo #
--echo # Start of 10.2 tests
--echo #
--echo #
--echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
--echo #
CREATE TABLE t1 (a TEXT CHARACTER SET sjis);
LOAD DATA INFILE '../../std_data/loaddata/mdev9842.txt' INTO TABLE t1 CHARACTER SET sjis;
SELECT HEX(a) FROM t1;
SELECT a=CONCAT('x', REPEAT(_sjis 0x835C, 200)) FROM t1;
DROP TABLE t1;
--echo #
--echo # End of 10.2 tests
--echo #
......@@ -1492,7 +1492,8 @@ int READ_INFO::read_field()
for (;;)
{
while ( to < end_of_buff)
// Make sure we have enough space for the longest multi-byte character.
while ( to + read_charset->mbmaxlen <= end_of_buff)
{
chr = GET;
if (chr == my_b_EOF)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment