This crash is very similar to MDEV-18156, but now with TIME_ROUND_FRACTIONAL instead of PAD_CHAR_TO_FULL_LENGTH.
It should be addressed in a separate patch after the fix for MDEV-18156 propagates to 10.4.
This crash is also very similar to MDEV-18153, but the generation expressions are different:
- GENERATED ALWAYS AS (CAST(a AS DATETIME(3))) VIRTUAL
- GENERATED ALWAYS AS (CAST(a AS TIME(3))) VIRTUAL
MDEV-18156 needs MDEV-18156 as a dependency. MDEV-18153 can possibly be fixed alone.
SET sql_mode='';
|
CREATE OR REPLACE TABLE t1 (
|
a DATETIME(6),
|
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS DATETIME(3))) VIRTUAL,
|
KEY (v)
|
);
|
INSERT IGNORE INTO t1 (a) VALUES ('2001-01-01 10:20:30.999999');
|
SELECT * FROM t1;
|
SET sql_mode=TIME_ROUND_FRACTIONAL;
|
FLUSH TABLES;
|
SELECT * FROM t1;
|
UPDATE t1 SET a='2001-01-02 10:20:30.999999';
|
#0 0x00007ffff76f357f in raise () from /lib64/libc.so.6
|
#1 0x00007ffff76dd895 in abort () from /lib64/libc.so.6
|
#2 0x00007ffff76dd769 in __assert_fail_base.cold.0 () from /lib64/libc.so.6
|
#3 0x00007ffff76eba26 in __assert_fail () from /lib64/libc.so.6
|
#4 0x0000000000eff9ac in row_upd_sec_index_entry (node=0x7fff60083cd0, thr=0x7fff60083fd8)
|
at /home/bar/maria-git/server.10.4/storage/innobase/row/row0upd.cc:2429
|
#5 0x0000000000f0001e in row_upd_sec_step (node=0x7fff60083cd0, thr=0x7fff60083fd8)
|
at /home/bar/maria-git/server.10.4/storage/innobase/row/row0upd.cc:2543
|
#6 0x0000000000f02736 in row_upd (node=0x7fff60083cd0, thr=0x7fff60083fd8)
|
at /home/bar/maria-git/server.10.4/storage/innobase/row/row0upd.cc:3319
|
#7 0x0000000000f02a9d in row_upd_step (thr=0x7fff60083fd8)
|
at /home/bar/maria-git/server.10.4/storage/innobase/row/row0upd.cc:3434
|
#8 0x0000000000eb654c in row_update_for_mysql (prebuilt=0x7fff60083518)
|
at /home/bar/maria-git/server.10.4/storage/innobase/row/row0mysql.cc:1889
|
#9 0x0000000000d60723 in ha_innobase::update_row (this=0x7fff6001dcf8,
|
old_row=0x7fff6001d8a0 "\374\231g\202\245\036\017B?\027\062\060\060\061-01-01 10:20:31.000",
|
new_row=0x7fff6001d870 "\374\231g\204\245\036\017B?\027\062\060\060\061-01-02 10:20:31.000")
|
at /home/bar/maria-git/server.10.4/storage/innobase/handler/ha_innodb.cc:8840
|
#10 0x0000000000b4bc0a in handler::ha_update_row (this=0x7fff6001dcf8,
|
old_data=0x7fff6001d8a0 "\374\231g\202\245\036\017B?\027\062\060\060\061-01-01 10:20:31.000",
|
new_data=0x7fff6001d870 "\374\231g\204\245\036\017B?\027\062\060\060\061-01-02 10:20:31.000")
|
at /home/bar/maria-git/server.10.4/sql/handler.cc:6727
|
#11 0x000000000091b9ad in mysql_update (thd=0x7fff60000d60, table_list=0x7fff60014270, fields=...,
|
values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, ignore=false,
|
found_return=0x7ffff41d6218, updated_return=0x7ffff41d6210)
|
at /home/bar/maria-git/server.10.4/sql/sql_update.cc:1045
|
#12 0x0000000000820bc2 in mysql_execute_command (thd=0x7fff60000d60)
|
at /home/bar/maria-git/server.10.4/sql/sql_parse.cc:4369
|
#13 0x000000000082cd07 in mysql_parse (thd=0x7fff60000d60,
|
rawbuf=0x7fff60014168 "UPDATE t1 SET a='2001-01-02 10:20:30.999999'", length=44,
|
parser_state=0x7ffff41d7000, is_com_multi=false, is_next_command=false)
|
at /home/bar/maria-git/server.10.4/sql/sql_parse.cc:7908
|
#14 0x000000000081981c in dispatch_command (command=COM_QUERY, thd=0x7fff60000d60,
|
packet=0x7fff600085e1 "UPDATE t1 SET a='2001-01-02 10:20:30.999999'", packet_length=44,
|
is_com_multi=false, is_next_command=false) at /home/bar/maria-git/server.10.4/sql/sql_parse.cc:1842
|
#15 0x0000000000817fc6 in do_command (thd=0x7fff60000d60)
|
The same problem is repeatable with TIME type cast:
SET sql_mode='';
|
CREATE OR REPLACE TABLE t1 (
|
a TIME(6),
|
v VARCHAR(30) GENERATED ALWAYS AS (CAST(a AS TIME(3))) VIRTUAL,
|
KEY (v)
|
);
|
INSERT IGNORE INTO t1 (a) VALUES ('10:20:30.999999');
|
SELECT * FROM t1;
|
SET sql_mode=TIME_ROUND_FRACTIONAL;
|
FLUSH TABLES;
|
SELECT * FROM t1;
|
UPDATE t1 SET a='11:20:30.999999';
|
{"report":{"fcp":858.4000005722046,"ttfb":242.19999980926514,"pageVisibility":"visible","entityId":78512,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"ecc348f4-a165-44a6-98cc-9f13aa47aaf1","navigationType":0,"readyForUser":949.8000001907349,"redirectCount":0,"resourceLoadedEnd":1134.9000005722046,"resourceLoadedStart":248.19999980926514,"resourceTiming":[{"duration":127.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":248.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":248.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":376,"responseStart":0,"secureConnectionStart":0},{"duration":127.80000019073486,"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":248.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":248.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":376.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":139.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":248.60000038146973,"connectEnd":248.60000038146973,"connectStart":248.60000038146973,"domainLookupEnd":248.60000038146973,"domainLookupStart":248.60000038146973,"fetchStart":248.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":248.60000038146973,"responseEnd":388.4000005722046,"responseStart":388.4000005722046,"secureConnectionStart":248.60000038146973},{"duration":195.80000019073486,"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":248.80000019073486,"connectEnd":248.80000019073486,"connectStart":248.80000019073486,"domainLookupEnd":248.80000019073486,"domainLookupStart":248.80000019073486,"fetchStart":248.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":248.80000019073486,"responseEnd":444.6000003814697,"responseStart":444.6000003814697,"secureConnectionStart":248.80000019073486},{"duration":199.19999980926514,"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":249.10000038146973,"connectEnd":249.10000038146973,"connectStart":249.10000038146973,"domainLookupEnd":249.10000038146973,"domainLookupStart":249.10000038146973,"fetchStart":249.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":249.10000038146973,"responseEnd":448.30000019073486,"responseStart":448.30000019073486,"secureConnectionStart":249.10000038146973},{"duration":199.5,"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":249.19999980926514,"connectEnd":249.19999980926514,"connectStart":249.19999980926514,"domainLookupEnd":249.19999980926514,"domainLookupStart":249.19999980926514,"fetchStart":249.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":249.19999980926514,"responseEnd":448.69999980926514,"responseStart":448.69999980926514,"secureConnectionStart":249.19999980926514},{"duration":199.69999980926514,"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":249.5,"connectEnd":249.5,"connectStart":249.5,"domainLookupEnd":249.5,"domainLookupStart":249.5,"fetchStart":249.5,"redirectEnd":0,"redirectStart":0,"requestStart":249.5,"responseEnd":449.19999980926514,"responseStart":449.19999980926514,"secureConnectionStart":249.5},{"duration":281.20000076293945,"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":249.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":249.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":530.9000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":199.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":249.80000019073486,"connectEnd":249.80000019073486,"connectStart":249.80000019073486,"domainLookupEnd":249.80000019073486,"domainLookupStart":249.80000019073486,"fetchStart":249.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":249.80000019073486,"responseEnd":449.69999980926514,"responseStart":449.69999980926514,"secureConnectionStart":249.80000019073486},{"duration":281,"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":250,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":250,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":531,"responseStart":0,"secureConnectionStart":0},{"duration":200.30000019073486,"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":250.10000038146973,"connectEnd":250.10000038146973,"connectStart":250.10000038146973,"domainLookupEnd":250.10000038146973,"domainLookupStart":250.10000038146973,"fetchStart":250.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":250.10000038146973,"responseEnd":450.4000005722046,"responseStart":450.4000005722046,"secureConnectionStart":250.10000038146973},{"duration":526.6000003814697,"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":251.19999980926514,"connectEnd":251.19999980926514,"connectStart":251.19999980926514,"domainLookupEnd":251.19999980926514,"domainLookupStart":251.19999980926514,"fetchStart":251.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":251.19999980926514,"responseEnd":777.8000001907349,"responseStart":777.8000001907349,"secureConnectionStart":251.19999980926514},{"duration":883.7000007629395,"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":251.19999980926514,"connectEnd":251.19999980926514,"connectStart":251.19999980926514,"domainLookupEnd":251.19999980926514,"domainLookupStart":251.19999980926514,"fetchStart":251.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":251.19999980926514,"responseEnd":1134.9000005722046,"responseStart":1134.9000005722046,"secureConnectionStart":251.19999980926514},{"duration":241,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":542.6999998092651,"connectEnd":542.6999998092651,"connectStart":542.6999998092651,"domainLookupEnd":542.6999998092651,"domainLookupStart":542.6999998092651,"fetchStart":542.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":542.6999998092651,"responseEnd":783.6999998092651,"responseStart":783.6999998092651,"secureConnectionStart":542.6999998092651},{"duration":380,"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":814.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":814.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1194.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":348,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":815.1000003814697,"connectEnd":815.1000003814697,"connectStart":815.1000003814697,"domainLookupEnd":815.1000003814697,"domainLookupStart":815.1000003814697,"fetchStart":815.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":815.1000003814697,"responseEnd":1163.1000003814697,"responseStart":1163.1000003814697,"secureConnectionStart":815.1000003814697},{"duration":369.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/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.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":815.5,"connectEnd":815.5,"connectStart":815.5,"domainLookupEnd":815.5,"domainLookupStart":815.5,"fetchStart":815.5,"redirectEnd":0,"redirectStart":0,"requestStart":815.5,"responseEnd":1185.3000001907349,"responseStart":1185.3000001907349,"secureConnectionStart":815.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":50,"responseStart":242,"responseEnd":244,"domLoading":245,"domInteractive":1151,"domContentLoadedEventStart":1151,"domContentLoadedEventEnd":1194,"domComplete":1386,"loadEventStart":1387,"loadEventEnd":1387,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1136.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1137.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":1137.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1138.4000005722046},{"name":"activityTabFullyLoaded","time":1209.5}],"measures":[],"correlationId":"a5597c71a2f0b5","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":118,"dbReadsTimeInMs":15,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Looks very much like
MDEV-18153, does it need to be separate?