Commit 3e63fde5 authored by Alexander Barkov's avatar Alexander Barkov

Adding LOAD DATA tests for MDEV-11079 and MDEV-11631

c3cf7f47 reverted the patch
for BUG#24487120. After merging the reverting patch from MySQL
to MariaDB the problems described in MDEV-11079 and MDEV-11631 disappeared.
Adding test cases only.
parent ae1b3d19
......@@ -532,3 +532,21 @@ FIELDS TERMINATED BY 't' LINES TERMINATED BY '';
Got one of the listed errors
SET @@sql_mode= @old_mode;
DROP TABLE t1;
#
# MDEV-11079 Regression: LOAD DATA INFILE lost BLOB support using utf8 load files
#
CREATE TABLE t1 (a mediumblob NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
LOAD DATA INFILE '../../std_data/loaddata/mdev-11079.txt' INTO TABLE t1 CHARSET utf8 FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n';
SELECT HEX(a) FROM t1;
HEX(a)
25AAABAC
DROP TABLE t1;
#
# MDEV-11631 LOAD DATA INFILE fails to load data with an escape character followed by a multi-byte character
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
LOAD DATA INFILE '../../std_data/loaddata/mdev-11631.txt' INTO TABLE t1 CHARACTER SET utf8;
SELECT HEX(a) FROM t1;
HEX(a)
C3A4
DROP TABLE t1;
......@@ -658,3 +658,21 @@ SET @@sql_mode= @old_mode;
--remove_file $MYSQLTEST_VARDIR/mysql
DROP TABLE t1;
--echo #
--echo # MDEV-11079 Regression: LOAD DATA INFILE lost BLOB support using utf8 load files
--echo #
CREATE TABLE t1 (a mediumblob NOT NULL) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
LOAD DATA INFILE '../../std_data/loaddata/mdev-11079.txt' INTO TABLE t1 CHARSET utf8 FIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY '\n';
SELECT HEX(a) FROM t1;
DROP TABLE t1;
--echo #
--echo # MDEV-11631 LOAD DATA INFILE fails to load data with an escape character followed by a multi-byte character
--echo #
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
LOAD DATA INFILE '../../std_data/loaddata/mdev-11631.txt' INTO TABLE t1 CHARACTER SET utf8;
SELECT HEX(a) FROM t1;
DROP TABLE t1;
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