mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-31033 ER_KEY_NOT_FOUND upon online COPY ALTER on a partitioned table
The row events were applied "twice": once for the ha_partition, and one
more time for the underlying storage engine.
There's no such problem in binlog/rpl, because ha_partiton::row_logging
is normally set to false.
The fix makes the events replicate only when the handler is a root handler.
We will try to *guess* this by comparing it to table->file. The same
approach is used in the MDEV-21540 fix, 231feabd
. The assumption is made,
that the row methods are only called for table->file (and never for a
cloned handler), hence the assertions are added in ha_innobase and
ha_myisam to make sure that this is true at least for those engines
Also closes MDEV-31040, however the test is not included, since we have no
convenient way to construct a deterministic version.
This commit is contained in:
committed by
Sergei Golubchik
parent
0775c7bdc3
commit
c76072db93
@@ -3557,6 +3557,11 @@ public:
|
||||
if (org_keyread != MAX_KEY)
|
||||
ha_start_keyread(org_keyread);
|
||||
}
|
||||
|
||||
protected:
|
||||
bool is_root_handler() const;
|
||||
|
||||
public:
|
||||
int check_collation_compatibility();
|
||||
int check_long_hash_compatibility() const;
|
||||
int ha_check_for_upgrade(HA_CHECK_OPT *check_opt);
|
||||
|
Reference in New Issue
Block a user