mariadb/storage/innobase
Aleksey Midenkov 7ae0be25a6 MDEV-20812 Unexpected ER_ROW_IS_REFERENCED_2 upon DELETE from versioned table with FK
MDEV-16210 original case was wrongly allowed versioned DELETE from
referenced table where reference is by non-primary key. InnoDB UPDATE
has optimization for new rows not changing its clustered index
position. In this case InnoDB doesn't update all secondary indexes and
misses the one holding the referenced key. The fix was to disable this
optimization for versioned DELETE. In case of versioned DELETE we
forcely update all secondary indexes and therefore check them for
constraints.

But the above fix raised another problem with versioned DELETE on
foreign table side. In case when there was no corresponding record in
referenced table (illegal foreign reference can be done with "set
foreign_key_checks=off") there was spurious constraint check (because
versioned DELETE is actually UPDATE) and hence the operation failed
with constraint error.

MDEV-16210 tried to fix the above problem by checking foreign table
instead of referenced table and that at least was illegal.

Constraint check is done by row_ins_check_foreign_constraint() no
matter what kind of table is checked, referenced or foreign
(controlled by check_ref argument).

Referenced table is checked by row_upd_check_references_constraints().
Foreign table is checked by row_ins_check_foreign_constraints().

Current fix rolls back the wrong fix for the above problem and
disables referenced table check for DELETE on foreign side by
introducing `check_foreign` argument which when set to *false* skips
row_ins_check_foreign_constraints() call.
2019-10-15 13:29:18 +03:00
..
btr Merge 10.2 into 10.3 2019-10-12 15:38:58 +03:00
buf Merge 10.2 into 10.3 2019-10-12 15:38:58 +03:00
data Merge 10.2 into 10.3 2019-07-16 18:39:21 +03:00
dict Add page_has_prev(), page_has_next(), page_has_siblings() 2019-10-09 08:29:26 +03:00
eval Merge 10.2 into 10.3 2019-07-25 15:31:11 +03:00
fil Merge 10.2 into 10.3 2019-10-09 13:25:11 +03:00
fsp Merge branch '10.2' into 10.3 2019-09-06 16:58:39 +02:00
fts Merge 10.2 into 10.3 2019-09-23 10:25:34 +03:00
fut Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
gis Add page_has_prev(), page_has_next(), page_has_siblings() 2019-10-09 08:29:26 +03:00
ha Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
handler Merge 10.2 into 10.3 2019-10-12 06:34:09 +03:00
ibuf Merge 10.2 into 10.3 2019-10-12 06:34:09 +03:00
include MDEV-20812 Unexpected ER_ROW_IS_REFERENCED_2 upon DELETE from versioned table with FK 2019-10-15 13:29:18 +03:00
lock MDEV-20675 Crash in SHOW ENGINE INNODB STATUS with innodb_force_recovery=5 2019-09-26 13:18:22 +03:00
log Merge 10.2 into 10.3 2019-10-10 20:38:44 +03:00
mach Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
mem Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
mtr MDEV-20425: Fix -Wimplicit-fallthrough 2019-08-30 14:11:59 +03:00
mysql-test/storage_engine Fix for MDEV-17449, typo in error message (#1146) 2019-03-24 21:24:28 +04:00
os Merge 10.2 into 10.3 2019-07-25 15:31:11 +03:00
page MDEV-19783: Add more assertions 2019-10-10 20:40:26 +03:00
pars Merge 10.2 into 10.3 2019-05-14 17:18:46 +03:00
que Fix CMAKE_BUILD_TYPE=Debug 2019-10-11 18:36:08 +03:00
read MVCC::view_close(): Correct comments 2019-09-04 09:42:38 +03:00
rem MDEV-20814 Assertion index->is_instant() failed on trivial upgrade from 10.1 2019-10-12 21:58:34 +03:00
row MDEV-20812 Unexpected ER_ROW_IS_REFERENCED_2 upon DELETE from versioned table with FK 2019-10-15 13:29:18 +03:00
srv Merge 10.2 into 10.3 2019-10-12 06:34:09 +03:00
sync Merge 10.2 into 10.3 2019-09-27 15:56:15 +03:00
trx Merge 10.2 into 10.3 2019-10-12 06:34:09 +03:00
ut Merge 10.2 into 10.3 2019-07-25 15:31:11 +03:00
bzip2.cmake Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
CMakeLists.txt Merge 10.2 into 10.3 2019-07-25 15:31:11 +03:00
compile-innodb Merge branch '5.5' into 10.1 2019-05-11 22:19:05 +03:00
COPYING.Google move to storage/innobase 2015-05-04 19:17:21 +02:00
COPYING.Percona move to storage/innobase 2015-05-04 19:17:21 +02:00
innodb.cmake Merge 10.2 into 10.3 2019-03-27 13:27:04 +02:00
lz4.cmake Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
lzma.cmake Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
lzo.cmake Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00
plugin_exports Solaris compilation failure: xtradb is linked in statically, ha_innodb.so needs 2014-05-01 14:05:52 +02:00
snappy.cmake Merge 10.1 into 10.2 2019-05-13 17:54:04 +03:00