summaryrefslogtreecommitdiff
path: root/libmysql
diff options
context:
space:
mode:
authorGleb Shchepa <gshchepa@mysql.com>2009-07-31 22:14:52 +0500
committerGleb Shchepa <gshchepa@mysql.com>2009-07-31 22:14:52 +0500
commit4e95179af9c2f2589093ea9f94472d8d047892c7 (patch)
treed3022917ee0647bbcdfe1a41e7b73aa60a6ebd7f /libmysql
parent7d8b967a86f077754ad74cee6aff0543984beba4 (diff)
downloadmariadb-git-4e95179af9c2f2589093ea9f94472d8d047892c7.tar.gz
Bug# 30946: mysqldump silently ignores --default-character-set
when used with --tab 1) New syntax: added CHARACTER SET clause to the SELECT ... INTO OUTFILE (to complement the same clause in LOAD DATA INFILE). mysqldump is updated to use this in --tab mode. 2) ESCAPED BY/ENCLOSED BY field parameters are documented as accepting CHAR argument, however SELECT .. INTO OUTFILE silently ignored rests of multisymbol arguments. For the symmetrical behavior with LOAD DATA INFILE the server has been modified to fail with the same error: ERROR 42000: Field separator argument is not what is expected; check the manual 3) Current LOAD DATA INFILE recognizes field/line separators "as is" without converting from client charset to data file charset. So, it is supposed, that input file of LOAD DATA INFILE consists of data in one charset and separators in other charset. For the compatibility with that [buggy] behaviour SELECT INTO OUTFILE implementation has been saved "as is" too, but the new warning message has been added: Non-ASCII separator arguments are not fully supported This message warns on field/line separators that contain non-ASCII symbols. client/mysqldump.c: mysqldump has been updated to call SELECT ... INTO OUTFILE statement with a charset from the --default-charset command line parameter. mysql-test/r/mysqldump.result: Added test case for bug #30946. mysql-test/r/outfile_loaddata.result: Added test case for bug #30946. mysql-test/t/mysqldump.test: Added test case for bug #30946. mysql-test/t/outfile_loaddata.test: Added test case for bug #30946. sql/field.cc: String conversion code has been moved from check_string_copy_error() to convert_to_printable() for reuse. sql/share/errmsg.txt: New WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED message has been added. sql/sql_class.cc: The select_export::prepare() method has been modified to: 1) raise the ER_WRONG_FIELD_TERMINATORS error on multisymbol ENCLOSED BY/ESCAPED BY field arguments like LOAD DATA INFILE; 2) warn with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED message on non-ASCII field or line separators. The select_export::send_data() merhod has been modified to convert item data to output charset (see new SELECT INTO OUTFILE syntax). By default the BINARY charset is used for backward compatibility. sql/sql_class.h: The select_export::write_cs field added to keep output charset. sql/sql_load.cc: mysql_load has been modified to warn on non-ASCII field or line separators with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED message. sql/sql_string.cc: New global function has been added: convert_to_printable() (common code has been moved from check_string_copy_error()). sql/sql_string.h: New String::is_ascii() method and new global convert_to_printable() function have been added. sql/sql_yacc.yy: New syntax: added CHARACTER SET clause to the SELECT ... INTO OUTFILE (to complement the same clause in LOAD DATA INFILE). By default the BINARY charset is used for backward compatibility.
Diffstat (limited to 'libmysql')
0 files changed, 0 insertions, 0 deletions