mariadb/mysql-test/suite/period/r
Nikita Malyavin 68c1fbfc17 MDEV-25370 Update for portion changes autoincrement key in bi-temp table
According to the standard, the autoincrement column (i.e. *identity
column*) should be advanced each insert implicitly made by
UPDATE/DELETE ... FOR PORTION.

This is very unconvenient use in several notable cases. Concider a
WITHOUT OVERLAPS key with an autoinc column:
id int auto_increment, unique(id, p without overlaps)

An update or delete with FOR PORTION creates a sense that id will remain
unchanged in such case.

The standard's IDENTITY reminds MariaDB's AUTO_INCREMENT, however
the generation rules differ in many ways. For example, there's also a
notion autoincrement index, which is bound to the autoincrement field.

We will define our own generation rule for the PORTION OF operations
involving AUTO_INCREMENT:
* If an autoincrement index contains WITHOUT OVERLAPS specification, then
a new value should not be generated, otherwise it should.

Apart from WITHOUT OVERLAPS there is also another notable case, referred
by the reporter - a unique key that has an autoincrement column and a field
from the period specification:
  id int auto_increment, unique(id, s), period for p(s, e)

for this case, no exception is made, and the autoincrementing rules will be
proceeded accordung to the standard (i.e. the value will be advanced on
implicit inserts).
2024-01-31 16:03:38 +01:00
..
alter.result Merge remote-tracking branch 'origin/10.4' into 10.5 2022-09-14 16:24:51 +04:00
create.result Merge 10.4 into 10.5 2022-11-30 13:10:52 +02:00
delete,myisam.rdiff tests 2019-02-21 14:57:10 +01:00
delete.result Merge 10.4 into 10.5 2022-11-30 13:10:52 +02:00
long_unique.result cleanup: prepare "update_handler" for WITHOUT OVERLAPS 2020-03-31 17:42:34 +02:00
overlaps.result MDEV-25370 Update for portion changes autoincrement key in bi-temp table 2024-01-31 16:03:38 +01:00
update.result MDEV-22805 SIGSEGV in check_fields on UPDATE 2020-10-29 13:47:50 +03:00
versioning.result various test failures post-merge 2019-09-06 20:04:47 +02:00