• Konstantin Osipov's avatar
    WL#5000 FLUSH TABLES|TABLE table_list WITH READ LOCK. · dd262230
    Konstantin Osipov authored
    Extend and implement the grammar that allows to FLUSH WITH READ LOCK
    a list of tables, rather than all of them.
    
    Incompatible grammar change:
    Previously one could perform FLUSH TABLES, HOSTS, PRIVILEGES in a single
    statement.
    After this change, FLUSH TABLES must always be alone on the list.
    Judging by the test suite, however, the old extended syntax
    was never or very rarely used.
    
    The new statement requires RELOAD ACL global privilege and
    LOCK_TABLES_ACL | SELECT_ACL on individual tables.
    In other words, it's an atomic combination of LOCK TALBES <list> READ
    and FLUSH TABLES <list>, and requires respective privileges.
    
    For additional information about the semantics, please
    see WL#5000 and the comment for flush_tables_with_read_lock()
    function in sql_parse.cc
    
    
    mysql-test/r/flush.result:
      Update test results (WL#5000).
    mysql-test/t/flush.test:
      Add test coverage for WL#5000.
    sql/sql_yacc.yy:
      Allow FLUSH TABLES <table_list> WITH READ LOCK.
      Disallow FLUSH TABLES <table_list>, flush_options.
    dd262230
flush.result 6.95 KB