1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Merged from 5.0 (enterprise).

This commit is contained in:
Chad MILLER
2008-12-17 15:01:34 -05:00
267 changed files with 9325 additions and 2462 deletions

View File

@@ -191,7 +191,8 @@ THD::THD()
rand_used(0), time_zone_used(0),
last_insert_id_used(0), last_insert_id_used_bin_log(0), insert_id_used(0),
clear_next_insert_id(0), in_lock_tables(0), bootstrap(0),
derived_tables_processing(FALSE), spcont(NULL), m_lip(NULL)
derived_tables_processing(FALSE), spcont(NULL),
m_parser_state(NULL)
{
ulong tmp;
@@ -990,6 +991,12 @@ sql_exchange::sql_exchange(char *name,bool flag)
cs= NULL;
}
bool sql_exchange::escaped_given(void)
{
return escaped != &default_escaped;
}
bool select_send::send_fields(List<Item> &list, uint flags)
{
bool res;
@@ -1250,8 +1257,11 @@ select_export::prepare(List<Item> &list, SELECT_LEX_UNIT *u)
exchange->line_term=exchange->field_term; // Use this if it exists
field_sep_char= (exchange->enclosed->length() ?
(int) (uchar) (*exchange->enclosed)[0] : field_term_char);
escape_char= (exchange->escaped->length() ?
(int) (uchar) (*exchange->escaped)[0] : -1);
if (exchange->escaped->length() && (exchange->escaped_given() ||
!(thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES)))
escape_char= (int) (uchar) (*exchange->escaped)[0];
else
escape_char= -1;
is_ambiguous_field_sep= test(strchr(ESCAPE_CHARS, field_sep_char));
is_unsafe_field_sep= test(strchr(NUMERIC_CHARS, field_sep_char));
line_sep_char= (exchange->line_term->length() ?