Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
10.3.18, 10.3(EOL)
-
None
Description
UPDATE queries that do not change any values in the rows they match on versioned tables do not insert historical rows.
Example:
CREATE TABLE test (a INT) WITH SYSTEM VERSIONING;
|
INSERT INTO test (a) VALUES (1); |
UPDATE test SET a = 1 WHERE a = 1; |
SELECT *, row_start, row_end FROM test FOR SYSTEM_TIME ALL;
|
Disclaimer: I don't know whether this is a bug or was purposefully designed like this. In the latter case, I want to make a case to reconsider it:
- This behavior contrasts with triggers: UPDATE queries that do not change any values in the rows they match still carry out registered triggers for each row.
- Now some UPDATEs cannot be logged historically. Versioned table fail to capture that they happened. Yet logging such queries and the timestamps at which they were issued can still be valuable information.
Attachments
Issue Links
- causes
-
MDEV-24522 Assertion `inited==NONE' fails upon UPDATE on versioned table with unique blob
- Closed
-
MDEV-25644 UPDATE not working properly on transaction precise system versioned table
- Closed
-
MDEV-31944 UPDATE creates new row in system-versioned tables even if there is no value to change
- Closed
-
MDEV-32124 System-Versioned Tables, extra rows with UPDATE
- Closed
- is blocked by
-
MDEV-23644 Assertion on evaluating foreign referential action for self-reference in system versioned table
- Closed
- is caused by
-
MDEV-17089 Updating a System Versioned Table always causes a row to be updated, regardless if the data is the same or not
- Closed
- relates to
-
MDEV-24451 Record retains new value on DML when history row insert fails
- Open
-
MDEV-16226 TRX_ID-based System Versioning refactoring
- Stalled
-
MDEV-22540 ER_DUP_ENTRY upon REPLACE or Assertion `transactional_table || !changed || thd->transaction.stmt.modified_non_trans_table' failed
- Closed
-
MDEV-23100 ODKU of non-versioning column inserts history row
- Closed
-
MDEV-24064 Utility columns for system-versioned tables
- Open
-
MDEV-26778 row_start is not updated in current row for InnoDB
- Closed