From 546e16ebd8685f490d90e376df6116175b62fcba Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid Date: Wed, 9 Dec 2009 09:51:20 +0100 Subject: Backport of revno: 2617.69.40 A pre-requisite patch for Bug#30977 "Concurrent statement using stored function and DROP FUNCTION breaks SBR". This patch changes the MDL API by introducing a namespace for lock keys: MDL_TABLE for tables and views and MDL_PROCEDURE for stored procedures and functions. The latter is needed for the fix for Bug#30977. --- sql/sql_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_handler.cc') diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 5bdf8611f5e..0bc9623c31c 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -264,7 +264,7 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen) memcpy(hash_tables->db, tables->db, dblen); memcpy(hash_tables->table_name, tables->table_name, namelen); memcpy(hash_tables->alias, tables->alias, aliaslen); - hash_tables->mdl_request.init(0, db, name, MDL_SHARED); + hash_tables->mdl_request.init(MDL_TABLE, db, name, MDL_SHARED); /* add to hash */ if (my_hash_insert(&thd->handler_tables_hash, (uchar*) hash_tables)) -- cgit v1.2.1