~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/round.test

  • Committer: Brian Aker
  • Date: 2010-12-18 18:24:57 UTC
  • mfrom: (1999.6.3 trunk)
  • Revision ID: brian@tangent.org-20101218182457-yi1wd0so2hml1k1w
Merge in Lee's copyright header fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
DROP TABLE IF EXISTS t1;
3
3
--enable_warnings
4
4
 
5
 
CREATE TABLE t1 (sint8 tinyint not null);
 
5
CREATE TABLE t1 (sint8 int not null);
6
6
INSERT INTO t1 VALUES ('0.1');
7
7
INSERT INTO t1 VALUES ('0.5');
8
8
INSERT INTO t1 VALUES ('127.4');
16
16
SELECT * FROM t1;
17
17
DROP TABLE t1;
18
18
 
19
 
CREATE TABLE t1 (uint8 tinyint unsigned not null);
 
19
CREATE TABLE t1 (uint8 int not null);
20
20
INSERT INTO t1 VALUES ('0.1');
21
21
INSERT INTO t1 VALUES ('0.5');
22
22
INSERT INTO t1 VALUES ('127.4');
29
29
DROP TABLE t1;
30
30
 
31
31
 
32
 
CREATE TABLE t1 (sint16 smallint not null);
 
32
CREATE TABLE t1 (sint16 int not null);
33
33
INSERT INTO t1 VALUES ('0.1');
34
34
INSERT INTO t1 VALUES ('0.5');
35
35
INSERT INTO t1 VALUES ('32767.4');
44
44
DROP TABLE t1;
45
45
 
46
46
 
47
 
CREATE TABLE t1 (uint16 smallint unsigned not null);
 
47
CREATE TABLE t1 (uint16 int not null);
48
48
INSERT INTO t1 VALUES ('0.1');
49
49
INSERT INTO t1 VALUES ('0.5');
50
50
INSERT INTO t1 VALUES ('32767.4');
56
56
SELECT * FROM t1;
57
57
DROP TABLE t1;
58
58
 
59
 
CREATE TABLE t1 (sint24 mediumint not null);
 
59
CREATE TABLE t1 (sint24 int not null);
60
60
INSERT INTO t1 VALUES ('0.1');
61
61
INSERT INTO t1 VALUES ('0.5');
62
62
INSERT INTO t1 VALUES ('8388607.4');
70
70
SELECT * FROM t1;
71
71
DROP TABLE t1;
72
72
 
73
 
CREATE TABLE t1 (uint24 mediumint unsigned not null);
 
73
CREATE TABLE t1 (uint24 int not null);
74
74
INSERT INTO t1 VALUES ('0.1');
75
75
INSERT INTO t1 VALUES ('0.5');
76
76
INSERT INTO t1 VALUES ('8388607.4');
86
86
INSERT INTO t1 VALUES ('0.1');
87
87
INSERT INTO t1 VALUES ('0.5');
88
88
INSERT INTO t1 VALUES ('9223372036854775807.4');
89
 
INSERT INTO t1 VALUES ('9223372036854775807.5');
 
89
INSERT INTO t1 VALUES ('9223372036854775806.5');
90
90
INSERT INTO t1 VALUES ('-0.1');
91
91
INSERT INTO t1 VALUES ('-0.5');
92
92
INSERT INTO t1 VALUES ('-9223372036854775807.4');
93
93
INSERT INTO t1 VALUES ('-9223372036854775807.5');
94
94
INSERT INTO t1 VALUES ('-9223372036854775808.4');
95
 
INSERT INTO t1 VALUES ('-9223372036854775808.5');
 
95
INSERT INTO t1 VALUES ('-9223372036854775802.5');
96
96
SELECT * FROM t1;
97
97
DROP TABLE t1;
98
98
 
99
 
CREATE TABLE t1 (uint64 bigint unsigned not null);
 
99
CREATE TABLE t1 (uint64 bigint not null);
100
100
INSERT INTO t1 VALUES ('0.1');
101
101
INSERT INTO t1 VALUES ('0.5');
102
102
INSERT INTO t1 VALUES ('9223372036854775807.4');
 
103
--error ER_WARN_DATA_OUT_OF_RANGE
103
104
INSERT INTO t1 VALUES ('9223372036854775807.5');
104
105
INSERT INTO t1 VALUES ('-0.1');
105
106
INSERT INTO t1 VALUES ('-0.5');
 
107
--error ER_WARN_DATA_OUT_OF_RANGE
106
108
INSERT INTO t1 VALUES ('18446744073709551615.4');
107
 
INSERT INTO t1 VALUES ('18446744073709551615.5');
108
 
INSERT INTO t1 VALUES ('1844674407370955161.0');
109
 
INSERT INTO t1 VALUES ('1844674407370955161.1');
110
 
INSERT INTO t1 VALUES ('1844674407370955161.2');
111
 
INSERT INTO t1 VALUES ('1844674407370955161.3');
112
 
INSERT INTO t1 VALUES ('1844674407370955161.4');
113
 
INSERT INTO t1 VALUES ('1844674407370955161.5');
114
 
INSERT INTO t1 VALUES ('1844674407370955161.0e1');
115
 
INSERT INTO t1 VALUES ('1844674407370955161.1e1');
116
 
INSERT INTO t1 VALUES ('1844674407370955161.2e1');
117
 
INSERT INTO t1 VALUES ('1844674407370955161.3e1');
118
 
INSERT INTO t1 VALUES ('1844674407370955161.4e1');
119
 
INSERT INTO t1 VALUES ('1844674407370955161.5e1');
120
 
INSERT INTO t1 VALUES ('18446744073709551610e-1');
121
 
INSERT INTO t1 VALUES ('18446744073709551611e-1');
122
 
INSERT INTO t1 VALUES ('18446744073709551612e-1');
123
 
INSERT INTO t1 VALUES ('18446744073709551613e-1');
124
 
INSERT INTO t1 VALUES ('18446744073709551614e-1');
125
 
INSERT INTO t1 VALUES ('18446744073709551615e-1');
126
109
SELECT * FROM t1;
127
110
DROP TABLE t1;
128
111