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)"
{"report":{"fcp":961.2999999821186,"ttfb":262.09999999403954,"pageVisibility":"visible","entityId":51810,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"f844e34d-ed5a-4a98-9968-fc122b92674d","navigationType":0,"readyForUser":1040.199999988079,"redirectCount":0,"resourceLoadedEnd":1068.3999999761581,"resourceLoadedStart":267.59999999403954,"resourceTiming":[{"duration":91.09999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":267.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":267.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":358.69999998807907,"responseStart":0,"secureConnectionStart":0},{"duration":91,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":267.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":267.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":358.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":159.09999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":268.09999999403954,"connectEnd":268.09999999403954,"connectStart":268.09999999403954,"domainLookupEnd":268.09999999403954,"domainLookupStart":268.09999999403954,"fetchStart":268.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":268.09999999403954,"responseEnd":427.19999998807907,"responseStart":427.19999998807907,"secureConnectionStart":268.09999999403954},{"duration":204,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":268.19999998807907,"connectEnd":268.19999998807907,"connectStart":268.19999998807907,"domainLookupEnd":268.19999998807907,"domainLookupStart":268.19999998807907,"fetchStart":268.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":268.19999998807907,"responseEnd":472.19999998807907,"responseStart":472.19999998807907,"secureConnectionStart":268.19999998807907},{"duration":207.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":268.39999997615814,"connectEnd":268.39999997615814,"connectStart":268.39999997615814,"domainLookupEnd":268.39999997615814,"domainLookupStart":268.39999997615814,"fetchStart":268.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":268.39999997615814,"responseEnd":475.89999997615814,"responseStart":475.89999997615814,"secureConnectionStart":268.39999997615814},{"duration":207.69999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":268.59999999403954,"connectEnd":268.59999999403954,"connectStart":268.59999999403954,"domainLookupEnd":268.59999999403954,"domainLookupStart":268.59999999403954,"fetchStart":268.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":268.59999999403954,"responseEnd":476.2999999821186,"responseStart":476.2999999821186,"secureConnectionStart":268.59999999403954},{"duration":208,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":268.69999998807907,"connectEnd":268.69999998807907,"connectStart":268.69999998807907,"domainLookupEnd":268.69999998807907,"domainLookupStart":268.69999998807907,"fetchStart":268.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":268.69999998807907,"responseEnd":476.69999998807907,"responseStart":476.69999998807907,"secureConnectionStart":268.69999998807907},{"duration":298.30000001192093,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":268.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":268.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":567.1999999880791,"responseStart":0,"secureConnectionStart":0},{"duration":208,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":269.09999999403954,"connectEnd":269.09999999403954,"connectStart":269.09999999403954,"domainLookupEnd":269.09999999403954,"domainLookupStart":269.09999999403954,"fetchStart":269.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":269.09999999403954,"responseEnd":477.09999999403954,"responseStart":477.09999999403954,"secureConnectionStart":269.09999999403954},{"duration":298.19999998807907,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":269.19999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":269.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":567.3999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":208.2000000178814,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":269.39999997615814,"connectEnd":269.39999997615814,"connectStart":269.39999997615814,"domainLookupEnd":269.39999997615814,"domainLookupStart":269.39999997615814,"fetchStart":269.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":269.39999997615814,"responseEnd":477.59999999403954,"responseStart":477.59999999403954,"secureConnectionStart":269.39999997615814},{"duration":505.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":274.2999999821186,"connectEnd":274.2999999821186,"connectStart":274.2999999821186,"domainLookupEnd":274.2999999821186,"domainLookupStart":274.2999999821186,"fetchStart":274.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":274.2999999821186,"responseEnd":780.1999999880791,"responseStart":780.1999999880791,"secureConnectionStart":274.2999999821186},{"duration":649.7000000178814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":274.39999997615814,"connectEnd":274.39999997615814,"connectStart":274.39999997615814,"domainLookupEnd":274.39999997615814,"domainLookupStart":274.39999997615814,"fetchStart":274.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":274.39999997615814,"responseEnd":924.0999999940395,"responseStart":924.0999999940395,"secureConnectionStart":274.39999997615814},{"duration":202.40000000596046,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":578.1999999880791,"connectEnd":578.1999999880791,"connectStart":578.1999999880791,"domainLookupEnd":578.1999999880791,"domainLookupStart":578.1999999880791,"fetchStart":578.1999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":578.1999999880791,"responseEnd":780.5999999940395,"responseStart":780.5999999940395,"secureConnectionStart":578.1999999880791},{"duration":198.59999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":869.7999999821186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":869.7999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1068.3999999761581,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":102,"responseStart":262,"responseEnd":266,"domLoading":265,"domInteractive":1095,"domContentLoadedEventStart":1095,"domContentLoadedEventEnd":1143,"domComplete":1758,"loadEventStart":1758,"loadEventEnd":1759,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1074.7999999821186},{"name":"bigPipe.sidebar-id.end","time":1075.5999999940395},{"name":"bigPipe.activity-panel-pipe-id.start","time":1075.7999999821186},{"name":"bigPipe.activity-panel-pipe-id.end","time":1076.699999988079},{"name":"activityTabFullyLoaded","time":1160.5}],"measures":[],"correlationId":"6f77d5e5e981a2","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":96,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I am not sure what the intended behaviour is - to me it looks like a bug, as you would expect an option called "ERROR_*" to actually return an error, at least in strict mode. I have tested the behaviour on MariaDB 5.5, MySQL 5.6.19 and it works in the same undocumented way as well. The option has also been deprecated in MySQL 5.6. I'll update the documentation to reflect what happens now, but leaving the task open for re-assigning if its seen as a bug rather than intentional.