While separately each part of the test case is fairly normal, together they make such a weird mix of optimizer features, InnoDB, locking, temporary tables, and virtual columns that it can't all be relevant. However, I couldn't get rid of any remaining component.
--source include/have_innodb.inc
CREATETEMPORARYTABLE t1 (a INT, b INTAS (a*2), c CHAR(3), KEY(b), KEY(c)) ENGINE=InnoDB;
#7 0x00007fc815622662 in __GI___assert_fail (assertion=0x55eb6e5f063f "!is_v", file=0x55eb6e5ec218 "/data/src/10.4/storage/innobase/handler/ha_innodb.cc", line=7782, function=0x55eb6e5f0618 "void ha_innobase::build_template(bool)") at assert.c:101
#8 0x000055eb6ddb1db1 in ha_innobase::build_template (this=0x7fc7c01a6038, whole_row=true) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:7782
#9 0x000055eb6ddb6918 in ha_innobase::change_active_index (this=0x7fc7c01a6038, keynr=0) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9632
#10 0x000055eb6ddb588a in ha_innobase::index_init (this=0x7fc7c01a6038, keynr=0) at /data/src/10.4/storage/innobase/handler/ha_innodb.cc:9186
#11 0x000055eb6d5ee030 in handler::ha_index_init (this=0x7fc7c01a6038, idx=0, sorted=true) at /data/src/10.4/sql/handler.h:3253
#12 0x000055eb6db72513 in QUICK_RANGE_SELECT::reset (this=0x7fc7c01aacf0) at /data/src/10.4/sql/opt_range.cc:12262
#13 0x000055eb6d72339a in join_init_read_record (tab=0x7fc7c0018b40) at /data/src/10.4/sql/sql_select.cc:21559
#14 0x000055eb6d721002 in sub_select (join=0x7fc7c0016820, join_tab=0x7fc7c0018b40, end_of_records=false) at /data/src/10.4/sql/sql_select.cc:20625
#15 0x000055eb6d7204d4 in do_select (join=0x7fc7c0016820, procedure=0x0) at /data/src/10.4/sql/sql_select.cc:20164
#16 0x000055eb6d6f4ec0 in JOIN::exec_inner (this=0x7fc7c0016820) at /data/src/10.4/sql/sql_select.cc:4542
#17 0x000055eb6d6f3fd0 in JOIN::exec (this=0x7fc7c0016820) at /data/src/10.4/sql/sql_select.cc:4324
#18 0x000055eb6d6f574a in mysql_select (thd=0x7fc7c0000d90, tables=0x7fc7c0014e50, wild_num=1, fields=..., conds=0x7fc7c0015e08, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2149845760, result=0x7fc7c00167f8, unit=0x7fc7c0004cc0, select_lex=0x7fc7c0014870) at /data/src/10.4/sql/sql_select.cc:4763
#19 0x000055eb6d6e5026 in handle_select (thd=0x7fc7c0000d90, lex=0x7fc7c0004c00, result=0x7fc7c00167f8, setup_tables_done_option=0) at /data/src/10.4/sql/sql_select.cc:436
#20 0x000055eb6d6aa88a in execute_sqlcom_select (thd=0x7fc7c0000d90, all_tables=0x7fc7c0014e50) at /data/src/10.4/sql/sql_parse.cc:6449
#21 0x000055eb6d6a1092 in mysql_execute_command (thd=0x7fc7c0000d90) at /data/src/10.4/sql/sql_parse.cc:3963
#22 0x000055eb6d6ae81e in mysql_parse (thd=0x7fc7c0000d90, rawbuf=0x7fc7c0014798 "SELECT * FROM t1 WHERE b > 17 AND c IN ('QAT', 'PRT', 'FIN')", length=60, parser_state=0x7fc80a7ca550, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7995
#23 0x000055eb6d69ac97 in dispatch_command (command=COM_QUERY, thd=0x7fc7c0000d90, packet=0x7fc7c000abf1 "", packet_length=60, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
#24 0x000055eb6d699524 in do_command (thd=0x7fc7c0000d90) at /data/src/10.4/sql/sql_parse.cc:1373
#25 0x000055eb6d82798b in do_handle_one_connection (connect=0x55eb70a9dd00) at /data/src/10.4/sql/sql_connect.cc:1420
#26 0x000055eb6d827633 in handle_one_connection (arg=0x55eb70a9dd00) at /data/src/10.4/sql/sql_connect.cc:1316
#27 0x000055eb6dd42dfd in pfs_spawn_thread (arg=0x55eb70a7e270) at /data/src/10.4/storage/perfschema/pfs.cc:1869
#28 0x00007fc815aeeea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#29 0x00007fc8156ebdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Plan:
"query_block": {
"select_id": 1,
"table": {
"table_name": "t1",
"access_type": "range",
"possible_keys": ["b", "c"],
"key": "b",
"key_length": "5",
"used_key_parts": ["b"],
"rowid_filter": {
"range": {
"key": "c",
"used_key_parts": ["c"]
},
"rows": 5,
"selectivity_pct": 21.739
},
"rows": 5,
"filtered": 21.739,
"attached_condition": "t1.c in ('QAT','PRT','FIN') and t1.b > 17"
}
}
Attachments
Issue Links
duplicates
MDEV-31154Fatal InnoDB error or assertion `!is_v' failure upon multi-update with indexed virtual column
10.4 07a06022c4e63adc360b427 returns the correct result, but 10.5 e1825e39cae73f43f20ed7ae856f167b0ecf4598 -10.11 fails with the assertion
Alice Sherepa
added a comment - - edited 10.4 07a06022c4e63adc360b427 returns the correct result, but 10.5 e1825e39cae73f43f20ed7ae856f167b0ecf4598 -10.11 fails with the assertion
MDEV-31154 Fatal InnoDB error or assertion `!is_v' failure upon multi-update with indexed virtual column
MDEV-33558 Fatal error InnoDB: Clustered record field for column x not found
This is issue is about row ID filtering used with index on virtual
column(s). We hit debug assert and crash while building the record
template in Innodb. The primary reason is that we try to force the code
path to use the ICP path. With ICP, we don't support index with virtual
column and we validate it while index condition is pushed.
Simplify the code for building template to handle both ICP and Row ID
filtering by skipping virtual columns.
Alice Sherepa
added a comment - not repeatable after
commit d912a6369c6f7f8ba233ac88436d59f6e420c368
Author: mariadb-DebarunBanerjee <debarun.banerjee@mariadb.com>
Date: Thu Mar 14 18:59:47 2024 +0530
MDEV-31154 Fatal InnoDB error or assertion `!is_v' failure upon multi-update with indexed virtual column
MDEV-33558 Fatal error InnoDB: Clustered record field for column x not found
This is issue is about row ID filtering used with index on virtual
column(s). We hit debug assert and crash while building the record
template in Innodb. The primary reason is that we try to force the code
path to use the ICP path. With ICP, we don't support index with virtual
column and we validate it while index condition is pushed.
Simplify the code for building template to handle both ICP and Row ID
filtering by skipping virtual columns.
People
Sergei Petrunia
Elena Stepanova
Votes:
1Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":3076,"ttfb":520.5999999046326,"pageVisibility":"visible","entityId":108029,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"8f6e561a-ffdc-4ed0-ab81-589dc4845e10","navigationType":0,"readyForUser":3014,"redirectCount":0,"resourceLoadedEnd":2466.2999999523163,"resourceLoadedStart":546.8999998569489,"resourceTiming":[{"duration":148.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":546.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":546.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":695.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":148.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":547.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":547.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":695.5,"responseStart":0,"secureConnectionStart":0},{"duration":1404.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":547.5,"connectEnd":547.5,"connectStart":547.5,"domainLookupEnd":547.5,"domainLookupStart":547.5,"fetchStart":547.5,"redirectEnd":0,"redirectStart":0,"requestStart":741.8999998569489,"responseEnd":1951.7000000476837,"responseStart":896.8999998569489,"secureConnectionStart":547.5},{"duration":1680.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":548,"connectEnd":548,"connectStart":548,"domainLookupEnd":548,"domainLookupStart":548,"fetchStart":548,"redirectEnd":0,"redirectStart":0,"requestStart":742.0999999046326,"responseEnd":2228.7999999523163,"responseStart":1020.7000000476837,"secureConnectionStart":548},{"duration":608.1000001430511,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":550.3999998569489,"connectEnd":550.3999998569489,"connectStart":550.3999998569489,"domainLookupEnd":550.3999998569489,"domainLookupStart":550.3999998569489,"fetchStart":550.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":773.7000000476837,"responseEnd":1158.5,"responseStart":1116.7000000476837,"secureConnectionStart":550.3999998569489},{"duration":607.9000000953674,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":550.8999998569489,"connectEnd":550.8999998569489,"connectStart":550.8999998569489,"domainLookupEnd":550.8999998569489,"domainLookupStart":550.8999998569489,"fetchStart":550.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":774,"responseEnd":1158.7999999523163,"responseStart":1120.3999998569489,"secureConnectionStart":550.8999998569489},{"duration":607.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":551.3999998569489,"connectEnd":551.3999998569489,"connectStart":551.3999998569489,"domainLookupEnd":551.3999998569489,"domainLookupStart":551.3999998569489,"fetchStart":551.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":774.3999998569489,"responseEnd":1159.2000000476837,"responseStart":1133.0999999046326,"secureConnectionStart":551.3999998569489},{"duration":190.10000014305115,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":551.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":551.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":742,"responseStart":0,"secureConnectionStart":0},{"duration":625.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":553.5,"connectEnd":553.5,"connectStart":553.5,"domainLookupEnd":553.5,"domainLookupStart":553.5,"fetchStart":553.5,"redirectEnd":0,"redirectStart":0,"requestStart":774.7000000476837,"responseEnd":1179.2999999523163,"responseStart":1149.8999998569489,"secureConnectionStart":553.5},{"duration":188.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":553.8999998569489,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":553.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":742.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":627.8999998569489,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":554,"connectEnd":554,"connectStart":554,"domainLookupEnd":554,"domainLookupStart":554,"fetchStart":554,"redirectEnd":0,"redirectStart":0,"requestStart":775,"responseEnd":1181.8999998569489,"responseStart":1160.3999998569489,"secureConnectionStart":554},{"duration":1820.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":596.8999998569489,"connectEnd":596.8999998569489,"connectStart":596.8999998569489,"domainLookupEnd":596.8999998569489,"domainLookupStart":596.8999998569489,"fetchStart":596.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":1474.0999999046326,"responseEnd":2417.2000000476837,"responseStart":2303.5,"secureConnectionStart":596.8999998569489},{"duration":1868.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":597.7999999523163,"connectEnd":597.7999999523163,"connectStart":597.7999999523163,"domainLookupEnd":597.7999999523163,"domainLookupStart":597.7999999523163,"fetchStart":597.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1868.5999999046326,"responseEnd":2466.2999999523163,"responseStart":2415.2000000476837,"secureConnectionStart":597.7999999523163},{"duration":594.8999998569489,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2105.2000000476837,"connectEnd":2105.2000000476837,"connectStart":2105.2000000476837,"domainLookupEnd":2105.2000000476837,"domainLookupStart":2105.2000000476837,"fetchStart":2105.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":2580.399999856949,"responseEnd":2700.0999999046326,"responseStart":2699.2999999523163,"secureConnectionStart":2105.2000000476837}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":346,"responseStart":521,"responseEnd":598,"domLoading":536,"domInteractive":3198,"domContentLoadedEventStart":3198,"domContentLoadedEventEnd":3251,"domComplete":4331,"loadEventStart":4331,"loadEventEnd":4336,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":3169},{"name":"bigPipe.sidebar-id.end","time":3169.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":3169.899999856949},{"name":"bigPipe.activity-panel-pipe-id.end","time":3182},{"name":"activityTabFullyLoaded","time":3262.2000000476837}],"measures":[],"correlationId":"637af0b88155a","effectiveType":"4g","downlink":9.4,"rtt":0,"serverDuration":98,"dbReadsTimeInMs":11,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
10.4 07a06022c4e63adc360b427 returns the correct result, but 10.5 e1825e39cae73f43f20ed7ae856f167b0ecf4598 -10.11 fails with the assertion