~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_load.cc

Merge Monty

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 <drizzled/server_includes.h>
 
19
#include "config.h"
20
20
#include <drizzled/sql_load.h>
21
21
#include <drizzled/error.h>
22
22
#include <drizzled/data_home.h>
25
25
#include <drizzled/field/timestamp.h>
26
26
#include <drizzled/db.h>
27
27
 
 
28
#include <sys/stat.h>
 
29
#include <fcntl.h>
28
30
#include <algorithm>
 
31
#include <climits>
29
32
 
30
33
using namespace std;
31
34
 
32
35
class READ_INFO {
33
 
  File  cursor;
 
36
  int   cursor;
34
37
  unsigned char *buffer;                /* Buffer for read text */
35
38
  unsigned char *end_of_buff;           /* Data in bufferts ends here */
36
39
  size_t buff_length;                   /* Length of buffert */
49
52
        *row_end;                       /* Found row ends here */
50
53
  const CHARSET_INFO *read_charset;
51
54
 
52
 
  READ_INFO(File cursor, size_t tot_length, const CHARSET_INFO * const cs,
 
55
  READ_INFO(int cursor, size_t tot_length, const CHARSET_INFO * const cs,
53
56
            String &field_term,String &line_start,String &line_term,
54
57
            String &enclosed,int escape, bool is_fifo);
55
58
  ~READ_INFO();
116
119
                enum enum_duplicates handle_duplicates, bool ignore)
117
120
{
118
121
  char name[FN_REFLEN];
119
 
  File file;
 
122
  int file;
120
123
  Table *table= NULL;
121
124
  int error;
122
125
  String *field_term=ex->field_term,*escaped=ex->escaped;
730
733
*/
731
734
 
732
735
 
733
 
READ_INFO::READ_INFO(File file_par, size_t tot_length,
 
736
READ_INFO::READ_INFO(int file_par, size_t tot_length,
734
737
                     const CHARSET_INFO * const cs,
735
738
                     String &field_term, String &line_start, String &line_term,
736
739
                     String &enclosed_par, int escape, bool is_fifo)