1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed access to freed memory

This commit is contained in:
monty@mysql.com
2004-10-27 21:56:17 +03:00
parent 3493f54a5e
commit 5b29f59aa8
4 changed files with 7 additions and 9 deletions

View File

@ -1681,9 +1681,10 @@ bool select_create::send_eof()
*/
if (!table->tmp_table)
{
ulong version= table->version;
hash_delete(&open_cache,(byte*) table);
/* Tell threads waiting for refresh that something has happened */
if (table->version != refresh_version)
if (version != refresh_version)
VOID(pthread_cond_broadcast(&COND_refresh));
}
lock=0;
@ -1707,11 +1708,12 @@ void select_create::abort()
enum db_type table_type=table->db_type;
if (!table->tmp_table)
{
ulong version= table->version;
hash_delete(&open_cache,(byte*) table);
if (!create_info->table_existed)
quick_rm_table(table_type, db, name);
/* Tell threads waiting for refresh that something has happened */
if (table->version != refresh_version)
if (version != refresh_version)
VOID(pthread_cond_broadcast(&COND_refresh));
}
else if (!create_info->table_existed)