[Commits] 65af953: MDEV-7009: SET STATEMENT min_examined_row_limit has no effect

sanja at mariadb.com sanja at mariadb.com
Wed Nov 26 18:23:44 EET 2014


revision-id: 65af9535718426e912657acd4c7f7013fd65c389
parent(s): e91559cf7f2b19378e9e5d3f72c3a6794a09d1e0
committer: Oleksandr Byelkin
branch nick: work-maria-10.1-MDEV-6997
timestamp: 2014-11-26 17:23:41 +0100
message:

MDEV-7009: SET STATEMENT min_examined_row_limit has no effect

duplicate of 7006

---
 mysql-test/r/set_statement.result | 15 +++++++++++----
 mysql-test/t/set_statement.test   | 10 ++++++----
 sql/sql_class.h                   |  1 +
 3 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/mysql-test/r/set_statement.result b/mysql-test/r/set_statement.result
index 7f23212..34aee21 100644
--- a/mysql-test/r/set_statement.result
+++ b/mysql-test/r/set_statement.result
@@ -1088,7 +1088,7 @@ sql_text
 select sleep(0.1)
 set statement long_query_time=0.01 for select sleep(0.1)
 #---
-#should be NOT written
+#should NOT be written
 set statement long_query_time=0.01,log_slow_filter='full_scan' for select sleep(0.1);
 sleep(0.1)
 0
@@ -1097,7 +1097,7 @@ sql_text
 select sleep(0.1)
 set statement long_query_time=0.01 for select sleep(0.1)
 #---
-#should be NOT written
+#should NOT be written
 set statement long_query_time=0.01,log_slow_rate_limit=9999 for select sleep(0.1);
 sleep(0.1)
 0
@@ -1106,6 +1106,15 @@ sql_text
 select sleep(0.1)
 set statement long_query_time=0.01 for select sleep(0.1)
 #---
+#should NOT be written
+set statement long_query_time=0.01,min_examined_row_limit=50 for select sleep(0.1);
+sleep(0.1)
+0
+select sql_text from mysql.slow_log;
+sql_text
+select sleep(0.1)
+set statement long_query_time=0.01 for select sleep(0.1)
+#---
 set global log_output= @save_log_output;
 set @@slow_query_log= @save_slow_query_log;
 set @@long_query_time= @save_long_query_time;
@@ -1125,8 +1134,6 @@ set statement last_insert_id=1 for select 1;
 ERROR 42000: The system variable last_insert_id cannot be set in SET STATEMENT.
 set statement sql_log_off=default for select 1;
 ERROR 42000: The system variable sql_log_off cannot be set in SET STATEMENT.
-set statement min_examined_row_limit=default for select 1;
-ERROR 42000: The system variable min_examined_row_limit cannot be set in SET STATEMENT.
 set statement character_set_client=default for select 1;
 ERROR 42000: The system variable character_set_client cannot be set in SET STATEMENT.
 set statement character_set_connection=default for select 1;
diff --git a/mysql-test/t/set_statement.test b/mysql-test/t/set_statement.test
index 108c1a3..d10a425 100644
--- a/mysql-test/t/set_statement.test
+++ b/mysql-test/t/set_statement.test
@@ -1018,14 +1018,18 @@ set statement slow_query_log=0 for select sleep(0.1);
 set @@long_query_time=@save_long_query_time;
 select sql_text from mysql.slow_log;
 --echo #---
---echo #should be NOT written
+--echo #should NOT be written
 set statement long_query_time=0.01,log_slow_filter='full_scan' for select sleep(0.1);
 select sql_text from mysql.slow_log;
 --echo #---
---echo #should be NOT written
+--echo #should NOT be written
 set statement long_query_time=0.01,log_slow_rate_limit=9999 for select sleep(0.1);
 select sql_text from mysql.slow_log;
 --echo #---
+--echo #should NOT be written
+set statement long_query_time=0.01,min_examined_row_limit=50 for select sleep(0.1);
+select sql_text from mysql.slow_log;
+--echo #---
 #
 # log_slow_verbosity is impossible to check because results are not written
 # in TABLE mode
@@ -1056,8 +1060,6 @@ set statement last_insert_id=1 for select 1;
 --error ER_SET_STATEMENT_NOT_SUPPORTED
 set statement sql_log_off=default for select 1;
 --error ER_SET_STATEMENT_NOT_SUPPORTED
-set statement min_examined_row_limit=default for select 1;
---error ER_SET_STATEMENT_NOT_SUPPORTED
 set statement character_set_client=default for select 1;
 --error ER_SET_STATEMENT_NOT_SUPPORTED
 set statement character_set_connection=default for select 1;
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 7a34960..d289840 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -3647,6 +3647,7 @@ class THD :public Statement,
     return backup;
   }
 
+
   void clear_wakeup_ready() { wakeup_ready= false; }
   /*
     Sleep waiting for others to wake us up with signal_wakeup_ready().


More information about the commits mailing list