From 93c885bd36569b5b2bd7c85e497ecf9830e848de Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Mon, 12 Oct 2009 11:22:53 +0500 Subject: WL#1397 convert XML -> SQL --- sql/sql_class.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'sql/sql_class.cc') diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 01a1fff3048..11692c2fd9f 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1602,13 +1602,17 @@ bool select_result::check_simple_select() const static String default_line_term("\n",default_charset_info); static String default_escaped("\\",default_charset_info); static String default_field_term("\t",default_charset_info); +static String default_xml_row_term("", default_charset_info); -sql_exchange::sql_exchange(char *name,bool flag) +sql_exchange::sql_exchange(char *name, bool flag, + enum enum_filetype filetype_arg) :file_name(name), opt_enclosed(0), dumpfile(flag), skip_lines(0) { + filetype= filetype_arg; field_term= &default_field_term; enclosed= line_start= &my_empty_string; - line_term= &default_line_term; + line_term= filetype == FILETYPE_CSV ? + &default_line_term : &default_xml_row_term; escaped= &default_escaped; cs= NULL; } -- cgit v1.2.1