List:Commits« Previous MessageNext Message »
From:Alexander Nozdrin Date:April 28 2008 3:04pm
Subject:bk commit into 6.0 tree (anozdrin:1.2613) BUG#35395
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of anozdrin.  When anozdrin 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, 2008-04-28 17:04:12+04:00, anozdrin@quad. +1 -0
  A fix for Bug#35395: Object services for enumerating view
  dependencies make server deadlock.
  
  The problem was that THD::~THD() does not always close open tables.
  
  The fix is to call close_thread_tables() explicitly. Also, since
  we're interested only in meta-data, there is no need to lock tables.
  So, open_tables() can be used instead of open_and_lock_tables().

  sql/si_objects.cc@stripped, 2008-04-28 17:04:11+04:00, anozdrin@quad. +3 -1
    1. Use open_tables() instead of open_and_lock_tables().
    2. Explicitly close open tables.

diff -Nrup a/sql/si_objects.cc b/sql/si_objects.cc
--- a/sql/si_objects.cc	2008-04-24 13:18:47 +04:00
+++ b/sql/si_objects.cc	2008-04-28 17:04:11 +04:00
@@ -1318,6 +1318,7 @@ ViewBaseObjectsIterator::create(THD *thd
                                const String *view_name,
                                IteratorType iterator_type)
 {
+  uint table_count; // Passed to open_tables(). Not used.
   THD *my_thd= new THD();
 
   my_thd->security_ctx= thd->security_ctx;
@@ -1333,7 +1334,7 @@ ViewBaseObjectsIterator::create(THD *thd
                            ((String *) view_name)->c_ptr_safe(),
                            TL_READ);
 
-  if (open_and_lock_tables(my_thd, tl))
+  if (open_tables(my_thd, &tl, &table_count, 0))
   {
     delete my_thd;
     thd->store_globals();
@@ -1376,6 +1377,7 @@ ViewBaseObjectsIterator::create(THD *thd
     }
   }
 
+  close_thread_tables(my_thd);
   delete my_thd;
 
   thd->store_globals();
Thread
bk commit into 6.0 tree (anozdrin:1.2613) BUG#35395Alexander Nozdrin28 Apr 2008
  • Re: bk commit into 6.0 tree (anozdrin:1.2613) BUG#35395Dmitri Lenev29 Apr 2008