Assertion `records_are_comparable(table)' failed in compare_record upon multi-update involving versioned table via view
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (a INT, PRIMARY KEY (a)) ENGINE=InnoDB;
|
INSERT INTO t1 VALUES(0),(1);
|
|
CREATE TABLE t2 (pk INT, b INT, PRIMARY KEY (pk), KEY(b)) ENGINE=InnoDB WITH SYSTEM VERSIONING;
|
INSERT INTO t2 VALUES (1,0),(2,0);
|
|
CREATE ALGORITHM = MERGE VIEW v AS SELECT a, b FROM t1, t2;
|
UPDATE v SET b = NULL WHERE a <=> 0 ORDER BY b LIMIT 4;
|
|
# Cleanup
|
DROP VIEW v;
|
DROP TABLE t1, t2;
|
10.3 debug b633b6a9
|
mysqld: /data/src/10.3/sql/sql_update.cc:70: bool compare_record(const TABLE*): Assertion `records_are_comparable(table)' failed.
|
200622 1:37:02 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007f1135f90f12 in __GI___assert_fail (assertion=0x5599c9202d30 "records_are_comparable(table)", file=0x5599c9202d50 "/data/src/10.3/sql/sql_update.cc", line=70, function=0x5599c92033c0 <compare_record(TABLE const*)::__PRETTY_FUNCTION__> "bool compare_record(const TABLE*)") at assert.c:101
|
#8 0x00005599c867db2d in compare_record (table=0x7f10dc08dc80) at /data/src/10.3/sql/sql_update.cc:70
|
#9 0x00005599c86866ae in multi_update::do_updates (this=0x7f10dc017d10) at /data/src/10.3/sql/sql_update.cc:2715
|
#10 0x00005599c8686d7e in multi_update::send_eof (this=0x7f10dc017d10) at /data/src/10.3/sql/sql_update.cc:2841
|
#11 0x00005599c85f386c in do_select (join=0x7f10dc017de8, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:19291
|
#12 0x00005599c85ca531 in JOIN::exec_inner (this=0x7f10dc017de8) at /data/src/10.3/sql/sql_select.cc:4116
|
#13 0x00005599c85c9904 in JOIN::exec (this=0x7f10dc017de8) at /data/src/10.3/sql/sql_select.cc:3910
|
#14 0x00005599c85cac15 in mysql_select (thd=0x7f10dc000af0, tables=0x7f10dc012930, wild_num=0, fields=..., conds=0x7f10dc013310, og_num=1, order=0x7f10dc013588, group=0x0, having=0x0, proc_param=0x0, select_options=1342177408, result=0x7f10dc017d10, unit=0x7f10dc0049b8, select_lex=0x7f10dc005140) at /data/src/10.3/sql/sql_select.cc:4315
|
#15 0x00005599c8683192 in mysql_multi_update (thd=0x7f10dc000af0, table_list=0x7f10dc012930, fields=0x7f10dc005268, values=0x7f10dc005770, conds=0x7f10dc013310, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x7f10dc0049b8, select_lex=0x7f10dc005140, result=0x7f112b30afd0) at /data/src/10.3/sql/sql_update.cc:1799
|
#16 0x00005599c857bf4a in mysql_execute_command (thd=0x7f10dc000af0) at /data/src/10.3/sql/sql_parse.cc:4369
|
#17 0x00005599c8587e89 in mysql_parse (thd=0x7f10dc000af0, rawbuf=0x7f10dc012818 "UPDATE v SET b = NULL WHERE a <=> 0 ORDER BY b LIMIT 4", length=54, parser_state=0x7f112b30b5e0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7818
|
#18 0x00005599c85746d1 in dispatch_command (command=COM_QUERY, thd=0x7f10dc000af0, packet=0x7f10dc165771 "UPDATE v SET b = NULL WHERE a <=> 0 ORDER BY b LIMIT 4", packet_length=54, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1856
|
#19 0x00005599c8572fe9 in do_command (thd=0x7f10dc000af0) at /data/src/10.3/sql/sql_parse.cc:1401
|
#20 0x00005599c86ec289 in do_handle_one_connection (connect=0x5599cb848020) at /data/src/10.3/sql/sql_connect.cc:1403
|
#21 0x00005599c86ebfeb in handle_one_connection (arg=0x5599cb848020) at /data/src/10.3/sql/sql_connect.cc:1308
|
#22 0x00005599c90a2b52 in pfs_spawn_thread (arg=0x5599cb862fd0) at /data/src/10.3/storage/perfschema/pfs.cc:1869
|
#23 0x00007f1137f194a4 in start_thread (arg=0x7f112b30c700) at pthread_create.c:456
|
#24 0x00007f113604dd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
|
Reproducible with InnoDB, not with MyISAM.
Reproducible on 10.3-10.4, couldn't reproduce on the current 10.5.
Non-debug builds don't crash. All of them return the warning
UPDATE v SET b = NULL WHERE a <=> 0 ORDER BY b LIMIT 4;
|
Warnings:
|
Note 1355 View being updated does not have complete key of underlying table in it
|
I'm not sure whether the warning is expected, but it happens on all versions, regardless system versioning or the engine.
{"report":{"fcp":1235.8999996185303,"ttfb":257,"pageVisibility":"visible","entityId":88604,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"d6b461ac-b300-47ac-883b-fbc8c368d41e","navigationType":0,"readyForUser":1320.3000001907349,"redirectCount":0,"resourceLoadedEnd":929.3999996185303,"resourceLoadedStart":261.8999996185303,"resourceTiming":[{"duration":342.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":261.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":261.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":604.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":340.1000003814697,"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":265.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":265.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":605.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":527.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":266,"connectEnd":266,"connectStart":266,"domainLookupEnd":266,"domainLookupStart":266,"fetchStart":266,"redirectEnd":0,"redirectStart":0,"requestStart":607.5,"responseEnd":793.8999996185303,"responseStart":620.3000001907349,"secureConnectionStart":266},{"duration":659.3000001907349,"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":266.5,"connectEnd":266.5,"connectStart":266.5,"domainLookupEnd":266.5,"domainLookupStart":266.5,"fetchStart":266.5,"redirectEnd":0,"redirectStart":0,"requestStart":608,"responseEnd":925.8000001907349,"responseStart":631.6000003814697,"secureConnectionStart":266.5},{"duration":368.19999980926514,"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":266.80000019073486,"connectEnd":266.80000019073486,"connectStart":266.80000019073486,"domainLookupEnd":266.80000019073486,"domainLookupStart":266.80000019073486,"fetchStart":266.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":609.3000001907349,"responseEnd":635,"responseStart":630.8999996185303,"secureConnectionStart":266.80000019073486},{"duration":369.6000003814697,"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":266.8999996185303,"connectEnd":266.8999996185303,"connectStart":266.8999996185303,"domainLookupEnd":266.8999996185303,"domainLookupStart":266.8999996185303,"fetchStart":266.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":612.6000003814697,"responseEnd":636.5,"responseStart":633.3000001907349,"secureConnectionStart":266.8999996185303},{"duration":369.5,"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":267.1000003814697,"connectEnd":267.1000003814697,"connectStart":267.1000003814697,"domainLookupEnd":267.1000003814697,"domainLookupStart":267.1000003814697,"fetchStart":267.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":612.8999996185303,"responseEnd":636.6000003814697,"responseStart":634,"secureConnectionStart":267.1000003814697},{"duration":344,"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":267.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":267.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":611.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":371.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":267.3999996185303,"connectEnd":267.3999996185303,"connectStart":267.3999996185303,"domainLookupEnd":267.3999996185303,"domainLookupStart":267.3999996185303,"fetchStart":267.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":614.1000003814697,"responseEnd":639.3000001907349,"responseStart":636.8999996185303,"secureConnectionStart":267.3999996185303},{"duration":345.1000003814697,"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":267.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":267.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":612.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":372.4000005722046,"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":267.69999980926514,"connectEnd":267.69999980926514,"connectStart":267.69999980926514,"domainLookupEnd":267.69999980926514,"domainLookupStart":267.69999980926514,"fetchStart":267.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":616.5,"responseEnd":640.1000003814697,"responseStart":637.5,"secureConnectionStart":267.69999980926514},{"duration":650.8000001907349,"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":270.19999980926514,"connectEnd":270.19999980926514,"connectStart":270.19999980926514,"domainLookupEnd":270.19999980926514,"domainLookupStart":270.19999980926514,"fetchStart":270.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":747,"responseEnd":921,"responseStart":917.8000001907349,"secureConnectionStart":270.19999980926514},{"duration":659.1999998092651,"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":270.19999980926514,"connectEnd":270.19999980926514,"connectStart":270.19999980926514,"domainLookupEnd":270.19999980926514,"domainLookupStart":270.19999980926514,"fetchStart":270.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":866.3999996185303,"responseEnd":929.3999996185303,"responseStart":926.3000001907349,"secureConnectionStart":270.19999980926514},{"duration":116.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":920.5,"connectEnd":920.5,"connectStart":920.5,"domainLookupEnd":920.5,"domainLookupStart":920.5,"fetchStart":920.5,"redirectEnd":0,"redirectStart":0,"requestStart":998.6000003814697,"responseEnd":1037,"responseStart":1035.8999996185303,"secureConnectionStart":920.5}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":73,"responseStart":257,"responseEnd":270,"domLoading":261,"domInteractive":1377,"domContentLoadedEventStart":1377,"domContentLoadedEventEnd":1425,"domComplete":1875,"loadEventStart":1875,"loadEventEnd":1875,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1359.1999998092651},{"name":"bigPipe.sidebar-id.end","time":1360.1000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":1360.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1361},{"name":"activityTabFullyLoaded","time":1441}],"measures":[],"correlationId":"b5ca977297bfc9","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":104,"dbReadsTimeInMs":13,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
ok to push