~ubuntu-branches/ubuntu/lucid/mysql-dfsg-5.1/lucid-security

« back to all changes in this revision

Viewing changes to mysql-test/suite/parts/r/partition_datetime_myisam.result

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 22:33:55 UTC
  • mto: (1.2.1) (37.1.1 lucid-security)
  • mto: This revision was merged to the branch mainline in revision 36.
  • Revision ID: package-import@ubuntu.com-20120222223355-ku1tb4r70osci6v2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
1971-01-01 00:00:58
185
185
1971-01-01 00:00:59
186
186
drop table t2;
187
 
create table t3 (a timestamp not null, primary key(a)) engine='MyISAM' 
188
 
partition by range (month(a)) subpartition by key (a)
189
 
subpartitions 3 (
190
 
partition quarter1 values less than (4),
191
 
partition quarter2 values less than (7),
192
 
partition quarter3 values less than (10), 
193
 
partition quarter4 values less than (13)
194
 
);
195
 
show create table t3;
196
 
Table   Create Table
197
 
t3      CREATE TABLE `t3` (
198
 
  `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
199
 
  PRIMARY KEY (`a`)
200
 
) ENGINE=MyISAM DEFAULT CHARSET=latin1
201
 
/*!50100 PARTITION BY RANGE (month(a))
202
 
SUBPARTITION BY KEY (a)
203
 
SUBPARTITIONS 3
204
 
(PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM,
205
 
 PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM,
206
 
 PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM,
207
 
 PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */
208
 
12 inserts;
209
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 12-1 month));
210
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 11-1 month));
211
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 10-1 month));
212
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 9-1 month));
213
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 8-1 month));
214
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 7-1 month));
215
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 6-1 month));
216
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 5-1 month));
217
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 4-1 month));
218
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 3-1 month));
219
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 2-1 month));
220
 
insert into t3 values (date_add('1970-01-01 00:00:00',interval 1-1 month));
221
 
Warnings:
222
 
Warning 1264    Out of range value for column 'a' at row 1
223
 
select count(*) from t3;
224
 
count(*)
225
 
12
226
 
select * from t3;
227
 
a
228
 
0000-00-00 00:00:00
229
 
1970-02-01 00:00:00
230
 
1970-03-01 00:00:00
231
 
1970-04-01 00:00:00
232
 
1970-05-01 00:00:00
233
 
1970-06-01 00:00:00
234
 
1970-07-01 00:00:00
235
 
1970-08-01 00:00:00
236
 
1970-09-01 00:00:00
237
 
1970-10-01 00:00:00
238
 
1970-11-01 00:00:00
239
 
1970-12-01 00:00:00
240
 
drop table t3;
241
 
create table t4 (a timestamp not null, primary key(a)) engine='MyISAM' 
242
 
partition by list (month(a)) subpartition by key (a)
243
 
subpartitions 3 (
244
 
partition quarter1 values in (0,1,2,3),
245
 
partition quarter2 values in (4,5,6),
246
 
partition quarter3 values in (7,8,9), 
247
 
partition quarter4 values in (10,11,12)
248
 
);
249
 
show create table t4;
250
 
Table   Create Table
251
 
t4      CREATE TABLE `t4` (
252
 
  `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
253
 
  PRIMARY KEY (`a`)
254
 
) ENGINE=MyISAM DEFAULT CHARSET=latin1
255
 
/*!50100 PARTITION BY LIST (month(a))
256
 
SUBPARTITION BY KEY (a)
257
 
SUBPARTITIONS 3
258
 
(PARTITION quarter1 VALUES IN (0,1,2,3) ENGINE = MyISAM,
259
 
 PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM,
260
 
 PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM,
261
 
 PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */
262
 
12 inserts;
263
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 12-1 month));
264
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 11-1 month));
265
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 10-1 month));
266
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 9-1 month));
267
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 8-1 month));
268
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 7-1 month));
269
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 6-1 month));
270
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 5-1 month));
271
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 4-1 month));
272
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 3-1 month));
273
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 2-1 month));
274
 
insert into t4 values (date_add('1970-01-01 00:00:00',interval 1-1 month));
275
 
Warnings:
276
 
Warning 1264    Out of range value for column 'a' at row 1
277
 
select count(*) from t4;
278
 
count(*)
279
 
12
280
 
select * from t4;
281
 
a
282
 
0000-00-00 00:00:00
283
 
1970-02-01 00:00:00
284
 
1970-03-01 00:00:00
285
 
1970-04-01 00:00:00
286
 
1970-05-01 00:00:00
287
 
1970-06-01 00:00:00
288
 
1970-07-01 00:00:00
289
 
1970-08-01 00:00:00
290
 
1970-09-01 00:00:00
291
 
1970-10-01 00:00:00
292
 
1970-11-01 00:00:00
293
 
1970-12-01 00:00:00
294
 
drop table t4;
295
187
create table t1 (a date not null, primary key(a)) engine='MyISAM' 
296
188
partition by key (a) (
297
189
partition pa1 max_rows=20 min_rows=2,