
|
If you were logged in you would be able to see more operations.
|
|
|
| Planning Status: |
Unspecified
|
|
Infinity and NaN should not escape from the engine. Client side tools should not see the special values. Integer overflow should be detected in the server side, too.
SQL> select 1e161/1e-161from rdb$database;
DIVIDE
=======================
Statement failed, SQLSTATE = 22003
arithmetic exception, numeric overflow, or string truncation
-Floating-point overflow. The exponent of a floating-point operation is greater than the magnitude
allowed.
This is correct detection.
SQL> set sql dialect 1;
WARNING: Client SQL dialect has been set to 1 when connecting to Database SQL dialect 3 database.
SQL> select 1e161/1e-161from rdb$database;
DIVIDE
=======================
Infinity
AFAIK, dialect 1 should be protected as well. Multiplication is protected in both dialects.
We need to protect sum and subtraction as well:
SQL> set sql dialect 3;
SQL> select 1e308 + 1e308 from rdb$database;
ADD
=======================
Infinity
SQL> select 1e308 - -1e308 from rdb$database;
SUBTRACT
=======================
Infinity
|
|
Description
|
Infinity and NaN should not escape from the engine. Client side tools should not see the special values. Integer overflow should be detected in the server side, too.
SQL> select 1e161/1e-161from rdb$database;
DIVIDE
=======================
Statement failed, SQLSTATE = 22003
arithmetic exception, numeric overflow, or string truncation
-Floating-point overflow. The exponent of a floating-point operation is greater than the magnitude
allowed.
This is correct detection.
SQL> set sql dialect 1;
WARNING: Client SQL dialect has been set to 1 when connecting to Database SQL dialect 3 database.
SQL> select 1e161/1e-161from rdb$database;
DIVIDE
=======================
Infinity
AFAIK, dialect 1 should be protected as well. Multiplication is protected in both dialects.
We need to protect sum and subtraction as well:
SQL> set sql dialect 3;
SQL> select 1e308 + 1e308 from rdb$database;
ADD
=======================
Infinity
SQL> select 1e308 - -1e308 from rdb$database;
SUBTRACT
=======================
Infinity
|
Show » |
|