~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/blitzdb/tests/t/blitzdb-decimal.test

  • Committer: Lee Bieber
  • Date: 2010-08-26 21:56:15 UTC
  • mto: (1733.1.1 build) (1734.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1734.
  • Revision ID: lbieber@kalebral-2.local-20100826215615-98moemwu1u9u9x4y
change tests to use enum values instead of error numbers

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
# Test the max number of possible digits
19
19
create table t2 (a decimal(65,0)) engine = blitzdb;
20
20
insert into t2 select repeat(1, 65);
21
 
--error 1264
 
21
--error ER_WARN_DATA_OUT_OF_RANGE
22
22
insert into t2 select repeat(1, 66);
23
23
select * from t2;
24
24
drop table t2;
25
25
 
26
26
create table t2 (a decimal(65,8)) engine = blitzdb;
27
27
insert into t2 select repeat(1, 57);
28
 
--error 1264
 
28
--error ER_WARN_DATA_OUT_OF_RANGE
29
29
insert into t2 select repeat(1, 58);
30
30
 
31
31
delete from t2;
32
32
 
33
 
--error 1264 # Out of Range
 
33
--error ER_WARN_DATA_OUT_OF_RANGE # Out of Range
34
34
insert into t2 values (
35
35
  -1111111111111111111111111111111111111111111111111111111111
36
36
);
39
39
  1111111111111111111111111111111111111111111111111.11111111
40
40
);
41
41
 
42
 
--error 1265 # Truncated
 
42
--error ER_WARN_DATA_TRUNCATED # Truncated
43
43
insert into t2 values (
44
44
  111111111111111111111111111111111111111111111111.111111111
45
45
);
94
94
 
95
95
# Exponent overflow bug
96
96
create table t1 (a decimal(10,0)) engine = blitzdb;
97
 
--error 1366 incorrect decimal value
 
97
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD incorrect decimal value
98
98
insert into t1 values ("1e4294967295");
99
99
select * from t1;
100
100
delete from t1;
101
 
--error 1366 incorrect decimal value
 
101
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD incorrect decimal value
102
102
insert into t1 values("1e4294967297");
103
103
select * from t1;
104
104
drop table t1;