1465
class select_to_file :public select_result_interceptor {
1467
file_exchange *exchange;
1471
char path[FN_REFLEN];
1474
select_to_file(file_exchange *ex) :exchange(ex), file(-1),row_count(0L)
1477
void send_error(uint32_t errcode,const char *err);
1483
1465
#define ESCAPE_CHARS "ntrb0ZN" // keep synchronous with READ_INFO::unescape
1487
List of all possible characters of a numeric value text representation.
1489
#define NUMERIC_CHARS ".0123456789e+-"
1492
class select_export :public select_to_file {
1493
uint32_t field_term_length;
1494
int field_sep_char,escape_char,line_sep_char;
1495
int field_term_char; // first char of FIELDS TERMINATED BY or MAX_INT
1497
The is_ambiguous_field_sep field is true if a value of the field_sep_char
1498
field is one of the 'n', 't', 'r' etc characters
1499
(see the READ_INFO::unescape method and the ESCAPE_CHARS constant value).
1501
bool is_ambiguous_field_sep;
1503
The is_ambiguous_field_term is true if field_sep_char contains the first
1504
char of the FIELDS TERMINATED BY (ENCLOSED BY is empty), and items can
1505
contain this character.
1507
bool is_ambiguous_field_term;
1509
The is_unsafe_field_sep field is true if a value of the field_sep_char
1510
field is one of the '0'..'9', '+', '-', '.' and 'e' characters
1511
(see the NUMERIC_CHARS constant value).
1513
bool is_unsafe_field_sep;
1514
bool fixed_row_size;
1516
select_export(file_exchange *ex) :select_to_file(ex) {}
1518
int prepare(List<Item> &list, Select_Lex_Unit *u);
1519
bool send_data(List<Item> &items);
1523
class select_dump :public select_to_file {
1525
select_dump(file_exchange *ex) :select_to_file(ex) {}
1526
int prepare(List<Item> &list, Select_Lex_Unit *u);
1527
bool send_data(List<Item> &items);
1531
class select_insert :public select_result_interceptor {
1533
TableList *table_list;
1536
uint64_t autoinc_value_of_last_inserted_row; // autogenerated or not
1538
bool insert_into_view;
1539
select_insert(TableList *table_list_par,
1540
Table *table_par, List<Item> *fields_par,
1541
List<Item> *update_fields, List<Item> *update_values,
1542
enum_duplicates duplic, bool ignore);
1544
int prepare(List<Item> &list, Select_Lex_Unit *u);
1545
virtual int prepare2(void);
1546
bool send_data(List<Item> &items);
1547
virtual void store_values(List<Item> &values);
1548
virtual bool can_rollback_data() { return 0; }
1549
void send_error(uint32_t errcode,const char *err);
1552
/* not implemented: select_insert is never re-used in prepared statements */
1557
class select_create: public select_insert {
1559
TableList *create_table;
1560
HA_CREATE_INFO *create_info;
1561
TableList *select_tables;
1562
Alter_info *alter_info;
1564
/* lock data for tmp table */
1565
DRIZZLE_LOCK *m_lock;
1566
/* m_lock or session->extra_lock */
1567
DRIZZLE_LOCK **m_plock;
1569
select_create (TableList *table_arg,
1570
HA_CREATE_INFO *create_info_par,
1571
Alter_info *alter_info_arg,
1572
List<Item> &select_fields,enum_duplicates duplic, bool ignore,
1573
TableList *select_tables_arg)
1574
:select_insert (NULL, NULL, &select_fields, 0, 0, duplic, ignore),
1575
create_table(table_arg),
1576
create_info(create_info_par),
1577
select_tables(select_tables_arg),
1578
alter_info(alter_info_arg),
1581
int prepare(List<Item> &list, Select_Lex_Unit *u);
1583
void store_values(List<Item> &values);
1584
void send_error(uint32_t errcode,const char *err);
1587
virtual bool can_rollback_data() { return 1; }
1589
// Needed for access from local class MY_HOOKS in prepare(), since session is proteted.
1590
const Session *get_session(void) { return session; }
1591
const HA_CREATE_INFO *get_create_info() { return create_info; };
1592
int prepare2(void) { return 0; }
1467
#include <drizzled/select_to_file.h>
1469
#include <drizzled/select_export.h>
1471
#include <drizzled/select_dump.h>
1473
#include <drizzled/select_insert.h>
1475
#include <drizzled/select_create.h>
1595
1479
#include <storage/myisam/myisam.h>