Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
F.ex. counters collection task:
create table stats like information_schema.innodb_metrics; |
alter table stats add system versioning; |
 |
# periodically:
|
delete from stats; |
insert stats select * from information_schema.innodb_metrics where status = 'enabled'; |
The above creates table `stats` with ENGINE=MEMORY. It would be useful to have `stats` persistent. CREATE TABLE .. LIKE cannot:
- change ENGINE of the table;
- add SYSTEM VERSIONING.
So ideally the below should work:
create table stats engine=aria like information_schema.innodb_metrics with system versioning; |
Note that CREATE .. SELECT can change the engine:
create or replace table stats2 engine=aria as select * from information_schema.innodb_metrics; |
It would be nice and user-friendly if CREATE .. LIKE could do that as well.