[Commits] Rev 3436: MDEV-495 Table logging does not work in TRANSACTION READ ONLY mode. in file:///home/hf/wmar/10-hf/

holyfoot at askmonty.org holyfoot at askmonty.org
Thu Aug 30 13:02:22 EEST 2012


At file:///home/hf/wmar/10-hf/

------------------------------------------------------------
revno: 3436
revision-id: holyfoot at askmonty.org-20120830085206-v2kdpmk32w02ylcm
parent: wlad at montyprogram.com-20120830093624-5tyee5sqp99ajlx4
committer: Alexey Botchkov <holyfoot at askmonty.org>
branch nick: 10-hf
timestamp: Thu 2012-08-30 13:52:06 +0500
message:
  MDEV-495 Table logging does not work in TRANSACTION READ ONLY mode.
          The flag is now checked for MYSQL_LOCK_LOG_TABLE and similar
          in open_table().
  
  per-file comments:
    sql/sql_base.cc
          MDEV-495 Table logging does not work in TRANSACTION READ ONLY mode.
-------------- next part --------------
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc	2012-08-25 15:57:17 +0000
+++ b/sql/sql_base.cc	2012-08-30 08:52:06 +0000
@@ -2911,7 +2911,10 @@ bool open_table(THD *thd, TABLE_LIST *ta
       Check if we're trying to take a write lock in a read only transaction.
     */
     if (table_list->mdl_request.type >= MDL_SHARED_WRITE &&
-        thd->tx_read_only)
+        thd->tx_read_only &&
+        !(flags & (MYSQL_OPEN_HAS_MDL_LOCK |
+                   MYSQL_LOCK_LOG_TABLE    |
+                   MYSQL_LOCK_IGNORE_GLOBAL_READ_ONLY)))
     {
       my_error(ER_CANT_EXECUTE_IN_READ_ONLY_TRANSACTION, MYF(0));
       DBUG_RETURN(true);



More information about the commits mailing list