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

BUG#20256 - LOCK WRITE - MyISAM

Only MyISAM tables locked with LOCK TABLES ... WRITE were affected.

A query that is optimized with index_merge doesn't reflect rows
inserted within LOCK TABLES.

MyISAM doesn't flush a state within LOCK TABLES. index_merge
optimization creates a copy of the handler, which thus gets
outdated MyISAM state.

New handler->clone() method is introduced to fix this problem.
For non-MyISAM storage engines it allocates a handler and opens
it with ha_open(). For MyISAM it additionally copies MyISAM state
pointer to cloned handler.
This commit is contained in:
svoj@april.(none)
2006-09-12 18:25:35 +05:00
parent 50192889a4
commit 44f167ee1d
7 changed files with 83 additions and 4 deletions

View File

@ -563,6 +563,7 @@ public:
pushed_cond(NULL)
{}
virtual ~handler(void) { /* TODO: DBUG_ASSERT(inited == NONE); */ }
virtual handler *clone(MEM_ROOT *mem_root);
int ha_open(const char *name, int mode, int test_if_locked);
void adjust_next_insert_id_after_explicit_value(ulonglong nr);
bool update_auto_increment();