~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/type_newdecimal.result

  • Committer: Brian Aker
  • Date: 2010-10-06 07:52:09 UTC
  • mto: (1821.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1822.
  • Revision ID: brian@tangent.org-20101006075209-0fu3u7zg9r8rw3i8
Fix issue with divide by zero not being an error.

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
) ENGINE=X COLLATE = utf8_general_ci
132
132
drop table t1;
133
133
select 1e10/0e0;
134
 
1e10/0e0
135
 
NULL
136
 
Warnings:
137
 
Error   1365    Division by 0
 
134
ERROR 22012: Division by 0
138
135
select 1/3;
139
136
1/3
140
137
0.3333
545
542
1E-500 = 0
546
543
1
547
544
select 1 / 1E-500;
548
 
1 / 1E-500
549
 
NULL
550
 
Warnings:
551
 
Error   1365    Division by 0
 
545
ERROR 22012: Division by 0
552
546
select 1 / 0;
553
 
1 / 0
554
 
NULL
555
 
Warnings:
556
 
Error   1365    Division by 0
 
547
ERROR 22012: Division by 0
557
548
CREATE TABLE Sow6_2f (col1 NUMERIC(4,2));
558
549
INSERT INTO Sow6_2f VALUES (10.55);
559
550
INSERT INTO Sow6_2f VALUES (10.5555);
565
556
INSERT INTO Sow6_2f VALUES (101.55);
566
557
ERROR 22003: Out of range value for column 'col1' at row 1
567
558
SELECT MOD(col1,0) FROM Sow6_2f;
568
 
MOD(col1,0)
569
 
NULL
570
 
NULL
571
 
NULL
572
 
Warnings:
573
 
Error   1365    Division by 0
574
 
Error   1365    Division by 0
575
 
Error   1365    Division by 0
 
559
ERROR 22012: Division by 0
576
560
INSERT INTO Sow6_2f VALUES ('a59b');
577
561
ERROR HY000: Incorrect decimal value: 'a59b' for column 'col1' at row 1
578
562
drop table Sow6_2f;
580
564
10.3330000000000/12.34500000
581
565
0.83701903604698258
582
566
select 0/0;
583
 
0/0
584
 
NULL
585
 
Warnings:
586
 
Error   1365    Division by 0
 
567
ERROR 22012: Division by 0
587
568
select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 as x;
588
569
x
589
570
99999999999999999999999999999999999999999999999999999999999999999
614
595
9999999999999999999999999999999999.00000000000000000000 0.00
615
596
DROP TABLE t1;
616
597
select abs(10/0);
617
 
abs(10/0)
618
 
NULL
619
 
Warnings:
620
 
Error   1365    Division by 0
 
598
ERROR 22012: Division by 0
621
599
select abs(NULL);
622
600
abs(NULL)
623
601
NULL