diff options
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 7971137d848..51dc8270d09 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -962,41 +962,45 @@ public: }; -class select_export :public select_result { +class select_to_file :public select_result { +protected: sql_exchange *exchange; File file; IO_CACHE cache; ha_rows row_count; + char path[FN_REFLEN]; + +public: + select_to_file(sql_exchange *ex) :exchange(ex), file(-1),row_count(0L) + { path[0]=0; } + ~select_to_file(); + bool send_fields(List<Item> &list, uint flag) { return 0; } + void send_error(uint errcode,const char *err); +}; + + +class select_export :public select_to_file { uint field_term_length; int field_sep_char,escape_char,line_sep_char; bool fixed_row_size; public: - select_export(sql_exchange *ex) :exchange(ex),file(-1),row_count(0L) {} + select_export(sql_exchange *ex) :select_to_file(ex) {} ~select_export(); int prepare(List<Item> &list, SELECT_LEX_UNIT *u); - bool send_fields(List<Item> &list, - uint flag) { return 0; } bool send_data(List<Item> &items); - void send_error(uint errcode,const char *err); bool send_eof(); }; -class select_dump :public select_result { +class select_dump :public select_to_file { sql_exchange *exchange; File file; IO_CACHE cache; ha_rows row_count; - char path[FN_REFLEN]; public: - select_dump(sql_exchange *ex) :exchange(ex),file(-1),row_count(0L) - { path[0]=0; } - ~select_dump(); + select_dump(sql_exchange *ex) :select_to_file(ex) {} int prepare(List<Item> &list, SELECT_LEX_UNIT *u); - bool send_fields(List<Item> &list, - uint flag) { return 0; } bool send_data(List<Item> &items); - void send_error(uint errcode,const char *err); bool send_eof(); }; |