Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.19
-
None
-
Windows 8.1
Description
ERROR_FOR_DIVISION_BY_ZERO doesn't appear to be honored.
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MariaDB connection id is 1043
|
Server version: 10.0.19-MariaDB mariadb.org binary distribution
|
|
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
|
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
|
MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode';
|
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Variable_name | Value |
|
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
|
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
|
MariaDB [(none)]> SELECT 1/0;
|
+------+
|
| 1/0 |
|
+------+
|
| NULL |
|
+------+
|
1 row in set, 1 warning (0.00 sec)
|
|
MariaDB [(none)]> show warnings;
|
+---------+------+---------------+
|
| Level | Code | Message |
|
+---------+------+---------------+
|
| Warning | 1365 | Division by 0 |
|
+---------+------+---------------+
|
1 row in set (0.00 sec)
|
There is a warning, but according to https://mariadb.com/kb/en/mariadb/sql_mode/ it should "Return a 1365 'Division by 0' error (instead of a warning)"
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
ERROR_FOR_DIVISION_BY_ZERO doesn't appear to be honored. {code:command} Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1043 Server version: 10.0.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode'; +---------------+--------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------+ | Variable_name | Value | +---------------+--------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------+ | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZE RO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_US ER,NO_ENGINE_SUBSTITUTION | +---------------+--------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------+ 1 row in set (0.00 sec) MariaDB [(none)]> SELECT 1/0; +------+ | 1/0 | +------+ | NULL | +------+ 1 row in set, 1 warning (0.00 sec) {code} |
ERROR_FOR_DIVISION_BY_ZERO doesn't appear to be honored. {code:none} Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1043 Server version: 10.0.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode'; +---------------+--------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------+ | Variable_name | Value | +---------------+--------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------+ | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZE RO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_US ER,NO_ENGINE_SUBSTITUTION | +---------------+--------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------+ 1 row in set (0.00 sec) MariaDB [(none)]> SELECT 1/0; +------+ | 1/0 | +------+ | NULL | +------+ 1 row in set, 1 warning (0.00 sec) {code} |
Description |
ERROR_FOR_DIVISION_BY_ZERO doesn't appear to be honored. {code:none} Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1043 Server version: 10.0.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode'; +---------------+--------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------+ | Variable_name | Value | +---------------+--------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------+ | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZE RO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_US ER,NO_ENGINE_SUBSTITUTION | +---------------+--------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------+ 1 row in set (0.00 sec) MariaDB [(none)]> SELECT 1/0; +------+ | 1/0 | +------+ | NULL | +------+ 1 row in set, 1 warning (0.00 sec) {code} |
ERROR_FOR_DIVISION_BY_ZERO doesn't appear to be honored. {code:none} Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1043 Server version: 10.0.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode'; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Variable_name | Value | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) MariaDB [(none)]> SELECT 1/0; +------+ | 1/0 | +------+ | NULL | +------+ 1 row in set, 1 warning (0.00 sec) {code} |
Summary | ERROR_FOR_DIVISION_BY_ZERO | ERROR_FOR_DIVISION_BY_ZERO not throwing error |
Description |
ERROR_FOR_DIVISION_BY_ZERO doesn't appear to be honored. {code:none} Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1043 Server version: 10.0.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode'; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Variable_name | Value | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) MariaDB [(none)]> SELECT 1/0; +------+ | 1/0 | +------+ | NULL | +------+ 1 row in set, 1 warning (0.00 sec) {code} |
ERROR_FOR_DIVISION_BY_ZERO doesn't appear to be honored. {code:none} Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1043 Server version: 10.0.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode'; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Variable_name | Value | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) MariaDB [(none)]> SELECT 1/0; +------+ | 1/0 | +------+ | NULL | +------+ 1 row in set, 1 warning (0.00 sec) {code} There is a warning, but according to https://mariadb.com/kb/en/mariadb/sql_mode/ it should "Return a 1365 'Division by 0' error" |
Description |
ERROR_FOR_DIVISION_BY_ZERO doesn't appear to be honored. {code:none} Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1043 Server version: 10.0.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode'; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Variable_name | Value | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) MariaDB [(none)]> SELECT 1/0; +------+ | 1/0 | +------+ | NULL | +------+ 1 row in set, 1 warning (0.00 sec) {code} There is a warning, but according to https://mariadb.com/kb/en/mariadb/sql_mode/ it should "Return a 1365 'Division by 0' error" |
ERROR_FOR_DIVISION_BY_ZERO doesn't appear to be honored. {code:none} Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 1043 Server version: 10.0.19-MariaDB mariadb.org binary distribution Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> SHOW VARIABLES LIKE 'sql_mode'; +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Variable_name | Value | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec) MariaDB [(none)]> SELECT 1/0; +------+ | 1/0 | +------+ | NULL | +------+ 1 row in set, 1 warning (0.00 sec) MariaDB [(none)]> show warnings; +---------+------+---------------+ | Level | Code | Message | +---------+------+---------------+ | Warning | 1365 | Division by 0 | +---------+------+---------------+ 1 row in set (0.00 sec) {code} There is a warning, but according to https://mariadb.com/kb/en/mariadb/sql_mode/ it should "Return a 1365 'Division by 0' error (instead of a warning)" |
Assignee | Ian Gilfillan [ greenman ] |
Component/s | Documentation [ 10903 ] |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Fix Version/s | N/A [ 14700 ] |
Priority | Minor [ 4 ] | Major [ 3 ] |
Assignee | Ian Gilfillan [ greenman ] |
Assignee | Ian Gilfillan [ greenman ] | |
Resolution | Fixed [ 1 ] | |
Status | Confirmed [ 10101 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 70010 ] | MariaDB v4 [ 149272 ] |