1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

We should prohobit concurent read of inserting file in SP

because it can couse problem with Query cache (BUG#14767)
This commit is contained in:
bell@book.local
2006-03-15 19:15:52 +02:00
parent 819b629c30
commit 1626c2d9e1
5 changed files with 136 additions and 23 deletions

View File

@ -3314,6 +3314,19 @@ end_with_restore_list:
select_lex->context.table_list=
select_lex->context.first_name_resolution_table= second_table;
res= handle_select(thd, lex, result, OPTION_SETUP_TABLES_DONE);
/*
Invalidate the table in the query cache if something changed
after unlocking when changes become visible.
TODO: this is workaround. right way will be move invalidating in
the unlock procedure.
*/
if (first_table->lock_type == TL_WRITE_CONCURRENT_INSERT &&
thd->lock)
{
mysql_unlock_tables(thd, thd->lock);
query_cache_invalidate3(thd, first_table, 1);
thd->lock=0;
}
delete result;
}
/* revert changes for SP */