1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Timestamp-based versioning for InnoDB [closes #209]

* Removed integer_fields check
* Reworked Vers_parse_info::check_sys_fields()
* Misc renames
* versioned as vers_sys_type_t

* Removed versioned_by_sql(), versioned_by_engine()

versioned() works as before;
versioned(VERS_TIMESTAMP) is versioned_by_sql();
versioned(VERS_TRX_ID) is versioned_by_engine().

* create_tmp_table() fix
* Foreign constraints for timestamp-based
* Range auto-specifier fix
* SQL: 1-row partition rotation fix [fixes #260]
* Fix 'drop system versioning, algorithm=inplace'
This commit is contained in:
Aleksey Midenkov
2017-12-18 19:03:51 +03:00
committed by GitHub
parent d5e37621cf
commit b55a149194
73 changed files with 1178 additions and 836 deletions

View File

@ -17,59 +17,59 @@ a b b+0
1 NULL NULL
3 NULL NULL
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6);
a b
1 NULL
3 NULL
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select count(*) from t for system_time as of timestamp now(6) group by b;
count(*)
2
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b asc;
a b
1 NULL
3 NULL
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) order by b desc;
a b
1 NULL
3 NULL
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) group by a having a=2;
a b
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) group by b having b=2;
a b
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select a from t for system_time as of timestamp now(6) where b=2;
a
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select a from t for system_time as of timestamp now(6) where b=NULL;
a
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select a from t for system_time as of timestamp now(6) where b is NULL;
a
1
3
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL;
count(*) b
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select a, b from t;
a b
1 2
@ -84,12 +84,12 @@ a b
1 NULL
3 NULL
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
select * from t for system_time as of timestamp now(6) where b is NULL;
a b
1 NULL
3 NULL
Warnings:
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read unversioned field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
Warning 4112 Attempt to read non-temporal field `b` in historical query
drop table t;