File tree Expand file tree Collapse file tree 4 files changed +39
-1
lines changed Expand file tree Collapse file tree 4 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -18730,3 +18730,21 @@ DROP TABLE t1;
18730
18730
#
18731
18731
# End of 10.0 tests
18732
18732
#
18733
+ #
18734
+ # Start of 10.2 tests
18735
+ #
18736
+ #
18737
+ # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
18738
+ #
18739
+ CREATE TABLE t1 (a TEXT CHARACTER SET sjis);
18740
+ LOAD DATA INFILE '../../std_data/loaddata/mdev9842.txt' INTO TABLE t1 CHARACTER SET sjis;
18741
+ SELECT HEX(a) FROM t1;
18742
+ HEX(a)
18743
+ 78835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C835C
18744
+ SELECT a=CONCAT('x', REPEAT(_sjis 0x835C, 200)) FROM t1;
18745
+ a=CONCAT('x', REPEAT(_sjis 0x835C, 200))
18746
+ 1
18747
+ DROP TABLE t1;
18748
+ #
18749
+ # End of 10.2 tests
18750
+ #
Original file line number Diff line number Diff line change
1
+ x�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\�\
Original file line number Diff line number Diff line change @@ -231,3 +231,21 @@ SET NAMES sjis;
231
231
--echo #
232
232
--echo # End of 10.0 tests
233
233
--echo #
234
+
235
+ --echo #
236
+ --echo # Start of 10.2 tests
237
+ --echo #
238
+
239
+ --echo #
240
+ --echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
241
+ --echo #
242
+ CREATE TABLE t1 (a TEXT CHARACTER SET sjis);
243
+ LOAD DATA INFILE '../../std_data/loaddata/mdev9842.txt' INTO TABLE t1 CHARACTER SET sjis;
244
+ SELECT HEX(a) FROM t1;
245
+ SELECT a=CONCAT('x', REPEAT(_sjis 0x835C, 200)) FROM t1;
246
+ DROP TABLE t1;
247
+
248
+
249
+ --echo #
250
+ --echo # End of 10.2 tests
251
+ --echo #
Original file line number Diff line number Diff line change @@ -1492,7 +1492,8 @@ int READ_INFO::read_field()
1492
1492
1493
1493
for (;;)
1494
1494
{
1495
- while ( to < end_of_buff)
1495
+ // Make sure we have enough space for the longest multi-byte character.
1496
+ while ( to + read_charset->mbmaxlen <= end_of_buff)
1496
1497
{
1497
1498
chr = GET;
1498
1499
if (chr == my_b_EOF)
You can’t perform that action at this time.
0 commit comments