• unknown's avatar
    A followup patch for Bug#7306 (limit in prepared statements): · 936688fe
    unknown authored
    don't evaluate subqueries during statement prepare, even if they
    are not correlated.
    With post-review fixes.
    
    
    sql/mysql_priv.h:
      Add UNCACHEABLE_PREPARE to mark subqueries as non-constant in 
      mysql_stmt_prepare
    sql/sql_lex.cc:
      Add a missing assert: noone can call unit::set_limit from 
      mysql_stmt_prepare.
    sql/sql_lex.h:
      Comment fixed.
    sql/sql_parse.cc:
      Mark new SELECT_LEXes as uncacheable if they created during 
      statement prepare.
    sql/sql_prepare.cc:
      Switch off the uncacheable flag when prepare is done.
    936688fe
sql_prepare.cc 65.4 KB