diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-11-19 17:23:39 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-11-19 17:23:39 +0100 |
commit | 3495801e2e94df5a10cae6e056f65defa038a6b6 (patch) | |
tree | de524b4bf45dbc19a95262843f2b72d0f5adb7bc /sql/sql_load.cc | |
parent | df7b27f1fe308fd4011fa020bebd7c69bcd43383 (diff) | |
parent | 496fda66fdc34b447ef4dec26d1250b034a321e3 (diff) | |
download | mariadb-git-3495801e2e94df5a10cae6e056f65defa038a6b6.tar.gz |
5.5 merge
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r-- | sql/sql_load.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc index c0d9b58569e..6ecdddc3008 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -148,14 +148,8 @@ static int read_xml_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, bool ignore_check_option_errors); #ifndef EMBEDDED_LIBRARY -static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex, - const char* db_arg, /* table's database */ - const char* table_name_arg, - bool is_concurrent, - enum enum_duplicates duplicates, - bool ignore, - bool transactional_table, - int errocode); +static bool write_execute_load_query_log_event(THD *, sql_exchange*, const + char*, const char*, bool, enum enum_duplicates, bool, bool, int); #endif /* EMBEDDED_LIBRARY */ /* @@ -284,9 +278,15 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, if (!fields_vars.elements) { - Field **field; - for (field=table->field; *field ; field++) - fields_vars.push_back(new Item_field(*field)); + Field_iterator_table_ref field_iterator; + field_iterator.set(table_list); + for (; !field_iterator.end_of_fields(); field_iterator.next()) + { + Item *item; + if (!(item= field_iterator.create_item(thd))) + DBUG_RETURN(TRUE); + fields_vars.push_back(item->real_item()); + } bitmap_set_all(table->write_set); /* Let us also prepare SET clause, altough it is probably empty @@ -724,7 +724,7 @@ static bool write_execute_load_query_log_event(THD *thd, sql_exchange* ex, { if (n++) query_str.append(", "); - if (item->type() == Item::FIELD_ITEM) + if (item->real_type() == Item::FIELD_ITEM) append_identifier(thd, &query_str, item->name, strlen(item->name)); else { |