~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

  • Committer: Brian Aker
  • Date: 2008-08-14 20:59:41 UTC
  • Revision ID: brian@tangent.org-20080814205941-rdqc6mqguf50mvoq
Remove SET

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
  void set_io_cache_arg(void* arg) { cache.arg = arg; }
72
72
};
73
73
 
74
 
static int read_fixed_length(THD *thd, COPY_INFO &info, TableList *table_list,
 
74
static int read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
75
75
                             List<Item> &fields_vars, List<Item> &set_fields,
76
76
                             List<Item> &set_values, READ_INFO &read_info,
77
77
                             uint32_t skip_lines,
78
78
                             bool ignore_check_option_errors);
79
 
static int read_sep_field(THD *thd, COPY_INFO &info, TableList *table_list,
 
79
static int read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
80
80
                          List<Item> &fields_vars, List<Item> &set_fields,
81
81
                          List<Item> &set_values, READ_INFO &read_info,
82
82
                          String &enclosed, uint32_t skip_lines,
108
108
    true - error / false - success
109
109
*/
110
110
 
111
 
int mysql_load(THD *thd,sql_exchange *ex,TableList *table_list,
 
111
int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
112
112
                List<Item> &fields_vars, List<Item> &set_fields,
113
113
                List<Item> &set_values,
114
114
                enum enum_duplicates handle_duplicates, bool ignore,
116
116
{
117
117
  char name[FN_REFLEN];
118
118
  File file;
119
 
  Table *table= NULL;
 
119
  TABLE *table= NULL;
120
120
  int error;
121
121
  String *field_term=ex->field_term,*escaped=ex->escaped;
122
122
  String *enclosed=ex->enclosed;
349
349
    table->file->ha_start_bulk_insert((ha_rows) 0);
350
350
    table->copy_blobs=1;
351
351
 
352
 
    thd->abort_on_warning= true;
 
352
    thd->abort_on_warning= (!ignore &&
 
353
                            (thd->variables.sql_mode &
 
354
                             (MODE_STRICT_TRANS_TABLES |
 
355
                              MODE_STRICT_ALL_TABLES)));
353
356
 
354
357
    if (!field_term->length() && !enclosed->length())
355
358
      error= read_fixed_length(thd, info, table_list, fields_vars,
498
501
****************************************************************************/
499
502
 
500
503
static int
501
 
read_fixed_length(THD *thd, COPY_INFO &info, TableList *table_list,
 
504
read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
502
505
                  List<Item> &fields_vars, List<Item> &set_fields,
503
506
                  List<Item> &set_values, READ_INFO &read_info,
504
507
                  uint32_t skip_lines, bool ignore_check_option_errors)
505
508
{
506
509
  List_iterator_fast<Item> it(fields_vars);
507
510
  Item_field *sql_field;
508
 
  Table *table= table_list->table;
 
511
  TABLE *table= table_list->table;
509
512
  uint64_t id;
510
513
  bool err;
511
514
 
614
617
 
615
618
 
616
619
static int
617
 
read_sep_field(THD *thd, COPY_INFO &info, TableList *table_list,
 
620
read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list,
618
621
               List<Item> &fields_vars, List<Item> &set_fields,
619
622
               List<Item> &set_values, READ_INFO &read_info,
620
623
               String &enclosed, uint32_t skip_lines,
622
625
{
623
626
  List_iterator_fast<Item> it(fields_vars);
624
627
  Item *item;
625
 
  Table *table= table_list->table;
 
628
  TABLE *table= table_list->table;
626
629
  uint enclosed_length;
627
630
  uint64_t id;
628
631
  bool err;