List:Commits« Previous MessageNext Message »
From:Ole John Aske Date:February 4 2011 7:40am
Subject:bzr commit into mysql-trunk branch (ole.john.aske:3588)
View as plain text  
#At file:///net/fimafeng09/export/home/tmp/oleja/mysql/mysql-trunk-opt-bug59326/ based on revid:ole.john.aske@stripped

 3588 Ole John Aske	2011-02-04
      Added new MTR include files missing from previous commit

    added:
      mysql-test/include/check_qep.inc
      mysql-test/include/execute_with_statistics.inc
      mysql-test/include/expect_qep.inc
=== added file 'mysql-test/include/check_qep.inc'
--- a/mysql-test/include/check_qep.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/check_qep.inc	2011-02-04 07:39:30 +0000
@@ -0,0 +1,20 @@
+flush status;
+eval EXPLAIN $query;
+eval $query;
+
+let $cost=
+ query_get_value(SHOW STATUS LIKE 'Last_query_cost', Value, 1);
+
+let $reads=
+`select sum(variable_value)
+   from information_schema.session_status
+   where VARIABLE_NAME like 'Handler_read%'`;
+
+#echo Cost: $cost, Handler_reads: $reads;
+
+if ($cost != $best_cost)
+{ echo ### FAILED: Query_cost: $cost, expected: $best_cost ###;
+}
+if ($reads != $best_reads)
+{ echo ### FAILED: Handler_reads: $reads, expected: $best_reads ###;
+}

=== added file 'mysql-test/include/execute_with_statistics.inc'
--- a/mysql-test/include/execute_with_statistics.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/execute_with_statistics.inc	2011-02-04 07:39:30 +0000
@@ -0,0 +1,8 @@
+eval EXPLAIN $query;
+show status like 'Last_query_cost';
+
+flush status;
+eval $query;
+select sum(variable_value) as Total_handler_reads
+   from information_schema.session_status
+   where VARIABLE_NAME like 'Handler_read%';

=== added file 'mysql-test/include/expect_qep.inc'
--- a/mysql-test/include/expect_qep.inc	1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/expect_qep.inc	2011-02-04 07:39:30 +0000
@@ -0,0 +1,14 @@
+flush status;
+eval EXPLAIN $query;
+eval $query;
+
+let $best_cost=
+  query_get_value(SHOW STATUS LIKE 'Last_query_cost', Value, 1);
+
+let $best_reads=
+`select sum(variable_value)
+   from information_schema.session_status
+   where VARIABLE_NAME like 'Handler_read%'`;
+
+#echo Expect, cost: $best_cost, Handler_reads: $best_reads;
+


Attachment: [text/bzr-bundle] bzr/ole.john.aske@oracle.com-20110204073930-ij79jzeay6ebsscr.bundle
Thread
bzr commit into mysql-trunk branch (ole.john.aske:3588) Ole John Aske4 Feb