From: Date: November 7 2006 10:15am Subject: bk commit into 5.0 tree (gluh:1.2284) BUG#22413 List-Archive: http://lists.mysql.com/commits/14934 X-Bug: 22413 Message-Id: <20061107091538.77A432B0BEA@gluh.myoffice.izhnet.ru> Below is the list of changes that have just been committed into a local 5.0 repository of gluh. When gluh does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2006-11-07 13:15:28+04:00, gluh@stripped +3 -0 Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash disable infill of I_S tables for EXPLAIN mysql-test/r/information_schema.result@stripped, 2006-11-07 13:15:22+04:00, gluh@stripped +15 -0 Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash test case mysql-test/t/information_schema.test@stripped, 2006-11-07 13:15:22+04:00, gluh@stripped +14 -0 Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash test case sql/sql_select.cc@stripped, 2006-11-07 13:15:22+04:00, gluh@stripped +2 -0 Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash disable infill of I_S tables for EXPLAIN # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: gluh # Host: gluh.(none) # Root: /home/gluh/MySQL/Bugs/5.0.22413 --- 1.470/sql/sql_select.cc 2006-11-07 13:15:38 +04:00 +++ 1.471/sql/sql_select.cc 2006-11-07 13:15:38 +04:00 @@ -1443,6 +1443,7 @@ curr_join->examined_rows= 0; if ((curr_join->select_lex->options & OPTION_SCHEMA_TABLE) && + !thd->lex->describe && get_schema_tables_result(curr_join)) { DBUG_VOID_RETURN; @@ -12203,6 +12204,7 @@ /* Fill schema tables with data before filesort if it's necessary */ if ((join->select_lex->options & OPTION_SCHEMA_TABLE) && + !thd->lex->describe && get_schema_tables_result(join)) goto err; --- 1.114/mysql-test/r/information_schema.result 2006-11-07 13:15:38 +04:00 +++ 1.115/mysql-test/r/information_schema.result 2006-11-07 13:15:38 +04:00 @@ -1240,3 +1240,18 @@ FROM information_schema.tables); table_name VIEWS +create view v1 as +select table_schema as object_schema, +table_name as object_name, +table_type as object_type +from information_schema.tables +order by object_schema; +explain select * from v1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY system NULL NULL NULL NULL 0 const row not found +2 DERIVED tables ALL NULL NULL NULL NULL 2 Using filesort +explain select * from (select table_name from information_schema.tables) as a; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY system NULL NULL NULL NULL 0 const row not found +2 DERIVED tables ALL NULL NULL NULL NULL 2 +drop view v1; --- 1.85/mysql-test/t/information_schema.test 2006-11-07 13:15:38 +04:00 +++ 1.86/mysql-test/t/information_schema.test 2006-11-07 13:15:38 +04:00 @@ -930,4 +930,18 @@ WHERE table_name=(SELECT MAX(table_name) FROM information_schema.tables); + +# +# Bug#22413: EXPLAIN SELECT FROM view with ORDER BY yield server crash +# +create view v1 as +select table_schema as object_schema, + table_name as object_name, + table_type as object_type +from information_schema.tables +order by object_schema; +explain select * from v1; +explain select * from (select table_name from information_schema.tables) as a; +drop view v1; + # End of 5.0 tests.