~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.h

  • Committer: Brian Aker
  • Date: 2009-02-05 07:50:45 UTC
  • mfrom: (831.1.3 insert)
  • Revision ID: brian@tangent.org-20090205075045-2jumebo4fa85oc4m
Merge me (aka brian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <drizzled/current_session.h>
34
34
#include <drizzled/sql_error.h>
35
35
#include <drizzled/query_arena.h>
 
36
#include <drizzled/file_exchange.h>
36
37
#include <string>
37
38
#include <bitset>
38
39
 
1439
1440
}
1440
1441
 
1441
1442
/*
1442
 
  Used to hold information about file and file structure in exchange
1443
 
  via non-DB file (...INTO OUTFILE..., ...LOAD DATA...)
1444
 
  XXX: We never call destructor for objects of this class.
1445
 
*/
1446
 
 
1447
 
class sql_exchange :public Sql_alloc
1448
 
{
1449
 
public:
1450
 
  enum enum_filetype filetype; /* load XML, Added by Arnold & Erik */
1451
 
  char *file_name;
1452
 
  String *field_term,*enclosed,*line_term,*line_start,*escaped;
1453
 
  bool opt_enclosed;
1454
 
  bool dumpfile;
1455
 
  ulong skip_lines;
1456
 
  const CHARSET_INFO *cs;
1457
 
  sql_exchange(char *name, bool dumpfile_flag,
1458
 
               enum_filetype filetype_arg= FILETYPE_CSV);
1459
 
};
1460
 
 
1461
 
/*
1462
1443
  This is used to get result from a select
1463
1444
*/
1464
1445
 
1538
1519
 
1539
1520
class select_to_file :public select_result_interceptor {
1540
1521
protected:
1541
 
  sql_exchange *exchange;
 
1522
  file_exchange *exchange;
1542
1523
  File file;
1543
1524
  IO_CACHE cache;
1544
1525
  ha_rows row_count;
1545
1526
  char path[FN_REFLEN];
1546
1527
 
1547
1528
public:
1548
 
  select_to_file(sql_exchange *ex) :exchange(ex), file(-1),row_count(0L)
 
1529
  select_to_file(file_exchange *ex) :exchange(ex), file(-1),row_count(0L)
1549
1530
  { path[0]=0; }
1550
1531
  ~select_to_file();
1551
1532
  void send_error(uint32_t errcode,const char *err);
1587
1568
  bool is_unsafe_field_sep;
1588
1569
  bool fixed_row_size;
1589
1570
public:
1590
 
  select_export(sql_exchange *ex) :select_to_file(ex) {}
 
1571
  select_export(file_exchange *ex) :select_to_file(ex) {}
1591
1572
  ~select_export();
1592
1573
  int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
1593
1574
  bool send_data(List<Item> &items);
1596
1577
 
1597
1578
class select_dump :public select_to_file {
1598
1579
public:
1599
 
  select_dump(sql_exchange *ex) :select_to_file(ex) {}
 
1580
  select_dump(file_exchange *ex) :select_to_file(ex) {}
1600
1581
  int prepare(List<Item> &list, SELECT_LEX_UNIT *u);
1601
1582
  bool send_data(List<Item> &items);
1602
1583
};