~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:24:18 UTC
  • mfrom: (2159.1.1 remove-lint)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172418-vd210j88hiwk8jih
Removed the lint stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
/* Copy data from a textfile to table */
18
18
 
19
 
#include <config.h>
 
19
#include "config.h"
20
20
 
21
21
#include <drizzled/sql_load.h>
22
22
#include <drizzled/error.h>
24
24
#include <drizzled/session.h>
25
25
#include <drizzled/sql_base.h>
26
26
#include <drizzled/field/epoch.h>
27
 
#include <drizzled/internal/my_sys.h>
28
 
#include <drizzled/internal/iocache.h>
29
 
#include <drizzled/plugin/storage_engine.h>
 
27
#include "drizzled/internal/my_sys.h"
 
28
#include "drizzled/internal/iocache.h"
 
29
#include <drizzled/db.h>
 
30
#include "drizzled/plugin/storage_engine.h"
30
31
 
31
32
#include <sys/stat.h>
32
33
#include <fcntl.h>
156
157
  if (session->openTablesLock(table_list))
157
158
    return(true);
158
159
 
159
 
  if (setup_tables_and_check_access(session, &session->getLex()->select_lex.context,
160
 
                                    &session->getLex()->select_lex.top_join_list,
 
160
  if (setup_tables_and_check_access(session, &session->lex->select_lex.context,
 
161
                                    &session->lex->select_lex.top_join_list,
161
162
                                    table_list,
162
 
                                    &session->getLex()->select_lex.leaf_tables, true))
 
163
                                    &session->lex->select_lex.leaf_tables, true))
163
164
     return(-1);
164
165
 
165
166
  /*
225
226
 
226
227
  size_t tot_length=0;
227
228
  bool use_blobs= 0, use_vars= 0;
228
 
  List<Item>::iterator it(fields_vars.begin());
 
229
  List_iterator_fast<Item> it(fields_vars);
229
230
  Item *item;
230
231
 
231
232
  while ((item= it++))
431
432
                  List<Item> &set_values, READ_INFO &read_info,
432
433
                  uint32_t skip_lines, bool ignore_check_option_errors)
433
434
{
434
 
  List<Item>::iterator it(fields_vars.begin());
 
435
  List_iterator_fast<Item> it(fields_vars);
435
436
  Item_field *sql_field;
436
437
  Table *table= table_list->table;
437
438
  uint64_t id;
457
458
      skip_lines--;
458
459
      continue;
459
460
    }
460
 
    it= fields_vars.begin();
 
461
    it.rewind();
461
462
    unsigned char *pos=read_info.row_start;
462
463
#ifdef HAVE_VALGRIND
463
464
    read_info.row_end[0]=0;
552
553
               String &enclosed, uint32_t skip_lines,
553
554
               bool ignore_check_option_errors)
554
555
{
555
 
  List<Item>::iterator it(fields_vars.begin());
 
556
  List_iterator_fast<Item> it(fields_vars);
556
557
  Item *item;
557
558
  Table *table= table_list->table;
558
559
  uint32_t enclosed_length;
562
563
  enclosed_length=enclosed.length();
563
564
  id= 0;
564
565
 
565
 
  for (;;it= fields_vars.begin())
 
566
  for (;;it.rewind())
566
567
  {
567
568
    if (session->getKilled())
568
569
    {