List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:August 16 2007 3:51pm
Subject:bk commit into 5.0 tree (davi:1.2514) BUG#29936
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of davi. When davi does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-08-16 12:51:21-03:00, davi@stripped +2 -0
  Bug#29936 (Stored Procedure DML ignores low_priority_updates setting)
  
  This is a follow up for the patch for Bug#26162 "Trigger DML ignores low_priority_updates setting", where the stored procedure ignores the session setting of low_priority_updates.
  
  For every table open operation with default write (TL_WRITE_DEFAULT) lock_type, downgrade the lock type to the session setting of low_priority_updates.

  sql/sql_base.cc@stripped, 2007-08-16 12:51:19-03:00, davi@stripped +2 -1
    Downgrade the lock type to the the session setting of low_priority_updates if lock_type is TL_WRITE_DEFAULT or if reopening the table.

  sql/table.h@stripped, 2007-08-16 12:51:19-03:00, davi@stripped +2 -0
    Introduce update_lock_type to signal that lock_type should be updated to the session value on a table reopen.

diff -Nrup a/sql/sql_base.cc b/sql/sql_base.cc
--- a/sql/sql_base.cc	2007-08-01 21:39:10 -03:00
+++ b/sql/sql_base.cc	2007-08-16 12:51:19 -03:00
@@ -2708,9 +2708,10 @@ int open_tables(THD *thd, TABLE_LIST **s
   {
     safe_to_ignore_table= FALSE;
 
-    if (tables->lock_type == TL_WRITE_DEFAULT)
+    if (tables->lock_type == TL_WRITE_DEFAULT || tables->update_lock_type)
     {
       tables->lock_type= thd->update_lock_default;
+      tables->update_lock_type= true;
       DBUG_ASSERT (tables->lock_type >= TL_WRITE_ALLOW_WRITE);
     }
     /*
diff -Nrup a/sql/table.h b/sql/table.h
--- a/sql/table.h	2007-07-27 11:56:28 -03:00
+++ b/sql/table.h	2007-08-16 12:51:19 -03:00
@@ -698,6 +698,8 @@ struct TABLE_LIST
   bool          where_processed;
   /* TRUE <=> VIEW CHECK OPTION expression has been processed */
   bool          check_option_processed;
+  /* Set lock_type to thd->update_lock_default on table reopen */
+  bool          update_lock_type;
   /* FRMTYPE_ERROR if any type is acceptable */
   enum frm_type_enum required_type;
   char		timestamp_buffer[20];	/* buffer for timestamp (19+1) */
Thread
bk commit into 5.0 tree (davi:1.2514) BUG#29936Davi Arnaut16 Aug