• unknown's avatar
    Moved safe_to_cache_query from thd to lex. · 0e9a75a4
    unknown authored
    This is required for prepared statements and stored procedures.
    
    
    BitKeeper/etc/ignore:
      Added bkpull.log bkpull.log.2 bkpull.log.3 build.log sql/safe_to_cache_query.txt to the ignore list
    sql/item_create.cc:
      Moved safe_to_cache_query from thd to lex.
    sql/item_func.cc:
      Moved safe_to_cache_query from thd to lex.
    sql/sql_cache.cc:
      Moved safe_to_cache_query from thd to lex.
      Note: Query_cache::is_cacheable() has both a thd and lex argument.
      We assumed that it's the lex->safe_to_cache_query we should test.
    sql/sql_class.cc:
      Moved safe_to_cache_query from thd to lex.
    sql/sql_class.h:
      Moved safe_to_cache_query from thd to lex.
    sql/sql_lex.cc:
      Moved safe_to_cache_query from thd to lex.
      We set it to 1 initially. It's then set to 0 in cases where
      it's know not to be safe. (Before this change, it was set to
      0 in thd, and then set to 1 before parsing.)
    sql/sql_lex.h:
      Moved safe_to_cache_query from thd to lex.
    sql/sql_parse.cc:
      Moved safe_to_cache_query from thd to lex.
      No point in setting it here now, it's set in lex_start() later.
    sql/sql_prepare.cc:
      Moved safe_to_cache_query from thd to lex.
      Must set it after lex_start() has been called.
    sql/sql_yacc.yy:
      Moved safe_to_cache_query from thd to lex.
    0e9a75a4
sql_prepare.cc 21.7 KB