From 8b7a63b17f838c012f870e997a63d72c8d696fcf Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Mon, 29 Aug 2011 20:38:21 +0300 Subject: Added logging of all messages (also system warnings) one gets during a MyISAM recovery or auto-recovery. sql/mysqld.cc: Log errors if thd->log_all_errors is set sql/sql_class.cc: Add log_all_errors sql/sql_class.h: Add log_all_errors storage/myisam/ha_myisam.cc: Write db and table name for all logged errors Log errors also during auto_recovery During auto_recovery, set thd->log_all_errors if log_warnings >2 to ensure that system errors are also logged to file --- sql/sql_class.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/sql_class.h') diff --git a/sql/sql_class.h b/sql/sql_class.h index ddad3f4dfc9..92de010c4b4 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1467,6 +1467,8 @@ public: bool sql_log_bin_toplevel; /* True when opt_userstat_running is set at start of query */ bool userstat_running; + /* True if we want to log all errors */ + bool log_all_errors; /* container for handler's private per-connection data */ Ha_data ha_data[MAX_HA]; -- cgit v1.2.1 From 37a8497d494ea256ff4b13a89e62150e06a17dae Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Sep 2011 10:11:13 +0300 Subject: LP BUG#823169 fix. For ANY subqueries NULLs should be ignored (if there is other values) when finding max min. For ALL subqueries NULLs should be saved if they found. Optimisation for ALL suqbueries if NULL is possible in the SELECT list with max/min aggregate function switched off. Some test changed where NULL is not used but optimization with max/min aggregate function important so NOT NULL added. mysql-test/r/explain.result: Forced old optimization. mysql-test/r/subselect.result: Forced old optimization. New test suite. mysql-test/t/explain.test: Forced old optimization. mysql-test/t/subselect.test: Forced old optimization. New test suite. sql/item_subselect.cc: Store converted subquery type. Switch off aggregate function optimisation for ALL and nulls. sql/sql_class.cc: Fixed NULL comparison. sql/sql_class.h: Store converted subquery type. --- sql/sql_class.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sql/sql_class.h') diff --git a/sql/sql_class.h b/sql/sql_class.h index 92de010c4b4..53c1db1a527 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2931,9 +2931,11 @@ class select_max_min_finder_subselect :public select_subselect Item_cache *cache; bool (select_max_min_finder_subselect::*op)(); bool fmax; + bool is_all; public: - select_max_min_finder_subselect(Item_subselect *item_arg, bool mx) - :select_subselect(item_arg), cache(0), fmax(mx) + select_max_min_finder_subselect(Item_subselect *item_arg, bool mx, + bool all) + :select_subselect(item_arg), cache(0), fmax(mx), is_all(all) {} void cleanup(); int send_data(List &items); -- cgit v1.2.1