~vkolesnikov/pbxt/pbxt-07-diskfull

« back to all changes in this revision

Viewing changes to pbxt/mysql-test-update/mysql-test/r/type_time.result

  • Committer: paul-mccullagh
  • Date: 2006-10-23 09:14:04 UTC
  • Revision ID: paul-mccullagh-918861e03d351978a9541168a96e58cc826734ee
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
drop table if exists t1;
 
2
create table t1 (t time);
 
3
insert into t1 values("10:22:33"),("12:34:56.78"),(10),(1234),(123456.78),(1234559.99),("1"),("1:23"),("1:23:45"), ("10.22"), ("-10  1:22:33.45"),("20 10:22:33"),("1999-02-03 20:33:34");
 
4
insert t1 values (30),(1230),("1230"),("12:30"),("12:30:35"),("1 12:30:31.32");
 
5
select * from t1;
 
6
t
 
7
10:22:33
 
8
12:34:56
 
9
00:00:10
 
10
00:12:34
 
11
12:34:56
 
12
123:45:59
 
13
00:00:01
 
14
01:23:00
 
15
01:23:45
 
16
00:00:10
 
17
-241:22:33
 
18
490:22:33
 
19
20:33:34
 
20
00:00:30
 
21
00:12:30
 
22
00:12:30
 
23
12:30:00
 
24
12:30:35
 
25
36:30:31
 
26
insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a");
 
27
Warnings:
 
28
Warning 1265    Data truncated for column 't' at row 1
 
29
Warning 1264    Out of range value for column 't' at row 2
 
30
Warning 1264    Out of range value for column 't' at row 3
 
31
Warning 1264    Out of range value for column 't' at row 4
 
32
Warning 1265    Data truncated for column 't' at row 6
 
33
select * from t1;
 
34
t
 
35
10:22:33
 
36
12:34:56
 
37
00:00:10
 
38
00:12:34
 
39
12:34:56
 
40
123:45:59
 
41
00:00:01
 
42
01:23:00
 
43
01:23:45
 
44
00:00:10
 
45
-241:22:33
 
46
490:22:33
 
47
20:33:34
 
48
00:00:30
 
49
00:12:30
 
50
00:12:30
 
51
12:30:00
 
52
12:30:35
 
53
36:30:31
 
54
00:00:10
 
55
00:00:00
 
56
838:59:59
 
57
838:59:59
 
58
262:22:00
 
59
00:00:12
 
60
drop table t1;
 
61
create table t1 (t time);
 
62
insert into t1 values ('09:00:00'),('13:00:00'),('19:38:34'), ('13:00:00'),('09:00:00'),('09:00:00'),('13:00:00'),('13:00:00'),('13:00:00'),('09:00:00');
 
63
select t, time_to_sec(t),sec_to_time(time_to_sec(t)) from t1;
 
64
t       time_to_sec(t)  sec_to_time(time_to_sec(t))
 
65
09:00:00        32400   09:00:00
 
66
13:00:00        46800   13:00:00
 
67
19:38:34        70714   19:38:34
 
68
13:00:00        46800   13:00:00
 
69
09:00:00        32400   09:00:00
 
70
09:00:00        32400   09:00:00
 
71
13:00:00        46800   13:00:00
 
72
13:00:00        46800   13:00:00
 
73
13:00:00        46800   13:00:00
 
74
09:00:00        32400   09:00:00
 
75
select sec_to_time(time_to_sec(t)) from t1;
 
76
sec_to_time(time_to_sec(t))
 
77
09:00:00
 
78
13:00:00
 
79
19:38:34
 
80
13:00:00
 
81
09:00:00
 
82
09:00:00
 
83
13:00:00
 
84
13:00:00
 
85
13:00:00
 
86
09:00:00
 
87
drop table t1;