1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00
Files
mariadb/mysql-test/t
davi@endora.local cc007acb78 Bug#30882 Dropping a temporary table inside a stored function may cause a server crash
If a stored function that contains a drop temporary table statement
is invoked by a create temporary table of the same name may cause
a server crash. The problem is that when dropping a table no check
is done to ensure that table is not being used by some outer query
(or outer statement), potentially leaving the outer query with a
reference to a stale (freed) table.

The solution is when dropping a temporary table, always check if
the table is being used by some outer statement as a temporary
table can be dropped inside stored procedures.

The check is performed by looking at the TABLE::query_id value for
temporary tables. To simplify this check and to solve a bug related
to handling of temporary tables in prelocked mode, this patch changes
the way in which this member is used to track the fact that table is
used/unused. Now we ensure that TABLE::query_id is zero for unused
temporary tables (which means that all temporary tables which were
used by a statement should be marked as free for reuse after it's
execution has been completed).
2007-11-01 18:52:56 -02:00
..
2007-07-30 21:05:56 +05:00
2007-10-18 14:48:04 -07:00
2007-08-07 05:35:20 -04:00
2007-07-05 19:20:14 +02:00
2007-08-02 12:45:56 -07:00
2007-07-23 23:35:43 -07:00
2007-06-28 16:03:01 -07:00
2007-06-28 16:03:01 -07:00
2007-07-06 11:35:10 -07:00
2007-09-26 12:45:08 +02:00
2007-07-11 18:45:35 -07:00
2007-06-20 14:21:48 +05:00
2007-08-31 16:59:07 +05:00
2007-08-31 16:59:07 +05:00
2007-06-13 17:28:59 +02:00
2007-06-13 17:28:59 +02:00
2007-06-13 17:28:59 +02:00
2007-10-23 19:28:47 +05:00
2007-06-01 17:49:01 +04:00
2007-09-24 12:42:44 +02:00
2007-06-06 18:55:21 +05:00
2007-07-05 19:20:14 +02:00
2007-07-14 01:34:46 +05:00
2007-07-15 21:51:36 +04:00
2007-06-03 14:46:09 +04:00