1- drop table if exists t1;
21create table t1 (
32x1 int unsigned,
43Sys_start SYS_DATATYPE as row start invisible comment 'start',
@@ -266,8 +265,8 @@ show create table t3;
266265Table	Create Table
267266t3	CREATE TABLE `t3` (
268267 `y` int(11) DEFAULT NULL,
269-  `st` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
270-  `en` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' 
268+  `st` timestamp(6) NOT NULL,
269+  `en` timestamp(6) NOT NULL
271270) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
272271## For versioned table
273272insert into t1 values (1);
@@ -296,8 +295,8 @@ show create table t3;
296295Table	Create Table
297296t3	CREATE TABLE `t3` (
298297 `y` int(11) DEFAULT NULL,
299-  `st` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
300-  `en` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' 
298+  `st` timestamp(6) NOT NULL,
299+  `en` timestamp(6) NOT NULL
301300) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
302301select * from t3 where y > 2;
303302y	st	en
@@ -385,17 +384,17 @@ show create table t2;
385384Table	Create Table
386385t2	CREATE TABLE `t2` (
387386 `x25` int(11) DEFAULT NULL,
388-  `row_start` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
389-  `row_end` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' 
387+  `row_start` timestamp(6) NOT NULL,
388+  `row_end` timestamp(6) NOT NULL
390389) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
391390create or replace table t2 with system versioning
392391as select x25, row_start rs, row_end re from t1;
393392show create table t2;
394393Table	Create Table
395394t2	CREATE TABLE `t2` (
396395 `x25` int(11) DEFAULT NULL,
397-  `rs` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
398-  `re` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' 
396+  `rs` timestamp(6) NOT NULL,
397+  `re` timestamp(6) NOT NULL
399398) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
400399create or replace table t1 (
401400x26 int,
@@ -409,8 +408,8 @@ show create table t2;
409408Table	Create Table
410409t2	CREATE TABLE `t2` (
411410 `x26` int(11) DEFAULT NULL,
412-  `st` bigint(20) unsigned NOT NULL DEFAULT 0 ,
413-  `en` bigint(20) unsigned NOT NULL DEFAULT 0 
411+  `st` bigint(20) unsigned NOT NULL,
412+  `en` bigint(20) unsigned NOT NULL
414413) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
415414create or replace table t1 (x27 int, id int) with system versioning engine NON_DEFAULT_ENGINE;
416415create or replace table t2 (b int, id int);
@@ -421,8 +420,8 @@ Table	Create Table
421420t3	CREATE TABLE `t3` (
422421 `b` int(11) DEFAULT NULL,
423422 `x27` int(11) DEFAULT NULL,
424-  `rs` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
425-  `re` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' 
423+  `rs` timestamp(6) NOT NULL,
424+  `re` timestamp(6) NOT NULL
426425) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
427426## Errors
428427create or replace temporary table t (x28 int) with system versioning;
@@ -458,10 +457,10 @@ Table	Create Table
458457t3	CREATE TABLE `t3` (
459458 `x30` int(11) DEFAULT NULL,
460459 `y` int(11) DEFAULT NULL,
461-  `row_start` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
462-  `row_end` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
463-  `st` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
464-  `en` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' 
460+  `row_start` timestamp(6) NOT NULL,
461+  `row_end` timestamp(6) NOT NULL,
462+  `st` timestamp(6) NOT NULL,
463+  `en` timestamp(6) NOT NULL
465464) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
466465create or replace table t3 (
467466y int,
@@ -475,8 +474,8 @@ Table	Create Table
475474t3	CREATE TABLE `t3` (
476475 `x30` int(11) DEFAULT NULL,
477476 `y` int(11) DEFAULT NULL,
478-  `row_start` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
479-  `row_end` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000' ,
477+  `row_start` timestamp(6) NOT NULL,
478+  `row_end` timestamp(6) NOT NULL,
480479 `st` timestamp(6) GENERATED ALWAYS AS ROW START INVISIBLE,
481480 `en` timestamp(6) GENERATED ALWAYS AS ROW END INVISIBLE,
482481 PERIOD FOR SYSTEM_TIME (`st`, `en`)
0 commit comments