Skip to content

Commit 93d8ccb

Browse files
author
Shlomi Noach
committed
testing 5.7 and JSON
1 parent 5294ab6 commit 93d8ccb

11 files changed

Lines changed: 35 additions & 14 deletions

File tree

localtests/datetime-to-timestamp-pk-fail/create.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ create table gh_ost_test (
33
id int unsigned auto_increment,
44
i int not null,
55
ts0 timestamp default current_timestamp,
6-
ts1 timestamp,
6+
ts1 timestamp null,
77
dt2 datetime,
8-
t datetime,
8+
t datetime default current_timestamp,
99
updated tinyint unsigned default 0,
1010
primary key(id, t),
1111
key i_idx(i)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--alter="change column t t timestamp not null"
1+
--alter="change column t t timestamp default current_timestamp"

localtests/datetime-to-timestamp/create.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ create table gh_ost_test (
33
id int unsigned auto_increment,
44
i int not null,
55
ts0 timestamp default current_timestamp,
6-
ts1 timestamp,
6+
ts1 timestamp null,
77
dt2 datetime,
8-
t datetime,
8+
t datetime null,
99
updated tinyint unsigned default 0,
1010
primary key(id),
1111
key i_idx(i)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--alter="change column t t timestamp not null"
1+
--alter="change column t t timestamp null"

localtests/enum-pk/create.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ drop table if exists gh_ost_test;
22
create table gh_ost_test (
33
id int auto_increment,
44
i int not null,
5-
e enum('red', 'green', 'blue', 'orange') null default null collate 'utf8_bin',
5+
e enum('red', 'green', 'blue', 'orange') not null default 'red' collate 'utf8_bin',
66
primary key(id, e)
77
) auto_increment=1;
88

localtests/json57/create.sql

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
drop table if exists gh_ost_test;
2+
create table gh_ost_test (
3+
id int auto_increment,
4+
j json,
5+
primary key(id)
6+
) auto_increment=1;
7+
8+
drop event if exists gh_ost_test;
9+
delimiter ;;
10+
create event gh_ost_test
11+
on schedule every 1 second
12+
starts current_timestamp
13+
ends current_timestamp + interval 60 second
14+
on completion not preserve
15+
enable
16+
do
17+
begin
18+
insert into gh_ost_test values (null, '"sometext"');
19+
insert into gh_ost_test values (null, '{"key":"val"}');
20+
insert into gh_ost_test values (null, '{"is-it": true, "count": 3, "elements": []}');
21+
end ;;

localtests/timestamp-to-datetime/create.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ create table gh_ost_test (
33
id int auto_increment,
44
i int not null,
55
ts0 timestamp default current_timestamp,
6-
ts1 timestamp,
6+
ts1 timestamp default current_timestamp,
77
dt2 datetime,
88
t datetime,
99
updated tinyint unsigned default 0,

localtests/timestamp/create.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ create table gh_ost_test (
33
id int auto_increment,
44
i int not null,
55
ts0 timestamp default current_timestamp,
6-
ts1 timestamp,
7-
ts2 timestamp,
6+
ts1 timestamp default current_timestamp,
7+
ts2 timestamp default current_timestamp,
88
updated tinyint unsigned default 0,
99
primary key(id),
1010
key i_idx(i)

localtests/tz-datetime-ts/create.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ create table gh_ost_test (
33
id int auto_increment,
44
i int not null,
55
ts0 timestamp default current_timestamp,
6-
ts1 timestamp,
6+
ts1 timestamp default current_timestamp,
77
dt2 datetime,
88
t datetime,
99
updated tinyint unsigned default 0,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--alter="change column t t timestamp not null"
1+
--alter="change column t t timestamp not null default current_timestamp"

0 commit comments

Comments
 (0)