diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2001-06-07 14:10:58 +0300 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2001-06-07 14:10:58 +0300 |
commit | 823586b2c755a6a64861b7a8e292baf4750f6ee2 (patch) | |
tree | dd2be2dec43e6f6be30389e81bd803459d639fb6 /sql/sql_class.h | |
parent | 4e886689b2095185cd675ec88f4e40f77b6074b1 (diff) | |
download | mariadb-git-823586b2c755a6a64861b7a8e292baf4750f6ee2.tar.gz |
Enhancing both multi-table delete and division of LEX
sql/filesort.cc:
removing of some extra comments
sql/sql_class.h:
Clear division between new and old stripping code
sql/sql_delete.cc:
Stripping of unnecessary code and making it more efficient
sql/sql_parse.cc:
Better split of LEX into two and enhancements in multi table delete
sql/sql_yacc.yy:
More efficient division of LEX and optional syntax in multi - table delete
sql/uniques.cc:
fixing some additional bugs
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 60 |
1 files changed, 32 insertions, 28 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 19ac075697b..3b83558ebdb 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -464,34 +464,6 @@ public: void send_error(uint errcode,const char *err); bool send_eof(); }; - - class multi_delete : public select_result { - TABLE_LIST *delete_tables, *table_being_deleted; - IO_CACHE **tempfiles; - thr_lock_type lock_option; - ulong deleted; - byte *dup_checking, wrong_record[MAX_REFLENGTH], *memory_lane; - int num_of_tables, error; - bool do_delete; - THD *thd; - public: - multi_delete(TABLE_LIST *dt, thr_lock_type o, uint n) - : delete_tables (dt), lock_option(o), deleted(0), num_of_tables(n), error(0) - { - memset(wrong_record,'\xFF',MAX_REFLENGTH); - thd = current_thd; do_delete = false; - } - ~multi_delete(); - int prepare(List<Item> &list); - bool send_fields(List<Item> &list, - uint flag) { return 0; } - bool send_data(List<Item> &items); - void send_error(uint errcode,const char *err); - int do_deletes (bool from_send_error); - bool send_eof(); - }; - - class select_insert :public select_result { protected: TABLE *table; @@ -619,3 +591,35 @@ public: friend int unique_write_to_file(gptr key, element_count count, Unique *unique); friend int unique_write_to_ptrs(gptr key, element_count count, Unique *unique); }; + + class multi_delete : public select_result { + TABLE_LIST *delete_tables, *table_being_deleted; +#ifdef SINISAS_STRIP + IO_CACHE **tempfiles; + byte *memory_lane; +#else + Unique **tempfiles; +#endif + byte * dup_checking; + THD *thd; + ha_rows deleted; + int num_of_tables, error; + thr_lock_type lock_option; + bool do_delete; + public: + multi_delete(TABLE_LIST *dt, thr_lock_type o, uint n) + : delete_tables (dt), lock_option(o), deleted(0), num_of_tables(n), error(0) + { + thd = current_thd; do_delete = false; + } + ~multi_delete(); + int prepare(List<Item> &list); + bool send_fields(List<Item> &list, + uint flag) { return 0; } + bool send_data(List<Item> &items); + void send_error(uint errcode,const char *err); + int do_deletes (bool from_send_error); + bool send_eof(); + }; + + |