Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.3(EOL)
-
None
-
bb-10.3-release 9b59f78d16fb000
Description
I couldn't find it in the current tests, so don't know if it's intentional.
create or replace table t1 (i int, s bigint unsigned as row start, e bigint unsigned as row end, period for system_time(s,e)) with system versioning; |
insert into t1 (i) values (1),(2); |
update t1 set i = 3; |
MariaDB [test]> select * from t1 for system_time all; |
+------+-----+----------------------+ |
| i | s | e |
|
+------+-----+----------------------+ |
| 3 | 229 | 18446744073709551615 |
|
| 3 | 229 | 18446744073709551615 |
|
| 1 | 222 | 229 |
|
| 2 | 222 | 229 |
|
+------+-----+----------------------+ |
4 rows in set (0.00 sec) |
Existing transaction, old snapshot - OK |
MariaDB [test]> select * from t1 for system_time as of transaction 222; |
+------+-----+-----+ |
| i | s | e |
|
+------+-----+-----+ |
| 1 | 222 | 229 |
|
| 2 | 222 | 229 |
|
+------+-----+-----+ |
2 rows in set (0.00 sec) |
Existing transaction, current snapshot - OK |
MariaDB [test]> select * from t1 for system_time as of transaction 229; |
+------+-----+----------------------+ |
| i | s | e |
|
+------+-----+----------------------+ |
| 3 | 229 | 18446744073709551615 |
|
| 3 | 229 | 18446744073709551615 |
|
+------+-----+----------------------+ |
2 rows in set (0.00 sec) |
Non existing transaction (greater than latest) -- questionable |
MariaDB [test]> select * from t1 for system_time as of transaction 230; |
+------+-----+----------------------+ |
| i | s | e |
|
+------+-----+----------------------+ |
| 3 | 229 | 18446744073709551615 |
|
| 3 | 229 | 18446744073709551615 |
|
+------+-----+----------------------+ |
2 rows in set (0.00 sec) |
Non existing transaction (less than minimal) -- not good |
MariaDB [test]> select * from t1 for system_time as of transaction 1; |
+------+-----+----------------------+ |
| i | s | e |
|
+------+-----+----------------------+ |
| 3 | 229 | 18446744073709551615 |
|
| 3 | 229 | 18446744073709551615 |
|
+------+-----+----------------------+ |
2 rows in set (0.00 sec) |
Non existing transaction (intermediate value) -- not good |
MariaDB [test]> select * from t1 for system_time as of transaction 227; |
+------+-----+----------------------+ |
| i | s | e |
|
+------+-----+----------------------+ |
| 3 | 229 | 18446744073709551615 |
|
| 3 | 229 | 18446744073709551615 |
|
+------+-----+----------------------+ |
2 rows in set (0.00 sec) |
Attachments
Issue Links
- is duplicated by
-
MDEV-16096 system versioning by trx id doesn't seem to work properly
- Closed