From dbe898bb9afbce1e8c645d66b5e799c7b7787b4a Mon Sep 17 00:00:00 2001 From: Sergey Petrunia Date: Mon, 23 Feb 2009 19:16:48 +0300 Subject: - Backport @@optimizer_switch support from 6.0 - Add support for setting it as a server commandline argument - Add support for those switches: = no_index_merge = no_index_merge_union = no_index_merge_sort_union = no_index_merge_intersection mysql-test/r/index_merge_myisam.result: Testcases for index_merge related @@optimizer_switch flags. mysql-test/t/index_merge_myisam.test: Testcases for index_merge related @@optimizer_switch flags. sql/set_var.cc: - Backport @@optimizer_switch support from 6.0 - Add support for setting it as a server commandline argument sql/sql_class.h: - Backport @@optimizer_switch support from 6.0 sql/sql_select.h: - Backport @@optimizer_switch support from 6.0 --- 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 3439e5b4f74..dd285eb0645 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -321,6 +321,8 @@ struct system_variables ulong net_write_timeout; ulong optimizer_prune_level; ulong optimizer_search_depth; + /* A bitmap for switching optimizations on/off */ + ulong optimizer_switch; ulong preload_buff_size; ulong profiling_history_size; ulong query_cache_type; -- cgit v1.2.1 From eeef946787a9fffff8f8804e4529d9df712bdd24 Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Wed, 25 Mar 2009 17:10:27 +0100 Subject: Bug#43748: crash when non-super user tries to kill the replication threads Fine-tuning. Broke out comparison into method by suggestion of Davi. Clarified comments. Reverting test-case which I find too brittle; proper test case in 5.1+. --- sql/sql_class.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_class.h') diff --git a/sql/sql_class.h b/sql/sql_class.h index 3e3dfcd08fa..47dbac0f17b 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -985,6 +985,7 @@ public: { return (*priv_host ? priv_host : (char *)"%"); } + bool user_matches(Security_context *); }; -- cgit v1.2.1 From 28e9aa4d0f1f036dbef04b947a2e2de4ad6c48c4 Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Wed, 25 Mar 2009 20:48:10 +0400 Subject: Fix for bug#35383: binlog playback and replication breaks due to name_const substitution Problem: "In general, statements executed within a stored procedure are written to the binary log using the same rules that would apply were the statements to be executed in standalone fashion. Some special care is taken when logging procedure statements because statement execution within procedures is not quite the same as in non-procedure context". For example, each reference to a local variable in SP's statements is replaced by NAME_CONST(var_name, var_value). Queries like "CREATE TABLE ... SELECT FUNC(local_var ..." are logged as "CREATE TABLE ... SELECT FUNC(NAME_CONST("local_var", var_value) ..." that leads to differrent field names and might result in "Incorrect column name" if var_value is long enough. Fix: in 5.x we'll issue a warning in such a case. In 6.0 we should get rid of NAME_CONST(). Note: this issue and change should be described in the documentation ("Binary Logging of Stored Programs"). mysql-test/r/binlog.result: Fix for bug#35383: binlog playback and replication breaks due to name_const substitution - test result. mysql-test/t/binlog.test: Fix for bug#35383: binlog playback and replication breaks due to name_const substitution - test case. sql/sp_head.cc: Fix for bug#35383: binlog playback and replication breaks due to name_const substitution - set thd->query_name_consts if there's NAME_CONST() substitution(s). sql/sql_parse.cc: Fix for bug#35383: binlog playback and replication breaks due to name_const substitution - issue a warning if there's NAME_CONST() substitution and binary logging is on for "CREATE TABLE ... SELECT ...". --- sql/sql_class.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/sql_class.h') diff --git a/sql/sql_class.h b/sql/sql_class.h index 3e3dfcd08fa..8a69e3729f2 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1556,6 +1556,9 @@ public: sp_cache *sp_proc_cache; sp_cache *sp_func_cache; + /** number of name_const() substitutions, see sp_head.cc:subst_spvars() */ + uint query_name_consts; + /* If we do a purge of binary logs, log index info of the threads that are currently reading it needs to be adjusted. To do that -- cgit v1.2.1