36
eval create table t3 (a timestamp not null, primary key(a)) engine=$engine
37
partition by range (month(a)) subpartition by key (a)
39
partition quarter1 values less than (4),
40
partition quarter2 values less than (7),
41
partition quarter3 values less than (10),
42
partition quarter4 values less than (13)
46
--echo $count inserts;
49
eval insert into t3 values (date_add('1970-01-01 00:00:00',interval $count-1 month));
52
select count(*) from t3;
56
eval create table t4 (a timestamp not null, primary key(a)) engine=$engine
57
partition by list (month(a)) subpartition by key (a)
59
partition quarter1 values in (0,1,2,3),
60
partition quarter2 values in (4,5,6),
61
partition quarter3 values in (7,8,9),
62
partition quarter4 values in (10,11,12)
66
--echo $count inserts;
69
eval insert into t4 values (date_add('1970-01-01 00:00:00',interval $count-1 month));
72
select count(*) from t4;
36
################################################################################
37
# The following 2 tests are no longer valid after bug #42849 has been fixed:
38
# it is not possible to use a timezone-dependent (such as month(timestamp_col)
39
# or just a timestamp_col in a numeric context) anymore.
40
################################################################################
42
# eval create table t3 (a timestamp not null, primary key(a)) engine=$engine
43
# partition by range (month(a)) subpartition by key (a)
45
# partition quarter1 values less than (4),
46
# partition quarter2 values less than (7),
47
# partition quarter3 values less than (10),
48
# partition quarter4 values less than (13)
50
# show create table t3;
52
# --echo $count inserts;
55
# eval insert into t3 values (date_add('1970-01-01 00:00:00',interval $count-1 month));
58
# select count(*) from t3;
62
# eval create table t4 (a timestamp not null, primary key(a)) engine=$engine
63
# partition by list (month(a)) subpartition by key (a)
65
# partition quarter1 values in (0,1,2,3),
66
# partition quarter2 values in (4,5,6),
67
# partition quarter3 values in (7,8,9),
68
# partition quarter4 values in (10,11,12)
70
# show create table t4;
72
# --echo $count inserts;
75
# eval insert into t4 values (date_add('1970-01-01 00:00:00',interval $count-1 month));
78
# select count(*) from t4;