1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Implementation of Monty's idea: Now we can open mysql.proc table for lookup

of stored routines definitions even if we already have some tables open and
locked. To avoid deadlocks in this case we have to put certain restrictions
on locking of mysql.proc table.

This allows to use stored routines safely under LOCK TABLES without explicitly
mentioning mysql.proc in the list of locked tables. It also fixes bug #11554
"Server crashes on statement indirectly using non-cached function".
This commit is contained in:
dlenev@mysql.com
2005-07-13 13:48:13 +04:00
parent f5f434cf9f
commit f334ea1fc6
16 changed files with 459 additions and 202 deletions

View File

@ -1760,7 +1760,7 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
create_info, *extra_fields, *keys, 0,
select_field_count))
{
if (!(table= open_table(thd, create_table, thd->mem_root, (bool*) 0)))
if (!(table= open_table(thd, create_table, thd->mem_root, (bool*)0, 0)))
quick_rm_table(create_info->db_type, create_table->db,
table_case_name(create_info, create_table->table_name));
}
@ -3571,7 +3571,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
bzero((void*) &tbl, sizeof(tbl));
tbl.db= new_db;
tbl.table_name= tbl.alias= tmp_name;
new_table= open_table(thd, &tbl, thd->mem_root, 0);
new_table= open_table(thd, &tbl, thd->mem_root, 0, 0);
}
else
{