[MDEV-20271] Partitioned versioned tables do not accept Trx IDs Created: 2019-08-07  Updated: 2023-12-15

Status: Open
Project: MariaDB Server
Component/s: Documentation, Partitioning, Versioned Tables
Affects Version/s: 10.4.7
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Daniel Poulton Assignee: Joe Cotellese
Resolution: Unresolved Votes: 1
Labels: None
Environment:

Windows 7 Ultimate 64-bit SP1, MySQL Workbench 6.3.10


Issue Links:
PartOf
Relates
relates to MDEV-15951 system versioning by trx id doesn't w... Closed
relates to MDEV-23773 Cannot store the history separately f... Open
relates to MDEV-25173 paritioning not supported on transac... Open

 Description   

Quoting the previous issue, as it still produces the same error:

Creating a system-versioned table with row version by trx id works as described in the KB. However when I add partitions to separate current and historic data, I get an error.

The CREATE TABLE statement:

CREATE TABLE sbtest1 (
id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, 
k INTEGER UNSIGNED DEFAULT '0' NOT NULL,
c CHAR(120) DEFAULT '' NOT NULL,
pad CHAR(60) DEFAULT '' NOT NULL,
start_trxid BIGINT UNSIGNED GENERATED ALWAYS AS ROW START,
end_trxid BIGINT UNSIGNED GENERATED ALWAYS AS ROW END,
PERIOD FOR SYSTEM_TIME(start_trxid, end_trxid),
PRIMARY KEY (id),
INDEX k_ (k)
) ENGINE=InnoDB WITH SYSTEM VERSIONING PARTITION BY SYSTEM_TIME (
  PARTITION p_hist HISTORY,
  PARTITION p_cur CURRENT
)

and the error message:

ERROR 4110 (HY000): `start_trxid` must be of type TIMESTAMP(6) 
for system-versioned table `sbtest1`

If partitioning isn't supposed to work with trx ids, this should be documented.



 Comments   
Comment by Elena Stepanova [ 2019-08-07 ]

As the issue MDEV-15951 which you linked says, it's not supported. Indeed, it must be documented.

Comment by BlueT - Matthew Lien [ 2020-07-06 ]

We've spend weeks investigating what was wrong with our new system settings, and now see this...

It should really be documented.

Comment by YURII KANTONISTOV [ 2020-09-23 ]

If this just documented and not fixed then the selects, maintenance and cleanup on the huge plain tables with TrxID history is unefficient and very heavy task.
Meaning the transaction precise history is not really usable feature for production environment.

Comment by Julien Fritsch [ 2021-09-22 ]

jacob.moorman from our discussion, I decided to reassign Kenneth's ticket to you?

Generated at Thu Feb 08 08:58:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.