|
|||||||||||
|
bk commit into 5.1 tree (anozdrin:1.2593) BUG#31148
From: Alexander Nozdrin <alik(at)mysql.com>
Date: Fri Oct 19 2007 - 05:54:15 EDT
ChangeSet@1.2593, 2007-10-19 13:54:10+04:00, anozdrin@station. +3 -0 Fix for BUG#31148: bool close_thread_table(THD*, TABLE**): Assertion `table->key_read == 0' failed. The problem was that key_read on a table in a sub-select was not properly reset. That happens because the code responsible for that is copy&pasted all around the server. In some place, it was obviously forgotten to be pasted. The fix is to reset key_read properly. mysql-test/r/key.result@1.47, 2007-10-19 13:54:07+04:00, anozdrin@station. +15 -0 Update result file. mysql-test/t/key.test@1.38, 2007-10-19 13:54:07+04:00, anozdrin@station. +23 -0 A test case for BUG#31148: bool close_thread_table(THD*, TABLE**): Assertion `table->key_read == 0' failed. sql/sql_select.cc@1.568, 2007-10-19 13:54:07+04:00, anozdrin@station. +8 -1 Reset key_read before closing index. diff -Nrup a/mysql-test/r/key.result b/mysql-test/r/key.result --- a/mysql-test/r/key.result 2007-09-20 12:56:24 +04:00DROP TABLE t1, t2; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a INT PRIMARY KEY AUTO_INCREMENT); +INSERT INTO t1 VALUES (), (), (); +SELECT 1 AS c1 +FROM t1 +ORDER BY ( +SELECT 1 AS c2 +FROM t1 +GROUP BY GREATEST(LAST_INSERT_ID(), t1.a) ASC +LIMIT 1); +c1 +1 +1 +1 +DROP TABLE t1; diff -Nrup a/mysql-test/t/key.test b/mysql-test/t/key.test --- a/mysql-test/t/key.test 2007-06-06 21:48:08 +04:00@@ -501,3 +501,26 @@ ORDER BY c.b, c.d ;
DROP TABLE t1, t2;
--- a/sql/sql_select.cc 2007-10-19 02:57:41 +04:00 } -- MySQL Code Commits Mailing List For list archives: http://lists.mysql.com/commits To unsubscribe: http://lists.mysql.com/commits?unsub=lists@pantek.comReceived on Fri Oct 19 05:53:25 2007 This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 10:13:10 EDT |
||||||||||
|
|||||||||||