diff options
author | unknown <msvensson@pilot.blaudden> | 2007-03-01 18:12:56 +0100 |
---|---|---|
committer | unknown <msvensson@pilot.blaudden> | 2007-03-01 18:12:56 +0100 |
commit | 4a9edcc32c7addea01e7e5b80e452939e7de07c7 (patch) | |
tree | dd839a6db9e2985054d2bc99faaafdc4440866fc /sql/sql_load.cc | |
parent | b9c36948f44b39cb2a9d4c80ea3bbb321ec1e045 (diff) | |
parent | 3616b5e3d574de6863cb9aaa6a642ba67401956b (diff) | |
download | mariadb-git-4a9edcc32c7addea01e7e5b80e452939e7de07c7.tar.gz |
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
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index ede70adc378..7ed1a900fba 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -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 |