~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/func_test.test

  • Committer: Stewart Smith
  • Date: 2010-11-03 03:27:09 UTC
  • mto: (1902.1.1 build) (1910.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1903.
  • Revision ID: stewart@flamingspork.com-20101103032709-oyvfrc6eb8fzj0mr
fix docs warning: docs/unlock.rst:2: (WARNING/2) Title underline too short.

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
# Bug#23411: The "%" (MOD) operator is not documented; MOD-ing zero returns strange result
70
70
# Manual: "Division by zero produces a NULL result"
71
71
#
 
72
--error ER_DIVISION_BY_ZERO
72
73
select (12%0) <=> null      as '1';
 
74
--error ER_DIVISION_BY_ZERO
73
75
select (12%0) is null       as '1';
 
76
--error ER_DIVISION_BY_ZERO
74
77
select 12%0                 as 'NULL';
75
78
select 12%2                 as '0';
76
79
select 12%NULL              as 'NULL';
80
83
select 0 % null             as 'NULL';
81
84
select null % null          as 'NULL';
82
85
 
 
86
--error ER_DIVISION_BY_ZERO
83
87
select (12 mod 0) <=> null  as '1';
 
88
--error ER_DIVISION_BY_ZERO
84
89
select (12 mod 0) is null   as '1';
 
90
--error ER_DIVISION_BY_ZERO
85
91
select 12 mod 0             as 'NULL';
86
92
select 12 mod 2             as '0';
87
93
select 12 mod null          as 'NULL';
90
96
select 0 mod null           as 'NULL';
91
97
select null mod null        as 'NULL';
92
98
 
 
99
--error ER_DIVISION_BY_ZERO
93
100
select mod(12.0, 0)         as 'NULL';
 
101
--error ER_DIVISION_BY_ZERO
94
102
select mod(12, 0.0)         as 'NULL';
95
103
select mod(12, NULL)        as 'NULL';
96
104
select mod(12.0, NULL)      as 'NULL';