This query consistently causes MariaDB 10.4.15 and 10.5.6 to crash:
SELECT * FROM (
|
SELECT provider.guid, provider.roa_id, provider.policy_guid, provider.filter_guid, provider.contact_user_id, provider.contact_roa_id, provider.name, provider.descr,
|
provider.type, provider.origin_guid, provider.reference_filter_guid, provider.rca_mode, provider.search_additional_orgs, provider.apps_in_biz, provider.edited_by,
|
UNIX_TIMESTAMP(create_date) as create_date, UNIX_TIMESTAMP(edit_date) AS edit_date, GROUP_CONCAT(master_ap2.har_provider_org.roa_id) AS additional_organizations,
|
bss.d_health as health, bss.d_available as availability, bss.d_risk as risk, UNIX_TIMESTAMP(bss.collection_time) as collectionTime
|
FROM master_ap2.har_provider provider
|
LEFT JOIN master_ap2.har_provider_org ON provider.guid = master_ap2.har_provider_org.provider_guid
|
LEFT JOIN master_biz.biz_service_state bss ON provider.guid = bss.service_id
|
GROUP BY provider.guid ) provider
|
WHERE (
|
provider.roa_id IN (7)
|
OR
|
(SELECT 1
|
from har_provider_org
|
WHERE provider.guid = har_provider_org.provider_guid
|
AND har_provider_org.roa_id IN (7)
|
) )
|
AND (
|
(guid = 'ckgbm10gb009no74dzys39ce8')
|
AND descr = 'fe0c79969b89eb69c32aee361e5bef9e'
|
AND type = 1)
|
ORDER BY `guid` ASC LIMIT 1;
|
Minimal configuration as generated by dbdeployer:
[mysqld]
|
user = sami
|
port = 10415
|
socket = /tmp/mysql_sandbox10415.sock
|
basedir = /home/sami/opt/mysql/10.4.15
|
datadir = /home/sami/sandboxes/msb_10_4_15/data
|
tmpdir = /home/sami/sandboxes/msb_10_4_15/tmp
|
pid-file = /home/sami/sandboxes/msb_10_4_15/data/mysql_sandbox10415.pid
|
bind-address = 127.0.0.1
|
report-host=single-10415
|
report-port=10415
|
log-error=/home/sami/sandboxes/msb_10_4_15/data/msandbox.err
|
Steps to repeat: import attached dump of three tables, one empty and two have a single row, then execute above query in the master_ap2 schema. Error log shows:
Thread pointer: 0x55ee82e961c8
|
Attempting backtrace. You can use the following information to find out
|
where mysqld died. If you see no messages after this, something went
|
terribly wrong...
|
stack_bottom = 0x7f5112fb4e70 thread_stack 0x49000
|
/home/sami/opt/mysql/10.4.15/bin/mysqld(my_print_stacktrace+0x2e)[0x55ee7f4300be]
|
/home/sami/opt/mysql/10.4.15/bin/mysqld(handle_fatal_signal+0x30f)[0x55ee7ee40b1f]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f51383e4390]
|
/home/sami/opt/mysql/10.4.15/bin/mysqld(_ZN10Item_equal7val_intEv+0x91)[0x55ee7ee79231]
|
sql/item_cmpfunc.cc:7026(Item_equal::val_int())[0x55ee7ed70110]
|
sql/sql_type.cc:4446(Type_handler_int_result::Item_val_bool(Item*) const)[0x55ee7ee76e7a]
|
sql/item_cmpfunc.cc:5297(Item_cond_and::val_int())[0x55ee7ec86350]
|
sql/sql_select.cc:21748(end_send_group(JOIN*, st_join_table*, bool))[0x55ee7ec9329e]
|
sql/sql_select.cc:19957(do_select)[0x55ee7ec935d3]
|
sql/sql_select.cc:4256(JOIN::exec())[0x55ee7ec91826]
|
sql/sql_select.cc:4689(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55ee7ebf90d3]
|
sql/sql_derived.cc:1266(mysql_derived_fill(THD*, LEX*, TABLE_LIST*))[0x55ee7ebf8c74]
|
sql/sql_derived.cc:206(mysql_handle_single_derived(LEX*, TABLE_LIST*, unsigned int))[0x55ee7ec6f6a9]
|
sql/sql_select.cc:13539(st_join_table::preread_init())[0x55ee7ec6f8e8]
|
sql/sql_select.cc:20383(sub_select(JOIN*, st_join_table*, bool))[0x55ee7ec933a3]
|
sql/sql_select.cc:19956(do_select)[0x55ee7ec935d3]
|
sql/sql_select.cc:4256(JOIN::exec())[0x55ee7ec91826]
|
sql/sql_select.cc:4689(mysql_select(THD*, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55ee7ec92387]
|
sql/sql_select.cc:422(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55ee7eb277df]
|
sql/sql_parse.cc:6356(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55ee7ec367fa]
|
sql/sql_parse.cc:3889(mysql_execute_command(THD*))[0x55ee7ec3c11c]
|
sql/sql_parse.cc:7896(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55ee7ec3e6ae]
|
sql/sql_audit.h:169(mysql_audit_general)[0x55ee7ec3fe89]
|
sql/sql_parse.cc:1353(do_command(THD*))[0x55ee7ed1ef9a]
|
sql/sql_connect.cc:1412(do_handle_one_connection(CONNECT*))[0x55ee7ed1f07d]
|
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f51383da6ba]
|
x86_64/clone.S:111(clone)[0x7f513723f41d]
|
|
Trying to get some variables.
|
Some pointers may be invalid and cause the dump to abort.
|
Query (0x55ee82ea4500): SELECT * FROM ( SELECT provider.guid, provider.roa_id, provider.policy_guid, provider.filter_guid, provider.contact_user_id, provider.contact_roa_id, provider.name, provider.descr, provider.type, provider.origin_guid, provider.reference_filter_guid, provider.rca_mode, provider.search_additional_orgs, provider.apps_in_biz, provider.edited_by, UNIX_TIMESTAMP(create_date) as create_date, UNIX_TIMESTAMP(edit_date) AS edit_date, GROUP_CONCAT(master_ap2.har_provider_org.roa_id) AS additional_organizations, bss.d_health as health, bss.d_available as availability, bss.d_risk as risk, UNIX_TIMESTAMP(bss.collection_time) as collectionTime FROM master_ap2.har_provider provider LEFT JOIN master_ap2.har_provider_org ON provider.guid = master_ap2.har_provider_org.provider_guid LEFT JOIN master_biz.biz_service_state bss ON provider.guid = bss.service_id GROUP BY provider.guid ) provider WHERE ( provider.roa_id IN (7) OR (SELECT 1 from har_provider_org WHERE provider.guid = har_provider_org.provider_guid AND har_provider_org.roa_id IN (7) ) ) AND ( (guid = 'ckgbm10gb009no74dzys39ce8') AND descr = 'fe0c79969b89eb69c32aee361e5bef9e' AND type = 1) ORDER BY `guid` ASC LIMIT 1
|
Connection ID (thread ID): 8
|
Status: NOT_KILLED
|
|
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on
|
|
- relates to
-
MDEV-28618
Server crash in /sql/item_cmpfunc.cc:6847 in Item_equal::val_int()
-
-
Closed
{"report":{"fcp":1002.7999999523163,"ttfb":332.2999999523163,"pageVisibility":"visible","entityId":92860,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"e0970dc8-022a-4172-8d4c-7e769888b0e0","navigationType":0,"readyForUser":1108.5,"redirectCount":0,"resourceLoadedEnd":1518.5999999046326,"resourceLoadedStart":339.09999990463257,"resourceTiming":[{"duration":146.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":339.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":339.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":486,"responseStart":0,"secureConnectionStart":0},{"duration":147.09999990463257,"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":339.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":339.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":486.39999985694885,"responseStart":0,"secureConnectionStart":0},{"duration":198.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":339.5,"connectEnd":339.5,"connectStart":339.5,"domainLookupEnd":339.5,"domainLookupStart":339.5,"fetchStart":339.5,"redirectEnd":0,"redirectStart":0,"requestStart":339.5,"responseEnd":538.3999998569489,"responseStart":538.3999998569489,"secureConnectionStart":339.5},{"duration":249.69999980926514,"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":339.7000000476837,"connectEnd":339.7000000476837,"connectStart":339.7000000476837,"domainLookupEnd":339.7000000476837,"domainLookupStart":339.7000000476837,"fetchStart":339.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":339.7000000476837,"responseEnd":589.3999998569489,"responseStart":589.3999998569489,"secureConnectionStart":339.7000000476837},{"duration":253.80000019073486,"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":339.89999985694885,"connectEnd":339.89999985694885,"connectStart":339.89999985694885,"domainLookupEnd":339.89999985694885,"domainLookupStart":339.89999985694885,"fetchStart":339.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":339.89999985694885,"responseEnd":593.7000000476837,"responseStart":593.7000000476837,"secureConnectionStart":339.89999985694885},{"duration":254.5,"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":340.09999990463257,"connectEnd":340.09999990463257,"connectStart":340.09999990463257,"domainLookupEnd":340.09999990463257,"domainLookupStart":340.09999990463257,"fetchStart":340.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":340.09999990463257,"responseEnd":594.5999999046326,"responseStart":594.5999999046326,"secureConnectionStart":340.09999990463257},{"duration":255.29999995231628,"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":340.2999999523163,"connectEnd":340.2999999523163,"connectStart":340.2999999523163,"domainLookupEnd":340.2999999523163,"domainLookupStart":340.2999999523163,"fetchStart":340.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":340.2999999523163,"responseEnd":595.5999999046326,"responseStart":595.5999999046326,"secureConnectionStart":340.2999999523163},{"duration":340.89999985694885,"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":340.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":340.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":681.3999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":256.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":340.59999990463257,"connectEnd":340.59999990463257,"connectStart":340.59999990463257,"domainLookupEnd":340.59999990463257,"domainLookupStart":340.59999990463257,"fetchStart":340.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":340.59999990463257,"responseEnd":596.7000000476837,"responseStart":596.7000000476837,"secureConnectionStart":340.59999990463257},{"duration":340.7999999523163,"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":340.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":340.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":681.5,"responseStart":0,"secureConnectionStart":0},{"duration":257.2000000476837,"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":340.89999985694885,"connectEnd":340.89999985694885,"connectStart":340.89999985694885,"domainLookupEnd":340.89999985694885,"domainLookupStart":340.89999985694885,"fetchStart":340.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":340.89999985694885,"responseEnd":598.0999999046326,"responseStart":598.0999999046326,"secureConnectionStart":340.89999985694885},{"duration":1166.1000001430511,"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":347.09999990463257,"connectEnd":347.09999990463257,"connectStart":347.09999990463257,"domainLookupEnd":347.09999990463257,"domainLookupStart":347.09999990463257,"fetchStart":347.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":347.09999990463257,"responseEnd":1513.2000000476837,"responseStart":1513.2000000476837,"secureConnectionStart":347.09999990463257},{"duration":1168.1000001430511,"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":347.59999990463257,"connectEnd":347.59999990463257,"connectStart":347.59999990463257,"domainLookupEnd":347.59999990463257,"domainLookupStart":347.59999990463257,"fetchStart":347.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":347.59999990463257,"responseEnd":1515.7000000476837,"responseStart":1515.7000000476837,"secureConnectionStart":347.59999990463257},{"duration":170,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":693.5,"connectEnd":693.5,"connectStart":693.5,"domainLookupEnd":693.5,"domainLookupStart":693.5,"fetchStart":693.5,"redirectEnd":0,"redirectStart":0,"requestStart":693.5,"responseEnd":863.5,"responseStart":863.5,"secureConnectionStart":693.5},{"duration":561.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-jira.view.issue,-jira.navigator.kickass,-viewissue.standalone,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":956.8999998569489,"connectEnd":956.8999998569489,"connectStart":956.8999998569489,"domainLookupEnd":956.8999998569489,"domainLookupStart":956.8999998569489,"fetchStart":956.8999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":956.8999998569489,"responseEnd":1518.5999999046326,"responseStart":1518.5999999046326,"secureConnectionStart":956.8999998569489},{"duration":545.2999999523163,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":995.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":995.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1540.3999998569489,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":138,"responseStart":333,"responseEnd":346,"domLoading":336,"domInteractive":1548,"domContentLoadedEventStart":1548,"domContentLoadedEventEnd":1600,"domComplete":2041,"loadEventStart":2041,"loadEventEnd":2041,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1519},{"name":"bigPipe.sidebar-id.end","time":1519.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1519.8999998569489},{"name":"bigPipe.activity-panel-pipe-id.end","time":1523},{"name":"activityTabFullyLoaded","time":1622}],"measures":[],"correlationId":"7d16d2738789f4","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":120,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
For the release notes:
A query could cause a crash if it has a HAVING clause with a
construct tblX.column=column_or_constant and the optimizer was
able to infer that table tblX is a constant table.
Note that HAVING clause may be from the original query or
may come from Condition Pushdown optimization (https://mariadb.com/kb/en/condition-pushdown-into-derived-table-optimization/)