=== modified file 'a/sql/sql_parse.cc' --- a/sql/sql_parse.cc 2012-05-28 05:44:43 +0000 +++ b/sql/sql_parse.cc 2012-12-05 13:24:45 +0000 @@ -6000,8 +6000,13 @@ ptr->next_name_resolution_table= NULL; /* Link table in global list (all used tables) */ lex->add_to_query_tables(ptr); - ptr->mdl_request.init(MDL_key::TABLE, ptr->db, ptr->table_name, mdl_type, - MDL_TRANSACTION); + + // Pure table aliases do not need to be locked: + if (!test(table_options & TL_OPTION_ALIAS)) + { + ptr->mdl_request.init(MDL_key::TABLE, ptr->db, ptr->table_name, mdl_type, + MDL_TRANSACTION); + } DBUG_RETURN(ptr); }