mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 11:27:39 +02: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. mysql-test/r/index_merge.result: A test case for bug#20256. mysql-test/t/index_merge.test: A test case for bug#20256. sql/ha_myisam.cc: clone method added to handler class. sql/ha_myisam.h: clone method added to handler class. sql/handler.cc: clone method added to handler class. sql/handler.h: clone method added to handler class. sql/opt_range.cc: Use handler clone method.
This commit is contained in:
parent
86ce30966e
commit
fa1436bf1f
7 changed files with 83 additions and 4 deletions
|
|
@ -45,6 +45,7 @@ class ha_myisam: public handler
|
|||
public:
|
||||
ha_myisam(TABLE *table_arg);
|
||||
~ha_myisam() {}
|
||||
handler *clone(MEM_ROOT *mem_root);
|
||||
const char *table_type() const { return "MyISAM"; }
|
||||
const char *index_type(uint key_number);
|
||||
const char **bas_ext() const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue