~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/t/type_float.test

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
# float in a char(1) field
83
83
#
84
84
create table t1 (c20 char);
85
 
--error 1406
 
85
--error ER_DATA_TOO_LONG
86
86
insert into t1 values (5000.0);
87
 
--error 1406
 
87
--error ER_DATA_TOO_LONG
88
88
insert into t1 values (0.5e4);
89
89
drop table t1;
90
90
 
98
98
# Ensure that maximum values as the result of number of decimals
99
99
# being specified in table schema are enforced (Bug #7361)
100
100
create table t1 (f float(4,3));
101
 
--error 1264
 
101
--error ER_WARN_DATA_OUT_OF_RANGE
102
102
insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
103
103
select * from t1;
104
104
drop table if exists t1;
105
105
create table t1 (f double(4,3));
106
 
--error 1264
 
106
--error ER_WARN_DATA_OUT_OF_RANGE
107
107
insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
108
108
select * from t1;
109
109
drop table if exists t1;
209
209
# bug #12694 (float(m,d) specifications)
210
210
#
211
211
 
212
 
--error 1427
 
212
--error ER_M_BIGGER_THAN_D
213
213
create table t1 (s1 float(0,2));
214
 
--error 1427
 
214
--error ER_M_BIGGER_THAN_D
215
215
create table t1 (s1 float(1,2));
216
216
 
217
217
# Bug #28121 "INSERT or UPDATE into DOUBLE(200,0) field being truncated to 31 digits"
220
220
create table t1 (f1 double(200, 0));
221
221
insert into t1 values (1e199), (-1e199);
222
222
insert into t1 values (1e200), (-1e200);
223
 
--error 1264
 
223
--error ER_WARN_DATA_OUT_OF_RANGE
224
224
insert into t1 values (2e200), (-2e200);
225
225
select f1 + 0e0 from t1;
226
226
drop table t1;
228
228
create table t1 (f1 float(30, 0));
229
229
insert into t1 values (1e29), (-1e29);
230
230
insert into t1 values (1e30), (-1e30);
231
 
--error 1264
 
231
--error ER_WARN_DATA_OUT_OF_RANGE
232
232
insert into t1 values (2e30), (-2e30);
233
233
select f1 + 0e0 from t1;
234
234
drop table t1;