~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

  • Committer: Brian Aker
  • Date: 2011-02-22 06:12:02 UTC
  • mfrom: (2190.1.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110222061202-k03czxykqy4x9hjs
List update, header fixes, multiple symbols, and David deletes some code.

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