Bug#17203: "sql_no_cache sql_cache" in views created from prepared statement
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT statement from internal structures based on value set later at runtime, not the original value set by the user. The solution is to remember that original value. mysql-test/r/auto_increment.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/func_compress.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/func_math.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/func_system.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/func_time.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/information_schema.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/query_cache.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/rpl_get_lock.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/rpl_master_pos_wait.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/show_check.result: Add result for bug#17203. mysql-test/r/subselect.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/type_blob.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/variables.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/r/view.result: Update result to not report SQL_NO_CACHE if it wasn't there at first place. mysql-test/t/show_check.test: Add test case for bug#17203. sql/sql_lex.cc: Reset SELECT_LEX::sql_cache together with SELECT_LEX::options. sql/sql_lex.h: Add SELECT_LEX::sql_cache field to store original user setting. sql/sql_select.cc: Output SQL_CACHE and SQL_NO_CACHE depending on stored original user setting. sql/sql_yacc.yy: Make effect of SQL_CACHE and SQL_NO_CACHE mutually exclusive. Ignore SQL_CACHE if SQL_NO_CACHE was used. Remember what was set by the user. Reset SELECT_LEX::sql_cache together with SELECT_LEX::options.
Showing
Please register or sign in to comment