mariadb/storage/innobase
Sergei Golubchik 564a792d72 MDEV-37199 UNIQUE KEY USING HASH accepting duplicate records
Server-level UNIQUE constraints (namely, WITHOUT OVERLAPS and USING HASH)
only worked with InnoDB in REPEATABLE READ isolation mode, when the
constraint was checked first and then the row was inserted or updated.
Gap logs prevented race conditions when a concurrent connection
could've also checked the constraint and inserted/updated a row
at the same time.

In READ COMMITTED there are no gap locks. To avoid race conditions,
we now check the constraint *after* the row operation. This is
enabled by the HA_CHECK_UNIQUE_AFTER_WRITE table flag that InnoDB
sets in the READ COMMITTED transactions.

Checking the constraint after the row operation is more complex.
First, the constraint will see the current (inserted/updated) row,
and needs to skip it. Second, IGNORE operations become tricky,
as we need to revert the insert/update and continue statement execution.

write_row() (INSERT IGNORE) is reverted with delete_row(). Conveniently
it deletes the current row, that is, the last inserted row.

update_row(a,b) (UPDATE IGNORE) is reverted with a reversed update,
update_row(b,a). Conveniently, it updates the current row too.

Except in InnoDB when the PK is updated - in this case InnoDB internally
performs delete+insert, but does not move the cursor, so the "current"
row is the deleted one and the reverse update doesn't work.
This combination now throws an "unsupported" error and will
be fixed in MDEV-37233
2025-07-15 13:34:25 +02:00
..
btr MDEV-36017 Alter table aborts when temporary directory is full 2025-05-25 09:11:41 +05:30
buf MDEV-27058 fixup: Fix a bogus assertion 2025-07-14 10:31:48 +03:00
data Merge 10.4 into 10.5 2022-10-25 11:26:37 +03:00
dict MDEV-37123 dict_table_open_on_id() fails to release dict_sys.latch 2025-07-02 14:25:38 +05:30
eval MDEV-27336 Crash on DROP DATABASE due to out-of-bounds result from InnoDB SUBSTR() 2021-12-21 17:33:26 +02:00
fil MDEV-36017 Alter table aborts when temporary directory is full 2025-05-25 09:11:41 +05:30
fsp MDEV-35494 fil_space_t::fil_space_t() may be unsafe with GCC -flifetime-dse 2024-12-11 14:44:42 +02:00
fts MDEV-36061 Incorrect error handling on DDL with FULLTEXT INDEX 2025-02-13 16:28:06 +01:00
fut MDEV-32175: Reduce page_align(), page_offset() calls 2024-11-21 11:01:30 +02:00
gis Merge 10.5 into 10.6 2025-03-26 17:09:57 +02:00
ha MDEV-35472 Server crash in ha_storage_put_memlim upon reading from INNODB_LOCKS 2024-11-25 10:31:57 +02:00
handler MDEV-37199 UNIQUE KEY USING HASH accepting duplicate records 2025-07-15 13:34:25 +02:00
ibuf MDEV-37121 Change buffer freed pages are not removed during slow shutdown 2025-07-04 10:51:17 +05:30
include MDEV-36510 InnoDB fails to compile with clang++-20 2025-04-14 09:22:39 +03:00
lock MDEV-36639 innodb_snapshot_isolation=1 gives error for not committed row changes 2025-04-22 20:41:43 +03:00
log MDEV-36304 InnoDB: Missing FILE_CREATE, FILE_DELETE or FILE_MODIFY error 2025-04-22 17:53:08 +05:30
mem Cleanup: Remove duplicated code 2024-11-29 14:16:34 +02:00
mtr MDEV-35701 trx_t::autoinc_locks causes unnecessary dynamic memory allocation 2025-01-15 16:55:01 +02:00
mysql-test/storage_engine MDEV-36330: SERIALIZABLE read inconsistency 2025-07-11 16:07:08 +03:00
os MDEV-36226 Stall and crash when page cleaner fails to generate free pages during Async flush 2025-03-31 19:09:23 +05:30
page MDEV-37183 Scrubbing empty record breaks recovery 2025-07-11 15:20:06 +03:00
pars MDEV-35436 dict_stats_fetch_from_ps() unnecessarily holds exclusive dict_sys.latch 2025-02-13 16:54:17 +01:00
que MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
read MDEV-34515: Contention between purge and workload 2024-08-26 12:23:06 +03:00
rem Merge branch '10.5' into 10.6 2024-03-13 21:02:34 +01:00
row MDEV-36017 Alter table aborts when temporary directory is full 2025-05-25 09:11:41 +05:30
srv MDEV-35863 innodb.doublewrite_debug test case fails to start the server 2025-06-23 15:48:43 +05:30
sync MDEV-34973: innobase/lock0lock: add noexcept 2024-10-01 09:53:16 +03:00
trx MDEV-36684 - main.mdl_sync fails under valgrind (test for Bug#42643) 2025-04-29 15:05:20 +04:00
unittest MDEV-35587 unit.innodb_sync leaks memory on mac 2024-12-12 10:27:36 +11:00
ut MDEV-24035 Failing assertion: UT_LIST_GET_LEN(lock.trx_locks) == 0 causing disruption and replication failure 2024-12-12 18:02:00 +02:00
.clang-format-old switch off storage/innobase/.clang-format: InnoDB uses a common formatting style for all new code 2021-03-17 11:01:15 +03:00
bzip2.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
CMakeLists.txt MDEV-36316/MDEV-36327/MDEV-36328 Debug msan 2025-05-28 16:28:34 +10:00
COPYING.Google
COPYING.Percona
lz4.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
lzma.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
lzo.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00
snappy.cmake Add feature summary at the end of cmake. 2021-07-21 10:22:56 +03:00