~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

  • Committer: Brian Aker
  • Date: 2008-12-18 21:36:23 UTC
  • mfrom: (685.4.10 enable-tests)
  • Revision ID: brian@tangent.org-20081218213623-nsgvfbcax1z6epx4
Merge from Jay

Show diffs side-by-side

added added

removed removed

Lines of Context:
134
134
  bool transactional_table;
135
135
  Session::killed_state killed_status= Session::NOT_KILLED;
136
136
 
137
 
  if (escaped->length() > 1 || enclosed->length() > 1)
 
137
  /* Escape and enclosed character may be a utf8 4-byte character */
 
138
  if (escaped->length() > 4 || enclosed->length() > 4)
138
139
  {
139
 
    my_message(ER_WRONG_FIELD_TERMINATORS,ER(ER_WRONG_FIELD_TERMINATORS),
140
 
               MYF(0));
 
140
    my_error(ER_WRONG_FIELD_TERMINATORS,MYF(0),enclosed->c_ptr(), enclosed->length());
141
141
    return(true);
142
142
  }
143
143
  if (open_and_lock_tables(session, table_list))
322
322
    return(true);                               // Can't allocate buffers
323
323
  }
324
324
 
325
 
  session->count_cuted_fields= CHECK_FIELD_WARN;                /* calc cuted fields */
 
325
  /*
 
326
   * Per the SQL standard, inserting NULL into a NOT NULL
 
327
   * field requires an error to be thrown.
 
328
   *
 
329
   * @NOTE
 
330
   *
 
331
   * NULL check and handling occurs in field_conv.cc
 
332
   */
 
333
  session->count_cuted_fields= CHECK_FIELD_ERROR_FOR_NULL;
326
334
  session->cuted_fields=0L;
327
335
  /* Skip lines if there is a line terminator */
328
336
  if (ex->line_term->length())