Output:
mysql> drop table if exists t1;
|
Query OK, 0 rows affected (0.00 sec)
|
|
mysql> create table t1(c1 datetime(0));
|
nsert inQuery OK, 0 rows affected (0.01 sec)
|
|
mysql> insert into t1 values(null);
|
Query OK, 1 row affected (0.00 sec)
|
|
mysql> select * from t1 having '2015-01-01 01:00:00.000001' > coalesce(c1);
|
+------+
|
| c1 |
|
+------+
|
| NULL |
|
+------+
|
1 row in set (0.00 sec)
|
|
mysql> select version();
|
+-----------------+
|
| version() |
|
+-----------------+
|
| 10.1.10-MariaDB |
|
+-----------------+
|
1 row in set (0.00 sec)
|
Recreate:
drop table if exists t1;
|
create table t1(c1 datetime(0));
|
insert into t1 values(null);
|
select * from t1 having '2015-01-01 01:00:00.000001' > coalesce(c1);
|
Problem:
=====
having '2015-01-01 01:00:00.000001' > coalesce(c1) is expected to return NULL(False).
- duplicates
-
MDEV-9521
Least function returns 0000-00-00 for null date columns instead of null
-
-
Closed
{"report":{"fcp":809.3999999761581,"ttfb":281.7999999523163,"pageVisibility":"visible","entityId":55105,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"56d88656-7cdc-4b6f-8a87-e0ba9f30d8ee","navigationType":0,"readyForUser":867.1999999284744,"redirectCount":0,"resourceLoadedEnd":1021.8999999761581,"resourceLoadedStart":288,"resourceTiming":[{"duration":63.799999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":288,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":288,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":351.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":63.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":288.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":288.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":351.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":108.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":288.39999997615814,"connectEnd":288.39999997615814,"connectStart":288.39999997615814,"domainLookupEnd":288.39999997615814,"domainLookupStart":288.39999997615814,"fetchStart":288.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":288.39999997615814,"responseEnd":396.5,"responseStart":396.5,"secureConnectionStart":288.39999997615814},{"duration":156.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":288.5,"connectEnd":288.5,"connectStart":288.5,"domainLookupEnd":288.5,"domainLookupStart":288.5,"fetchStart":288.5,"redirectEnd":0,"redirectStart":0,"requestStart":288.5,"responseEnd":445,"responseStart":445,"secureConnectionStart":288.5},{"duration":160.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":288.60000002384186,"connectEnd":288.60000002384186,"connectStart":288.60000002384186,"domainLookupEnd":288.60000002384186,"domainLookupStart":288.60000002384186,"fetchStart":288.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":288.60000002384186,"responseEnd":449.1999999284744,"responseStart":449.10000002384186,"secureConnectionStart":288.60000002384186},{"duration":161.30000007152557,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":288.6999999284744,"connectEnd":288.6999999284744,"connectStart":288.6999999284744,"domainLookupEnd":288.6999999284744,"domainLookupStart":288.6999999284744,"fetchStart":288.6999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":288.6999999284744,"responseEnd":450,"responseStart":450,"secureConnectionStart":288.6999999284744},{"duration":161.80000007152557,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":288.7999999523163,"connectEnd":288.7999999523163,"connectStart":288.7999999523163,"domainLookupEnd":288.7999999523163,"domainLookupStart":288.7999999523163,"fetchStart":288.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":288.7999999523163,"responseEnd":450.60000002384186,"responseStart":450.60000002384186,"secureConnectionStart":288.7999999523163},{"duration":162.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":288.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":288.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":451.5,"responseStart":0,"secureConnectionStart":0},{"duration":162.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":289,"connectEnd":289,"connectStart":289,"domainLookupEnd":289,"domainLookupStart":289,"fetchStart":289,"redirectEnd":0,"redirectStart":0,"requestStart":289,"responseEnd":451.60000002384186,"responseStart":451.60000002384186,"secureConnectionStart":289},{"duration":163.79999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":289.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":289.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":452.89999997615814,"responseStart":0,"secureConnectionStart":0},{"duration":163.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":289.2999999523163,"connectEnd":289.2999999523163,"connectStart":289.2999999523163,"domainLookupEnd":289.2999999523163,"domainLookupStart":289.2999999523163,"fetchStart":289.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":289.2999999523163,"responseEnd":453,"responseStart":453,"secureConnectionStart":289.2999999523163},{"duration":731.1999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":290,"connectEnd":290,"connectStart":290,"domainLookupEnd":290,"domainLookupStart":290,"fetchStart":290,"redirectEnd":0,"redirectStart":0,"requestStart":290,"responseEnd":1021.1999999284744,"responseStart":1021.1999999284744,"secureConnectionStart":290},{"duration":731.8999999761581,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":290,"connectEnd":290,"connectStart":290,"domainLookupEnd":290,"domainLookupStart":290,"fetchStart":290,"redirectEnd":0,"redirectStart":0,"requestStart":290,"responseEnd":1021.8999999761581,"responseStart":1021.8999999761581,"secureConnectionStart":290},{"duration":292,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":611.7999999523163,"connectEnd":611.7999999523163,"connectStart":611.7999999523163,"domainLookupEnd":611.7999999523163,"domainLookupStart":611.7999999523163,"fetchStart":611.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":611.7999999523163,"responseEnd":903.7999999523163,"responseStart":903.7999999523163,"secureConnectionStart":611.7999999523163},{"duration":263.10000002384186,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":787.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":787.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1050.6000000238419,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":122,"responseStart":282,"responseEnd":285,"domLoading":286,"domInteractive":1040,"domContentLoadedEventStart":1040,"domContentLoadedEventEnd":1075,"domComplete":1532,"loadEventStart":1532,"loadEventEnd":1534,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1024.6000000238419},{"name":"bigPipe.sidebar-id.end","time":1025.3999999761581},{"name":"bigPipe.activity-panel-pipe-id.start","time":1025.6000000238419},{"name":"bigPipe.activity-panel-pipe-id.end","time":1027.7999999523163},{"name":"activityTabFullyLoaded","time":1119.2999999523163}],"measures":[],"correlationId":"9a650e917256ea","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":96,"dbReadsTimeInMs":11,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}