[MDEV-14942] System tables cannot be versioned (confirm limitation and document) Created: 2018-01-14  Updated: 2018-01-14  Resolved: 2018-01-14

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

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-14790 System versioning for system tables d... Closed

 Description   

Intuitively, adding versioning to some system tables seems to be a good idea – they are not changed too often, information in them is important to keep save and to audit.

However, it expectedly doesn't work in different ways.

events

MariaDB [mysql]> alter table mysql.event add system versioning;
Query OK, 0 rows affected (0.04 sec)
Records: 0  Duplicates: 0  Warnings: 0
 
MariaDB [mysql]> create event ev on schedule every 1 hour do set @a=1;
ERROR 1545 (HY000): Failed to open mysql.event
MariaDB [mysql]> flush tables;
Query OK, 0 rows affected (0.02 sec)
 
# In error log:
2018-01-14  2:30:01 9 [ERROR] Column count of mysql.event is wrong. Expected 22, found 24. The table is probably corrupted

user

MariaDB [mysql]> alter table mysql.user add system versioning;
Query OK, 6 rows affected (0.04 sec)
Records: 6  Duplicates: 0  Warnings: 0
 
MariaDB [mysql]> create user foo@localhost;
Query OK, 0 rows affected (0.01 sec)
 
MariaDB [mysql]> select user, host from mysql.user where user = 'foo';
Empty set (0.00 sec)
 
MariaDB [mysql]> select user, host, row_start, row_end from mysql.user for system_time all where user = 'foo';
+------+-----------+-----------+----------------------------+
| user | host      | row_start | row_end                    |
+------+-----------+-----------+----------------------------+
| foo  | localhost | NULL      | 0000-00-00 00:00:00.000000 |
+------+-----------+-----------+----------------------------+
1 row in set (0.01 sec)

I didn't try other tables.



 Comments   
Comment by Elena Stepanova [ 2018-01-14 ]

It turns out I already filed this one, MDEV-14790.

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