mysql> drop table if exists t1;
|
mysql> create table t1 (a datetime);
|
mysql> insert into t1 values (time('58:00:00'));
|
mysql> select * from t1;
|
+---------------------+
|
| a |
|
+---------------------+
|
| 0000-00-00 58:00:00 |
|
+---------------------+
|
1 row in set (0.00 sec)
|
This is a wrong result.
The expected result is ' 0000-00-02 10:00:00',
which is what the explicit CAST returns:
mysql> select cast(time('58:00:00') as datetime);
|
+------------------------------------+
|
| cast(time('58:00:00') as datetime) |
|
+------------------------------------+
|
| 0000-00-02 10:00:00 |
|
+------------------------------------+
|
1 row in set (0.00 sec)
|
There is also a difference in 5.3 and 5.5 in how invariants of the same TIME value
are inserted into a DATE column:
mysql> drop table if exists t1; create table t1 (a date); insert into t1 values (time('2 10:00:00')),(time('58:20:30')); select * from t1;
|
Query OK, 0 rows affected (0.00 sec)
|
|
Query OK, 0 rows affected (0.07 sec)
|
|
Query OK, 2 rows affected, 2 warnings (0.00 sec)
|
Records: 2 Duplicates: 0 Warnings: 2
|
|
+------------+
|
| a |
|
+------------+
|
| 0000-00-02 |
|
| 0000-00-00 |
|
+------------+
|
2 rows in set (0.00 sec)
|
The expected result is to have the same values in the table in the two records.
MariaDB-10.0 returns '0000-00-00' for both records.
The expected result should probably be '0000-00-02'.
{"report":{"fcp":857.2000000476837,"ttfb":146.79999995231628,"pageVisibility":"visible","entityId":25730,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"bcd0d670-d4a9-45d2-8437-6f08e6ee90d0","navigationType":0,"readyForUser":915.4000000953674,"redirectCount":0,"resourceLoadedEnd":988.2999999523163,"resourceLoadedStart":157.5,"resourceTiming":[{"duration":221.79999995231628,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":157.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":157.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":379.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":221.70000004768372,"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":157.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":157.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":379.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":234.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":157.79999995231628,"connectEnd":157.79999995231628,"connectStart":157.79999995231628,"domainLookupEnd":157.79999995231628,"domainLookupStart":157.79999995231628,"fetchStart":157.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":157.79999995231628,"responseEnd":392,"responseStart":392,"secureConnectionStart":157.79999995231628},{"duration":304.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":158,"connectEnd":158,"connectStart":158,"domainLookupEnd":158,"domainLookupStart":158,"fetchStart":158,"redirectEnd":0,"redirectStart":0,"requestStart":158,"responseEnd":462.5,"responseStart":462.5,"secureConnectionStart":158},{"duration":307.5,"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":158.10000014305115,"connectEnd":158.10000014305115,"connectStart":158.10000014305115,"domainLookupEnd":158.10000014305115,"domainLookupStart":158.10000014305115,"fetchStart":158.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":158.10000014305115,"responseEnd":465.60000014305115,"responseStart":465.60000014305115,"secureConnectionStart":158.10000014305115},{"duration":308,"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":158.20000004768372,"connectEnd":158.20000004768372,"connectStart":158.20000004768372,"domainLookupEnd":158.20000004768372,"domainLookupStart":158.20000004768372,"fetchStart":158.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":158.20000004768372,"responseEnd":466.2000000476837,"responseStart":466.2000000476837,"secureConnectionStart":158.20000004768372},{"duration":308.40000009536743,"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":158.20000004768372,"connectEnd":158.20000004768372,"connectStart":158.20000004768372,"domainLookupEnd":158.20000004768372,"domainLookupStart":158.20000004768372,"fetchStart":158.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":158.20000004768372,"responseEnd":466.60000014305115,"responseStart":466.60000014305115,"secureConnectionStart":158.20000004768372},{"duration":308.7000000476837,"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":158.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":158.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":467,"responseStart":0,"secureConnectionStart":0},{"duration":308.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":158.5,"connectEnd":158.5,"connectStart":158.5,"domainLookupEnd":158.5,"domainLookupStart":158.5,"fetchStart":158.5,"redirectEnd":0,"redirectStart":0,"requestStart":158.5,"responseEnd":467,"responseStart":467,"secureConnectionStart":158.5},{"duration":308.89999985694885,"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":158.60000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":158.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":467.5,"responseStart":0,"secureConnectionStart":0},{"duration":308.7999999523163,"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":158.70000004768372,"connectEnd":158.70000004768372,"connectStart":158.70000004768372,"domainLookupEnd":158.70000004768372,"domainLookupStart":158.70000004768372,"fetchStart":158.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":158.70000004768372,"responseEnd":467.5,"responseStart":467.5,"secureConnectionStart":158.70000004768372},{"duration":397.59999990463257,"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":159.40000009536743,"connectEnd":159.40000009536743,"connectStart":159.40000009536743,"domainLookupEnd":159.40000009536743,"domainLookupStart":159.40000009536743,"fetchStart":159.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":159.40000009536743,"responseEnd":557,"responseStart":557,"secureConnectionStart":159.40000009536743},{"duration":828.8999998569489,"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":159.40000009536743,"connectEnd":159.40000009536743,"connectStart":159.40000009536743,"domainLookupEnd":159.40000009536743,"domainLookupStart":159.40000009536743,"fetchStart":159.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":159.40000009536743,"responseEnd":988.2999999523163,"responseStart":988.2999999523163,"secureConnectionStart":159.40000009536743},{"duration":378.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":609.1000001430511,"connectEnd":609.1000001430511,"connectStart":609.1000001430511,"domainLookupEnd":609.1000001430511,"domainLookupStart":609.1000001430511,"fetchStart":609.1000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":609.1000001430511,"responseEnd":987.7999999523163,"responseStart":987.7999999523163,"secureConnectionStart":609.1000001430511},{"duration":206.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":835,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":835,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1041.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":11,"responseStart":147,"responseEnd":155,"domLoading":155,"domInteractive":1013,"domContentLoadedEventStart":1013,"domContentLoadedEventEnd":1049,"domComplete":1597,"loadEventStart":1597,"loadEventEnd":1599,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":993.2000000476837},{"name":"bigPipe.sidebar-id.end","time":994.1000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":994.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":996.7000000476837},{"name":"activityTabFullyLoaded","time":1054.7000000476837}],"measures":[],"correlationId":"20ad2ca45bf7c7","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":79,"dbReadsTimeInMs":10,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}