@@ -77,20 +77,20 @@ show create table t;
7777Table Create Table
7878t CREATE TABLE `t` (
7979 `a` int(11) DEFAULT NULL,
80- `b` int(11) DEFAULT NULL,
8180 `sys_trx_start` timestamp(6) GENERATED ALWAYS AS ROW START,
8281 `sys_trx_end` timestamp(6) GENERATED ALWAYS AS ROW END,
82+ `b` int(11) DEFAULT NULL,
8383 PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
8484) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
8585alter table t add column c int;
8686show create table t;
8787Table Create Table
8888t CREATE TABLE `t` (
8989 `a` int(11) DEFAULT NULL,
90- `b` int(11) DEFAULT NULL,
91- `c` int(11) DEFAULT NULL,
9290 `sys_trx_start` timestamp(6) GENERATED ALWAYS AS ROW START,
9391 `sys_trx_end` timestamp(6) GENERATED ALWAYS AS ROW END,
92+ `b` int(11) DEFAULT NULL,
93+ `c` int(11) DEFAULT NULL,
9494 PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
9595) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
9696alter table t add column d int first;
@@ -99,10 +99,10 @@ Table Create Table
9999t CREATE TABLE `t` (
100100 `d` int(11) DEFAULT NULL,
101101 `a` int(11) DEFAULT NULL,
102- `b` int(11) DEFAULT NULL,
103- `c` int(11) DEFAULT NULL,
104102 `sys_trx_start` timestamp(6) GENERATED ALWAYS AS ROW START,
105103 `sys_trx_end` timestamp(6) GENERATED ALWAYS AS ROW END,
104+ `b` int(11) DEFAULT NULL,
105+ `c` int(11) DEFAULT NULL,
106106 PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
107107) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
108108alter table t add column e int after d;
@@ -112,26 +112,22 @@ t CREATE TABLE `t` (
112112 `d` int(11) DEFAULT NULL,
113113 `e` int(11) DEFAULT NULL,
114114 `a` int(11) DEFAULT NULL,
115- `b` int(11) DEFAULT NULL,
116- `c` int(11) DEFAULT NULL,
117115 `sys_trx_start` timestamp(6) GENERATED ALWAYS AS ROW START,
118116 `sys_trx_end` timestamp(6) GENERATED ALWAYS AS ROW END,
117+ `b` int(11) DEFAULT NULL,
118+ `c` int(11) DEFAULT NULL,
119119 PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
120120) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
121- alter table t add column f int after sys_trx_start;
122- ERROR HY000: Wrong parameters for `t`: Can not put new field after system versioning field
123- alter table t add column f int after sys_trx_end;
124- ERROR HY000: Wrong parameters for `t`: Can not put new field after system versioning field
125121alter table t drop column a;
126122show create table t;
127123Table Create Table
128124t CREATE TABLE `t` (
129125 `d` int(11) DEFAULT NULL,
130126 `e` int(11) DEFAULT NULL,
131- `b` int(11) DEFAULT NULL,
132- `c` int(11) DEFAULT NULL,
133127 `sys_trx_start` timestamp(6) GENERATED ALWAYS AS ROW START,
134128 `sys_trx_end` timestamp(6) GENERATED ALWAYS AS ROW END,
129+ `b` int(11) DEFAULT NULL,
130+ `c` int(11) DEFAULT NULL,
135131 PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
136132) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
137133alter table t drop column sys_trx_start;
@@ -179,9 +175,9 @@ show create table t;
179175Table Create Table
180176t CREATE TABLE `t` (
181177 `a` int(11) DEFAULT NULL,
182- `b` int(11) DEFAULT NULL,
183178 `sys_trx_start` timestamp(6) GENERATED ALWAYS AS ROW START,
184179 `sys_trx_end` timestamp(6) GENERATED ALWAYS AS ROW END,
180+ `b` int(11) DEFAULT NULL,
185181 PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
186182) ENGINE=MyISAM DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
187183select * from t;
@@ -339,9 +335,9 @@ show create table t;
339335Table Create Table
340336t CREATE TABLE `t` (
341337 `a` int(11) DEFAULT NULL,
342- `b` int(11) DEFAULT NULL,
343338 `sys_trx_start` bigint(20) unsigned GENERATED ALWAYS AS ROW START,
344339 `sys_trx_end` bigint(20) unsigned GENERATED ALWAYS AS ROW END,
340+ `b` int(11) DEFAULT NULL,
345341 PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
346342) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
347343select * from t;
@@ -366,9 +362,9 @@ show create table t;
366362Table Create Table
367363t CREATE TABLE `t` (
368364 `a` int(11) DEFAULT NULL,
369- `b` int(11) DEFAULT NULL,
370365 `sys_trx_start` bigint(20) unsigned GENERATED ALWAYS AS ROW START,
371366 `sys_trx_end` bigint(20) unsigned GENERATED ALWAYS AS ROW END,
367+ `b` int(11) DEFAULT NULL,
372368 PERIOD FOR SYSTEM_TIME (`sys_trx_start`, `sys_trx_end`)
373369) ENGINE=InnoDB DEFAULT CHARSET=latin1 WITH SYSTEM VERSIONING
374370select * from t;
0 commit comments