summaryrefslogtreecommitdiff
path: root/mysql-test/r/outfile_loaddata.result
diff options
context:
space:
mode:
authorGleb Shchepa <gshchepa@mysql.com>2010-05-07 00:41:37 +0400
committerGleb Shchepa <gshchepa@mysql.com>2010-05-07 00:41:37 +0400
commitbd2a517b2381465eb2cf366fb5d4ad08d6770708 (patch)
treea947e154dfe6fb69c896b08add4f0bf0ee891961 /mysql-test/r/outfile_loaddata.result
parentaddd0a3e67164037149140b71c027272ecbaee49 (diff)
downloadmariadb-git-bd2a517b2381465eb2cf366fb5d4ad08d6770708.tar.gz
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.
Diffstat (limited to 'mysql-test/r/outfile_loaddata.result')
-rw-r--r--mysql-test/r/outfile_loaddata.result20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/r/outfile_loaddata.result b/mysql-test/r/outfile_loaddata.result
index 453e3adb54c..36a72fd84ce 100644
--- a/mysql-test/r/outfile_loaddata.result
+++ b/mysql-test/r/outfile_loaddata.result
@@ -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.