• unknown's avatar
    Fix for BUG#4544 "read_only also affects temporary tables": · 516699af
    unknown authored
    the READ_ONLY global variable now allows statements which are to update only temporary tables
    (note: if a statement, after parse stage, looks like it will update a non-temp table, it will be rejected,
    even if at execution it would have turned out that 0 rows would be updated; for example
    UPDATE my_non_tem_table SET a=1 WHERE 1 = 0; will be rejected).
    
    
    sql/sql_parse.cc:
      The READ_ONLY global variable now allows statements which are to update only temporary tables
      (note: if a statement, after parse stage, looks like it will update a non-temp table, it will be rejected,
      even if at execution it would have turned out that 0 rows would be updated; for example
      UPDATE my_non_tem_table SET a=1 WHERE 1 = 0; will be rejected).
    mysql-test/r/read_only.result:
      result for new test
    mysql-test/t/read_only.test:
      test for READ_ONLY (there was none!) and for the new behaviour of READ_ONLY
    516699af
sql_parse.cc 219 KB