List:Commits« Previous MessageNext Message »
From:Sergei Golubchik Date:July 22 2008 2:43pm
Subject:bzr push into mysql-5.1 branch (serg:2672)
View as plain text  
 2672 Sergei Golubchik	2008-07-22 [merge]
      merge
added:
  mysql-test/r/parser_stack.result
  mysql-test/t/parser_stack.test
modified:
  client/mysql.cc
  client/mysqltest.c
  mysql-test/include/mix1.inc
  mysql-test/include/query_prealloc_size_basic.inc
  mysql-test/r/client_xml.result
  mysql-test/r/func_in.result
  mysql-test/r/innodb_mysql.result
  mysql-test/r/mysql.result
  mysql-test/r/mysqltest.result
  mysql-test/r/query_prealloc_size_basic_32.result
  mysql-test/r/query_prealloc_size_basic_64.result
  mysql-test/suite/rpl/r/rpl_server_id1.result
  mysql-test/suite/rpl/r/rpl_temporary.result
  mysql-test/suite/rpl/t/disabled.def
  mysql-test/suite/rpl/t/rpl_server_id1.test
  mysql-test/suite/rpl/t/rpl_temporary.test
  mysql-test/t/client_xml.test
  mysql-test/t/disabled.def
  mysql-test/t/func_in.test
  mysql-test/t/mysql_delimiter.sql
  mysql-test/t/mysqltest.test
  sql/event_data_objects.cc
  sql/event_db_repository.cc
  sql/events.cc
  sql/filesort.cc
  sql/item_cmpfunc.cc
  sql/log.cc
  sql/mysql_priv.h
  sql/opt_range.cc
  sql/opt_range.h
  sql/records.cc
  sql/sp.cc
  sql/sp_head.cc
  sql/sql_acl.cc
  sql/sql_class.cc
  sql/sql_class.h
  sql/sql_delete.cc
  sql/sql_help.cc
  sql/sql_lex.cc
  sql/sql_lex.h
  sql/sql_parse.cc
  sql/sql_partition.cc
  sql/sql_plugin.cc
  sql/sql_prepare.cc
  sql/sql_select.cc
  sql/sql_servers.cc
  sql/sql_table.cc
  sql/sql_trigger.cc
  sql/sql_udf.cc
  sql/sql_update.cc
  sql/sql_view.cc
  sql/sql_yacc.yy

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2008-05-18 08:42:55 +0000
+++ b/sql/handler.cc	2008-07-21 10:01:22 +0000
@@ -1618,23 +1618,23 @@ bool mysql_xa_recover(THD *thd)
   @return
     always 0
 */
-static my_bool release_temporary_latches(THD *thd, plugin_ref plugin,
-                                 void *unused)
-{
-  handlerton *hton= plugin_data(plugin, handlerton *);
-
-  if (hton->state == SHOW_OPTION_YES && hton->release_temporary_latches)
-    hton->release_temporary_latches(hton, thd);
-
-  return FALSE;
-}
-
 
 int ha_release_temporary_latches(THD *thd)
 {
-  plugin_foreach(thd, release_temporary_latches, MYSQL_STORAGE_ENGINE_PLUGIN, 
-                 NULL);
+  Ha_trx_info *info;
 
+  /*
+    Note that below we assume that only transactional storage engines
+    may need release_temporary_latches(). If this will ever become false,
+    we could iterate on thd->open_tables instead (and remove duplicates
+    as if (!seen[hton->slot]) { seen[hton->slot]=1; ... }).
+  */
+  for (info= thd->transaction.stmt.ha_list; info; info= info->next())
+  {
+    handlerton *hton= info->ht();
+    if (hton && hton->release_temporary_latches)
+        hton->release_temporary_latches(hton, thd);
+  }
   return 0;
 }
 

Thread
bzr push into mysql-5.1 branch (serg:2672) Sergei Golubchik22 Jul