dbal icon indicating copy to clipboard operation
dbal copied to clipboard

MariaDB: Tables with System Versioning are not listed in listTables()

Open pb30 opened this issue 2 years ago • 4 comments

Bug Report

Q A
Version 3.6.6

Summary

On MariaDB, tables set up with System Versioning are not returned in listTables() or listTableNames(), nor work with introspectTable().

Current behaviour

System Versioned tables are basically hidden to SchemaManager due to queries in MySQLSchemaManager filtering them out with TABLE_TYPE = 'BASE TABLE'.

How to reproduce

CREATE TABLE `accounts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `account_number` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB WITH SYSTEM VERSIONING;
$schemaManager->listTableNames(); // []
$schemaManager->listTables(); // []
$schemaManager->introspectTable('accounts'); // throws TableDoesNotExist There is no table with name "accounts" in the schema.

Expected behaviour

Expect that these tables would still be returned as tables, or that there is some other way to list/inspect them.

I can take a stab at a PR if desired.

pb30 avatar Sep 20 '23 04:09 pb30

Thank you. I'd like to reclassify this issue as a feature request.

Full support for versioned tables would mean that the schema manager is not only able to introspect them, but also create and compare them.

If you want to work on this feature, please give it a try.

derrabus avatar Sep 20 '23 05:09 derrabus

Fair point. Probably a bit more than I can bite off at this point, but who knows.

pb30 avatar Sep 20 '23 15:09 pb30

Hello, Will this fix will be accepted? We use this functionality extensively MariaDB (system versioning)

mihakot avatar Nov 15 '23 10:11 mihakot

Will this fix will be accepted?

There is no fix I could accept, is there? :shrug:

derrabus avatar Nov 15 '23 14:11 derrabus