diff options
author | Alexander Nozdrin <alik@sun.com> | 2009-10-23 15:22:21 +0400 |
---|---|---|
committer | Alexander Nozdrin <alik@sun.com> | 2009-10-23 15:22:21 +0400 |
commit | 069d78c06714233dcdc6011fa3262a54df6a1ed4 (patch) | |
tree | 9a94748e3f29d58645ae7979faaf09464080033d /sql/sql_class.cc | |
parent | 40c0ae812965d86406f8e44fc0c4af0914858d46 (diff) | |
parent | 2f5413ebc5a47ed45abe0d3c660cfbf673c666e2 (diff) | |
download | mariadb-git-069d78c06714233dcdc6011fa3262a54df6a1ed4.tar.gz |
Merge from mysql-next-mr.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r-- | sql/sql_class.cc | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 8ec48b1344b..36012006137 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -42,6 +42,7 @@ #include "sp_rcontext.h" #include "sp_cache.h" +#include "debug_sync.h" /* The following is used to initialise Table_ident with a internal @@ -444,6 +445,9 @@ THD::THD() derived_tables_processing(FALSE), spcont(NULL), m_parser_state(NULL), +#if defined(ENABLED_DEBUG_SYNC) + debug_sync_control(0), +#endif /* defined(ENABLED_DEBUG_SYNC) */ main_warning_info(0) { ulong tmp; @@ -894,6 +898,11 @@ void THD::init(void) reset_current_stmt_binlog_row_based(); bzero((char *) &status_var, sizeof(status_var)); sql_log_bin_toplevel= options & OPTION_BIN_LOG; + +#if defined(ENABLED_DEBUG_SYNC) + /* Initialize the Debug Sync Facility. See debug_sync.cc. */ + debug_sync_init_thread(this); +#endif /* defined(ENABLED_DEBUG_SYNC) */ } @@ -973,6 +982,12 @@ void THD::cleanup(void) lock=locked_tables; locked_tables=0; close_thread_tables(this); } + +#if defined(ENABLED_DEBUG_SYNC) + /* End the Debug Sync Facility. See debug_sync.cc. */ + debug_sync_end_thread(this); +#endif /* defined(ENABLED_DEBUG_SYNC) */ + mysql_ha_cleanup(this); delete_dynamic(&user_var_events); my_hash_free(&user_vars); @@ -1601,13 +1616,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("<row>", 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; } |