mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint BitKeeper/etc/ignore: auto-union client/mysqltest.c: Auto merged extra/comp_err.c: Auto merged include/my_time.h: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/r/mysqltest.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/t/mysqltest.test: Auto merged sql/item.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_strfunc.cc: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/tztime.cc: Auto merged client/mysql_upgrade.c: Manual merge mysql-test/mysql-test-run.pl: Manual merge mysql-test/r/ctype_cp932.result: Manual merge mysql-test/r/mysqlbinlog.result: Manual merge mysql-test/t/ctype_cp932.test: Manual merge mysql-test/t/mysql.test: Manual merge mysql-test/t/mysqlbinlog.test: Manual merge
This commit is contained in:
@ -82,10 +82,11 @@ static int read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
|
||||
List<Item> &set_values, READ_INFO &read_info,
|
||||
String &enclosed, ulong skip_lines,
|
||||
bool ignore_check_option_errors);
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
static bool write_execute_load_query_log_event(THD *thd,
|
||||
bool duplicates, bool ignore,
|
||||
bool transactional_table);
|
||||
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
|
||||
/*
|
||||
Execute LOAD DATA query
|
||||
@ -322,7 +323,8 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
info.handle_duplicates=handle_duplicates;
|
||||
info.escape_char=escaped->length() ? (*escaped)[0] : INT_MAX;
|
||||
|
||||
READ_INFO read_info(file,tot_length,thd->variables.collation_database,
|
||||
READ_INFO read_info(file,tot_length,
|
||||
ex->cs ? ex->cs : thd->variables.collation_database,
|
||||
*field_term,*ex->line_start, *ex->line_term, *enclosed,
|
||||
info.escape_char, read_file_from_client, is_fifo);
|
||||
if (read_info.error)
|
||||
@ -463,7 +465,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
}
|
||||
sprintf(name, ER(ER_LOAD_INFO), (ulong) info.records, (ulong) info.deleted,
|
||||
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
|
||||
send_ok(thd,info.copied+info.deleted,0L,name);
|
||||
|
||||
if (!transactional_table)
|
||||
thd->options|=OPTION_STATUS_NO_TRANS_UPDATE;
|
||||
@ -484,6 +485,8 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
|
||||
if (transactional_table)
|
||||
error=ha_autocommit_or_rollback(thd,error);
|
||||
|
||||
/* ok to client sent only after binlog write and engine commit */
|
||||
send_ok(thd, info.copied + info.deleted, 0L, name);
|
||||
err:
|
||||
if (thd->lock)
|
||||
{
|
||||
@ -495,6 +498,8 @@ err:
|
||||
}
|
||||
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
|
||||
/* Not a very useful function; just to avoid duplication of code */
|
||||
static bool write_execute_load_query_log_event(THD *thd,
|
||||
bool duplicates, bool ignore,
|
||||
@ -510,6 +515,7 @@ static bool write_execute_load_query_log_event(THD *thd,
|
||||
return mysql_bin_log.write(&e);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
** Read of rows of fixed size + optional garage + optonal newline
|
||||
|
Reference in New Issue
Block a user