From acba7d2f9f131a7726138608fd260ddbf5973f65 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 15 Jun 2012 12:52:58 +0300 Subject: Fixed MDEV-306 / LP:1007967 - Assertion `table->file->stats.records > 0 || error' failed join_read_const_table on concurrent SELECT and DROP/ADD INDEX sql/sql_table.cc: Added comment storage/maria/ma_close.c: Don't store history if it's visible to all. This fixed the MDEV-306 bug storage/maria/ma_delete_table.c: Removed old comment Delete history state for deleted tables storage/maria/ma_info.c: More DBUG_PRINT storage/maria/ma_open.c: More DBUG_PRINT --- storage/maria/ma_delete_table.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'storage/maria/ma_delete_table.c') diff --git a/storage/maria/ma_delete_table.c b/storage/maria/ma_delete_table.c index 9e91638fa27..09d5cde5ad0 100644 --- a/storage/maria/ma_delete_table.c +++ b/storage/maria/ma_delete_table.c @@ -38,14 +38,8 @@ int maria_delete_table(const char *name) /** @todo LOCK take X-lock on table */ /* We need to know if this table is transactional. - When built with RAID support, we also need to determine if this table - makes use of the raid feature. If yes, we need to remove all raid - chunks. This is done with my_raid_delete(). Unfortunately it is - necessary to open the table just to check this. We use - 'open_for_repair' to be able to open even a crashed table. If even - this open fails, we assume no raid configuration for this table - and try to remove the normal data file only. This may however - leave the raid chunks behind. + Unfortunately it is necessary to open the table just to check this. We use + 'open_for_repair' to be able to open even a crashed table. */ if (!(info= maria_open(name, O_RDONLY, HA_OPEN_FOR_REPAIR))) { @@ -56,6 +50,8 @@ int maria_delete_table(const char *name) sync_dir= (info->s->now_transactional && !info->s->temporary && !maria_in_recovery) ? MY_SYNC_DIR : 0; + /* Remove history for table */ + _ma_reset_state(info); maria_close(info); } -- cgit v1.2.1