mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug #53088: mysqldump with -T & --default-character-set set
truncates text/blob to 766 chars mysqldump and SELECT ... INTO OUTFILE truncated long BLOB/TEXT values to size of 766 bytes (MAX_FIELD_WIDTH or 255 * 3 + 1). The select_export::send_data method has been modified to reallocate a conversion buffer for long field data. mysql-test/r/mysqldump.result: Test case for bug #53088. mysql-test/r/outfile_loaddata.result: Test case for bug #53088. mysql-test/t/mysqldump.test: Test case for bug #53088. mysql-test/t/outfile_loaddata.test: Test case for bug #53088. sql/sql_class.cc: Bug #53088: mysqldump with -T & --default-character-set set truncates text/blob to 766 chars The select_export::send_data method has been modified to reallocate a conversion buffer for long field data.
This commit is contained in:
@ -239,4 +239,24 @@ a b c
|
||||
2 NULL NULL
|
||||
SET NAMES default;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #53088: mysqldump with -T & --default-character-set set
|
||||
# truncates text/blob to 766 chars
|
||||
#
|
||||
# Also see mysqldump.test
|
||||
#
|
||||
CREATE TABLE t1 (a BLOB) CHARSET latin1;
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
INSERT INTO t1 VALUES (REPEAT('.', 800));
|
||||
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug53088.txt' CHARACTER SET latin1 FROM t1;
|
||||
# should be greater than 800
|
||||
SELECT LENGTH(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug53088.txt'));
|
||||
LENGTH(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug53088.txt'))
|
||||
801
|
||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug53088.txt' INTO TABLE t2;
|
||||
# should be 800
|
||||
SELECT LENGTH(a) FROM t2;
|
||||
LENGTH(a)
|
||||
800
|
||||
DROP TABLE t1, t2;
|
||||
# End of 5.1 tests.
|
||||
|
Reference in New Issue
Block a user