diff options
author | Andrei Elkin <aelkin@mysql.com> | 2009-11-06 18:35:04 +0200 |
---|---|---|
committer | Andrei Elkin <aelkin@mysql.com> | 2009-11-06 18:35:04 +0200 |
commit | 3c1e1f6d6c7caa8916a03ac9594ff950e6b380e3 (patch) | |
tree | 44a02955b1dc18fc2e94cd0b4dc6ef62cd81d936 /sql/sql_class.h | |
parent | 39f7da882e2a90e8d5eb3f49c4ba361f2b631ad9 (diff) | |
parent | 0777ef567df6ac183abc45f4ace867e25d6d59a3 (diff) | |
download | mariadb-git-3c1e1f6d6c7caa8916a03ac9594ff950e6b380e3.tar.gz |
merging 5.1 main -> rpl+2. Some manual work required mostly due to bug46640
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 60 |
1 files changed, 58 insertions, 2 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 36bfc398e19..8c3a4f2e62d 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1096,6 +1096,31 @@ public: /** + This class is an internal error handler implementation for + DROP TABLE statements. The thing is that there may be warnings during + execution of these statements, which should not be exposed to the user. + This class is intended to silence such warnings. +*/ + +class Drop_table_error_handler : public Internal_error_handler +{ +public: + Drop_table_error_handler(Internal_error_handler *err_handler) + :m_err_handler(err_handler) + { } + +public: + bool handle_error(uint sql_errno, + const char *message, + MYSQL_ERROR::enum_warning_level level, + THD *thd); + +private: + Internal_error_handler *m_err_handler; +}; + + +/** Stores status of the currently executed statement. Cleared at the beginning of the statement, and then can hold either OK, ERROR, or EOF status. @@ -1872,6 +1897,11 @@ public: partition_info *work_part_info; #endif +#if defined(ENABLED_DEBUG_SYNC) + /* Debug Sync facility. See debug_sync.cc. */ + struct st_debug_sync_control *debug_sync_control; +#endif /* defined(ENABLED_DEBUG_SYNC) */ + THD(); ~THD(); @@ -2602,7 +2632,32 @@ public: MI_COLUMNDEF *recinfo,*start_recinfo; KEY *keyinfo; ha_rows end_write_records; - uint field_count,sum_func_count,func_count; + /** + Number of normal fields in the query, including those referred to + from aggregate functions. Hence, "SELECT `field1`, + SUM(`field2`) from t1" sets this counter to 2. + + @see count_field_types + */ + uint field_count; + /** + Number of fields in the query that have functions. Includes both + aggregate functions (e.g., SUM) and non-aggregates (e.g., RAND). + Also counts functions referred to from aggregate functions, i.e., + "SELECT SUM(RAND())" sets this counter to 2. + + @see count_field_types + */ + uint func_count; + /** + Number of fields in the query that have aggregate functions. Note + that the optimizer may choose to optimize away these fields by + replacing them with constants, in which case sum_func_count will + need to be updated. + + @see opt_sum_query, count_field_types + */ + uint sum_func_count; uint hidden_field_count; uint group_parts,group_length,group_null_parts; uint quick_group; @@ -2867,7 +2922,8 @@ public: bool send_data(List<Item> &items); bool initialize_tables (JOIN *join); void send_error(uint errcode,const char *err); - int do_deletes(); + int do_deletes(); + int do_table_deletes(TABLE *table, bool ignore); bool send_eof(); virtual void abort(); }; |