From 71ce58a3b1f0b2d4ec776bc7864076603b3170f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Dec 2001 16:49:10 +0200 Subject: This is a large push. Included are : * multi-table updates * new paid feature for limiting number of queries per hour for users * optional syntax for multi-table deletes * optimization for SQL_CALC_FOUND_ROWS * a small addition for CREATE .. SELECT that will be of future use I know that all this will require many additions to documentation, which I have not done, but I am at Arjen's disposal to help him document all this. libmysqld/lib_sql.cc: This is a small change required due to new paid feature of limiting number of queries per hour for each user. mysql-test/r/multi_update.result: Change of the result to accomodate multi-table updates mysql-test/t/multi_update.test: Change in multi-table tests to accomodate multi-table updates BitKeeper/etc/ignore: Added 50 sql/new.cc to the ignore list scripts/mysql_install_db.sh: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/item_timefunc.h: This is a small feature that will be of use later in the proper creation of the tables out of CREATE ... SELECT... Further changes will come after this resolve/push/test passes .. sql/lex.h: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/mysql_priv.h: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/mysqld.cc: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/sql_acl.cc: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/sql_acl.h: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/sql_class.h: These are changes required for multi-table updates. sql/sql_lex.h: Changes required for both multi-table updates and limiting number of queries per hour (paid feature). sql/sql_parse.cc: Ha ! So many changes. * multi-table updates * limiting number of queries per hour for users sql/sql_select.cc: Optimisation for SQL_CALC_FOUND_ROWS, when a query involves a single table, without WHERE or GROUP clause sql/sql_update.cc: multi-table updates sql/sql_yacc.yy: Many things : * multi-table updates * limiting number of queries per hour for users * new optional syntax for multi-table deletes. This one is different from the one demanded by user. USING clause MUST include ALL tables, not just the ones that are used and not deleted from. --- sql/sql_class.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'sql/sql_class.h') diff --git a/sql/sql_class.h b/sql/sql_class.h index e4756284bf5..d842db8c143 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -652,4 +652,33 @@ public: bool send_eof(); }; + class multi_update : public select_result { + TABLE_LIST *update_tables, *table_being_updated; +// Unique **tempfiles; + COPY_INFO *infos; + TABLE **tmp_tables; + THD *thd; + ha_rows updated, found; + List fields; + List **fields_by_tables; + thr_lock_type lock_option; + enum enum_duplicates dupl; + uint num_of_tables, num_fields, num_updated, *save_time_stamps, *field_sequence; + int error; + bool do_update; + public: + multi_update(THD *thd_arg, TABLE_LIST *ut, List &fs, + enum enum_duplicates handle_duplicates, + thr_lock_type lock_option_arg, uint num); + ~multi_update(); + int prepare(List &list); + bool send_fields(List &list, + uint flag) { return 0; } + bool send_data(List &items); + void initialize_tables (JOIN *join); + void send_error(uint errcode,const char *err); + int do_updates (bool from_send_error); + bool send_eof(); + }; + -- cgit v1.2.1