Debian Codegraph @

mysql-test/suite/versioning/r/optimized.result

raw
1 create table t (
2 a int,
3 b int without system versioning
4 ) with system versioning;
5 insert into t values(1, 2);
6 insert into t values(3, 4);
7 select * from t;
8 a b
9 1 2
10 3 4
11 select a from t for system_time as of timestamp now(6);
12 a
13 1
14 3
15 select a, b, b+0 from t for system_time as of timestamp now(6);
16 a b b+0
17 1 2 2
18 3 4 4
19 select * from t for system_time as of timestamp now(6);
20 a b
21 1 2
22 3 4
23 select count(*) from t for system_time as of timestamp now(6) group by b;
24 count(*)
25 1
26 1
27 select * from t for system_time as of timestamp now(6) order by b asc;
28 a b
29 1 2
30 3 4
31 select * from t for system_time as of timestamp now(6) order by b desc;
32 a b
33 3 4
34 1 2
35 select * from t for system_time as of timestamp now(6) group by a having a=2;
36 a b
37 select * from t for system_time as of timestamp now(6) group by b having b=2;
38 a b
39 1 2
40 select a from t for system_time as of timestamp now(6) where b=2;
41 a
42 1
43 select a from t for system_time as of timestamp now(6) where b=NULL;
44 a
45 select a from t for system_time as of timestamp now(6) where b is NULL;
46 a
47 select count(*), b from t for system_time as of timestamp now(6) group by b having b=NULL;
48 count(*) b
49 select a, b from t;
50 a b
51 1 2
52 3 4
53 create or replace table t (
54 a int,
55 b int not null without system versioning
56 ) with system versioning;
57 insert into t values (1, 2), (3, 4);
58 select * from t for system_time as of timestamp now(6);
59 a b
60 1 2
61 3 4
62 select * from t for system_time as of timestamp now(6) where b is NULL;
63 a b
64 create or replace table t (x int with system versioning, y int);
65 select column_name, extra from information_schema.columns where table_name='t';
66 column_name extra
67 x
68 y WITHOUT SYSTEM VERSIONING
69 show create table t;
70 Table Create Table
71 t CREATE TABLE `t` (
72 `x` int(11) DEFAULT NULL,
73 `y` int(11) DEFAULT NULL WITHOUT SYSTEM VERSIONING
74 ) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci WITH SYSTEM VERSIONING
75 drop table t;