Skip to content

[Bug]: Adding system versioning to a table makes foreign keys unusable #20095

Description

@cpernot-hf

Describe the bug

When I add system versioning to a MariaDB table, phpmyadmin acts as if there was no more foreign keys on this table, but they are still there (doing versioning without partitioning)

How to Reproduce

  1. Add system versioning without partition to a table :
ALTER TABLE t ADD COLUMN ts TIMESTAMP(6) GENERATED ALWAYS AS ROW START,
              ADD COLUMN te TIMESTAMP(6) GENERATED ALWAYS AS ROW END,
              ADD PERIOD FOR SYSTEM_TIME(ts, te),
              ADD SYSTEM VERSIONING;
  1. go to structure => relation view
  2. the foreign keys are not listed
  3. in the browse tab, there is no link in the data for those foreign keys
  4. but SHOW CREATE TABLE t still shows the foreign key CONSTRAINT

Expected behavior

I expected foreign keys to be still there with system versioning (without partition)

Screenshots

No response

Operating System

Linux

Web Server

Apache/2.4.66 (Debian)

Database Server

MariaDB

Database version

11.8.5-MariaDB-ubu2404

PHP version

8.3.30

phpMyAdmin version

5.2.3

browser

Firefox 147.0.3

Additional context

It may be related to the fact that SHOW CREATE TABLE adds a line PERIOD FOR SYSTEM_TIME (ts, te), before the constraints

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ResponseBugA problem or regression with an existing featureaffects/5.2This issue or pull-request affects 5.2.x releases (and maybe further versions)has-prAn issue that has a pull request pending that may fix this issue. The pull request may be incompletehelp wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions