mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Adding LOAD DATA tests for MDEV-11079 and MDEV-11631
c3cf7f47f0
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.
This commit is contained in:
parent
ae1b3d1991
commit
3e63fde52e
4 changed files with 38 additions and 0 deletions
|
@ -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;
|
||||
|
|
1
mysql-test/std_data/loaddata/mdev-11079.txt
Normal file
1
mysql-test/std_data/loaddata/mdev-11079.txt
Normal file
|
@ -0,0 +1 @@
|
|||
"%<25><><EFBFBD>"
|
1
mysql-test/std_data/loaddata/mdev-11631.txt
Normal file
1
mysql-test/std_data/loaddata/mdev-11631.txt
Normal file
|
@ -0,0 +1 @@
|
|||
\ä
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue