• Georgi Kodinov's avatar
    Bug #46791: Assertion failed:(table->key_read==0),function unknown · 629557ff
    Georgi Kodinov authored
      function,file sql_base.cc
    
    When uncacheable queries are written to a temp table the optimizer must 
    preserve the original JOIN structure, because it is re-using the JOIN 
    structure to read from the resulting temporary table.
    This was done only for uncacheable sub-queries. 
    But top level queries can also benefit from this mechanism, specially if 
    they're using index access and need a reset.
    Fixed by not limiting the saving of JOIN structure to subqueries
    exclusively.
    Added a new test file to extend the existing (large) subquery.test.
    629557ff
sql_select.cc 505 KB