diff options
author | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-04-15 12:51:34 +0400 |
---|---|---|
committer | Sergey Glukhov <sergey.glukhov@oracle.com> | 2011-04-15 12:51:34 +0400 |
commit | bba7b9ca0c96a1c140e725776b5e0382a4f62152 (patch) | |
tree | 73afec6d837b899a2cc3b67d3ceff28bb3077d61 /mysql-test/t | |
parent | dd3d9477b25b546407e18b4b474e766db1709aa7 (diff) | |
download | mariadb-git-bba7b9ca0c96a1c140e725776b5e0382a4f62152.tar.gz |
Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U
Some multibyte sequences could be considered by my_mbcharlen() functions
as multibyte character but more exact my_ismbchar() does not think so.
In such a case this multibyte sequences is pushed into 'stack' buffer which
is too small to accommodate the sequence.
The fix is to allocate stack buffer in
compliance with max character length.
mysql-test/r/loaddata.result:
test case
mysql-test/t/loaddata.test:
test case
sql/sql_load.cc:
allocate stack buffer in compliance with max character length.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/loaddata.test | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 821453777f5..e0764b67ec0 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -611,5 +611,18 @@ DROP TABLE t1; let $MYSQLD_DATADIR= `select @@datadir`; remove_file $MYSQLD_DATADIR/test/tmpp2.txt; +--echo # +--echo # Bug#11765139 58069: LOAD DATA INFILE: VALGRIND REPORTS INVALID MEMORY READS AND WRITES WITH U +--echo # + +CREATE TABLE t1(f1 INT); +EVAL SELECT 0xE1BB30 INTO OUTFILE 't1.dat'; +--disable_warnings +LOAD DATA INFILE 't1.dat' IGNORE INTO TABLE t1 CHARACTER SET utf8; +--enable_warnings + +DROP TABLE t1; +let $MYSQLD_DATADIR= `select @@datadir`; +remove_file $MYSQLD_DATADIR/test/t1.dat; --echo End of 5.1 tests |