summaryrefslogtreecommitdiff
path: root/mysql-test/r/log_tables.result
diff options
context:
space:
mode:
authorunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2007-11-10 21:51:47 +0100
committerunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2007-11-10 21:51:47 +0100
commitc0fb459a38add628c665ab61246bc0bf3a7181e1 (patch)
tree48713ae2fc4de41d280198ffb1fc56b19c3aae13 /mysql-test/r/log_tables.result
parentb25bf95fc8625ccd56018a652339132f17f63813 (diff)
downloadmariadb-git-c0fb459a38add628c665ab61246bc0bf3a7181e1.tar.gz
Bug#31700: thd->examined_row_count not incremented for 'const' type queries
add 5.1-specific test showing that 'const' access increments 'examined' counter in slow query log. mysql-test/r/log_tables.result: 5.1-only test showing that 'const' access increments counters mysql-test/t/log_tables.test: 5.1-only test showing that 'const' access increments counters
Diffstat (limited to 'mysql-test/r/log_tables.result')
-rw-r--r--mysql-test/r/log_tables.result28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result
index 261e3292f4d..6004c3d082b 100644
--- a/mysql-test/r/log_tables.result
+++ b/mysql-test/r/log_tables.result
@@ -820,3 +820,31 @@ Execute select '000 001 002 003 004 005 006 007 008 009010 011 012 013 014 015 0
Query set global general_log = off
deallocate prepare long_query;
set global general_log = @old_general_log_state;
+SET @old_slow_log_state = @@global.slow_query_log;
+SET SESSION long_query_time = 0;
+SET GLOBAL slow_query_log = ON;
+FLUSH LOGS;
+TRUNCATE TABLE mysql.slow_log;
+CREATE TABLE t1 (f1 SERIAL,f2 INT, f3 INT, PRIMARY KEY(f1), KEY(f2));
+INSERT INTO t1 VALUES (1,1,1);
+INSERT INTO t1 VALUES (2,2,2);
+INSERT INTO t1 VALUES (3,3,3);
+INSERT INTO t1 VALUES (4,4,4);
+SELECT SQL_NO_CACHE 'Bug#31700 - SCAN',f1,f2,f3 FROM t1 WHERE f3=4;
+Bug#31700 - SCAN f1 f2 f3
+Bug#31700 - SCAN 4 4 4
+SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3 FROM t1 WHERE f2=3;
+Bug#31700 - KEY f1 f2 f3
+Bug#31700 - KEY 3 3 3
+SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3 FROM t1 WHERE f1=2;
+Bug#31700 - PK f1 f2 f3
+Bug#31700 - PK 2 2 2
+SELECT start_time, rows_examined, rows_sent, sql_text FROM mysql.slow_log WHERE sql_text LIKE '%Bug#31700%' ORDER BY start_time;
+start_time rows_examined rows_sent sql_text
+TIMESTAMP 4 1 SELECT SQL_NO_CACHE 'Bug#31700 - SCAN',f1,f2,f3 FROM t1 WHERE f3=4
+TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - KEY', f1,f2,f3 FROM t1 WHERE f2=3
+TIMESTAMP 1 1 SELECT SQL_NO_CACHE 'Bug#31700 - PK', f1,f2,f3 FROM t1 WHERE f1=2
+DROP TABLE t1;
+TRUNCATE TABLE mysql.slow_log;
+SET GLOBAL slow_query_log = @old_slow_log_state;
+SET SESSION long_query_time =@old_long_query_time;