~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

  • Committer: Lee Bieber
  • Date: 2011-02-11 20:30:05 UTC
  • mfrom: (2157.1.3 build)
  • Revision ID: kalebral@gmail.com-20110211203005-757o1y2yf78dxzqr
Merge Stewart - 716848: drizzleimport displays wrong program_name
Merge Stewart - update README file
Merge Andrew and Joe - Exposes the InnoDB SYS_REPLICATION_LOG to data_dictionary so that it is fast and fixes many issues we have been having

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