Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
11.3.0 , 10.4(EOL) , 10.5 , 10.6 , 10.9(EOL) , 10.10(EOL) , 10.11 , 11.0(EOL) , 11.1(EOL)
Environment:
Ubuntu Desktop 20.04 LTS
Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
The latest version of MariDB Server: Git commit hash: `e987b9350cb83038c73` crashes when executing the following query:
drop database if exists test;
create database test;
use test;
CREATE TABLE IF NOT EXISTS v0 ( c1 SET ( 'abc' ) BINARY UNICODE ) PARTITION BY LINEAR HASH ( c1 MOD c1 ) PARTITIONS 0x100 ;
ALTER TABLE v0 CHECK PARTITION ALL FOR UPGRADE ;
ALTER TABLE v0 LOCK SHARED , ORDER BY v0 ;
Here is a crashing stack trace:
(gdb) bt
#0 0x0000aaaada90e030 in ha_partition::create_handlers (mem_root=0xffff8412ceb0, this=0xffff280caa90) at /home/mysql/mariadb/sql/ha_partition.cc:3034
#1 ha_partition::create_handlers (this=0xffff280caa90, mem_root=0xffff8412ceb0) at /home/mysql/mariadb/sql/ha_partition.cc:3015
#2 0x0000aaaada90e2b0 in ha_partition::setup_engine_array (this=0xffff280caa90, mem_root=0xffff8412ceb0, first_engine=0xaaaae03f49c8)
at /home/mysql/mariadb/sql/ha_partition.cc:3271
#3 0x0000aaaada90f310 in ha_partition::initialize_partition (this=0xffff280caa90, mem_root=<optimized out>) at /home/mysql/mariadb/sql/ha_partition.cc:569
#4 0x0000aaaada9108fc in partition_create_handler (hton=0xaaaae03e1108, share=0xffff8412ce28, mem_root=0xffff8412ceb0) at /home/mysql/mariadb/sql/ha_partition.cc:264
#5 0x0000aaaada7220d0 in get_new_handler (share=share@entry=0xffff8412ce28, alloc=0xffff8412ceb0, db_type=<optimized out>) at /home/mysql/mariadb/sql/handler.cc:384
#6 0x0000aaaada5cc184 in TABLE_SHARE::init_from_binary_frm_image (this=this@entry=0xffff8412ce28, thd=thd@entry=0xffff28000c68, write=<optimized out>,
frm_image=<optimized out>, frm_length=<optimized out>, par_image=par_image@entry=0x0, par_length=par_length@entry=0) at /home/mysql/mariadb/sql/handler.h:1717
#7 0x0000aaaada72a780 in ha_create_table (thd=thd@entry=0xffff28000c68, path=path@entry=0xffff8412fa47 "./test/#sql-alter-5c73-3", db=0xffff28012b48 "test",
table_name=0xffff28012400 "v0", create_info=0xffff8412fde0, create_info@entry=0xffff8412fb90, frm=frm@entry=0xffff8412d4e8, skip_frm_file=false,
skip_frm_file@entry=64) at /home/mysql/mariadb/sql/handler.cc:6122
#8 0x0000aaaada5a732c in mysql_alter_table (thd=thd@entry=0xffff28000c68, new_db=new_db@entry=0xffff280058b8, new_name=new_name@entry=0xffff28005d08,
create_info=0xffff8412fb90, create_info@entry=0xffff8412fde0, table_list=<optimized out>, table_list@entry=0xffff28012438, recreate_info=0xffff00000000,
recreate_info@entry=0xffff8412fce0, alter_info=alter_info@entry=0xffff8412fcf8, order_num=2215836944, order=<optimized out>, ignore=<optimized out>,
if_exists=<optimized out>) at /home/mysql/mariadb/sql/sql_alter.h:298
#9 0x0000aaaada603c94 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0xffff28000c68) at /home/mysql/mariadb/sql/structs.h:568
#10 0x0000aaaada507028 in mysql_execute_command (thd=thd@entry=0xffff28000c68, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false)
at /home/mysql/mariadb/sql/sql_parse.cc:5733
#11 0x0000aaaada4f9760 in mysql_parse (thd=thd@entry=0xffff28000c68, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>)
at /home/mysql/mariadb/sql/sql_parse.cc:7760
#12 0x0000aaaada50382c in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0xffff28000c68,
packet=packet@entry=0xffff280087b9 "ALTER TABLE v0 LOCK SHARED , ORDER BY v0", packet_length=packet_length@entry=40, blocking=blocking@entry=true)
at /home/mysql/mariadb/sql/sql_class.h:1489
#13 0x0000aaaada505488 in do_command (thd=0xffff28000c68, blocking=blocking@entry=true) at /home/mysql/mariadb/sql/sql_parse.cc:1406
#14 0x0000aaaada5ff814 in do_handle_one_connection (connect=<optimized out>, put_in_cache=put_in_cache@entry=true) at /home/mysql/mariadb/sql/sql_connect.cc:1445
#15 0x0000aaaada5ffbf0 in handle_one_connection (arg=arg@entry=0xaaaae0a66aa8) at /home/mysql/mariadb/sql/sql_connect.cc:1347
#16 0x0000aaaada917698 in pfs_spawn_thread (arg=<optimized out>) at /home/mysql/mariadb/storage/perfschema/pfs.cc:2201
#17 0x0000ffff9ac3d624 in start_thread (arg=0xaaaada9175f8 <pfs_spawn_thread(void*)>) at pthread_create.c:477
#18 0x0000ffff9a8cc49c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:78
```
Some other useful information:
```
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,not_null_range_scan=off,hash_join_cardinality=on,sargable_casefold=on
The bug could corrupt the database, causing future MariaDB access to the same database to also crash. Therefore, I label the bug as `Critical`.
relates to
MDEV-31417
ASAN errors in ha_partition::create_handlers upon upgrading from MySQL 5.7 with partitioned tables
Closed
{"report":{"fcp":1718.3000001907349,"ttfb":191.39999961853027,"pageVisibility":"visible","entityId":125011,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"280c418e-ed92-47fb-9830-2424db2b7152","navigationType":0,"readyForUser":1816.5,"redirectCount":0,"resourceLoadedEnd":1877.0999994277954,"resourceLoadedStart":291.5999994277954,"resourceTiming":[{"duration":144,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":291.5999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":291.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":435.5999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":450.30000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":291.8999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":291.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":742.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":510.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":292.0999994277954,"connectEnd":292.0999994277954,"connectStart":292.0999994277954,"domainLookupEnd":292.0999994277954,"domainLookupStart":292.0999994277954,"fetchStart":292.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":292.0999994277954,"responseEnd":802.5999994277954,"responseStart":802.5999994277954,"secureConnectionStart":292.0999994277954},{"duration":777.7999992370605,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/2bf333562ca6724060a9d5f1535471f6/_/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":292.30000019073486,"connectEnd":292.30000019073486,"connectStart":292.30000019073486,"domainLookupEnd":292.30000019073486,"domainLookupStart":292.30000019073486,"fetchStart":292.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":292.30000019073486,"responseEnd":1070.0999994277954,"responseStart":1070.0999994277954,"secureConnectionStart":292.30000019073486},{"duration":782.8999996185303,"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":292.5,"connectEnd":292.5,"connectStart":292.5,"domainLookupEnd":292.5,"domainLookupStart":292.5,"fetchStart":292.5,"redirectEnd":0,"redirectStart":0,"requestStart":292.5,"responseEnd":1075.3999996185303,"responseStart":1075.3999996185303,"secureConnectionStart":292.5},{"duration":810.6000003814697,"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":292.69999980926514,"connectEnd":292.69999980926514,"connectStart":292.69999980926514,"domainLookupEnd":292.69999980926514,"domainLookupStart":292.69999980926514,"fetchStart":292.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":292.69999980926514,"responseEnd":1103.3000001907349,"responseStart":1103.3000001907349,"secureConnectionStart":292.69999980926514},{"duration":819.3000001907349,"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":292.8999996185303,"connectEnd":292.8999996185303,"connectStart":292.8999996185303,"domainLookupEnd":292.8999996185303,"domainLookupStart":292.8999996185303,"fetchStart":292.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":292.8999996185303,"responseEnd":1112.1999998092651,"responseStart":1112.1999998092651,"secureConnectionStart":292.8999996185303},{"duration":819.9000005722046,"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":293.0999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":293.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1113,"responseStart":0,"secureConnectionStart":0},{"duration":819.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":293.30000019073486,"connectEnd":293.30000019073486,"connectStart":293.30000019073486,"domainLookupEnd":293.30000019073486,"domainLookupStart":293.30000019073486,"fetchStart":293.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":293.30000019073486,"responseEnd":1112.6999998092651,"responseStart":1112.6999998092651,"secureConnectionStart":293.30000019073486},{"duration":820.4000005722046,"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":293.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":293.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1113.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":819.7000007629395,"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":293.5999994277954,"connectEnd":293.5999994277954,"connectStart":293.5999994277954,"domainLookupEnd":293.5999994277954,"domainLookupStart":293.5999994277954,"fetchStart":293.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":293.5999994277954,"responseEnd":1113.3000001907349,"responseStart":1113.3000001907349,"secureConnectionStart":293.5999994277954},{"duration":1023.6999998092651,"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":294.5,"connectEnd":294.5,"connectStart":294.5,"domainLookupEnd":294.5,"domainLookupStart":294.5,"fetchStart":294.5,"redirectEnd":0,"redirectStart":0,"requestStart":294.5,"responseEnd":1318.1999998092651,"responseStart":1318.1999998092651,"secureConnectionStart":294.5},{"duration":1453,"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":294.5,"connectEnd":294.5,"connectStart":294.5,"domainLookupEnd":294.5,"domainLookupStart":294.5,"fetchStart":294.5,"redirectEnd":0,"redirectStart":0,"requestStart":294.5,"responseEnd":1747.5,"responseStart":1747.5,"secureConnectionStart":294.5},{"duration":324.70000076293945,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":989.5999994277954,"connectEnd":989.5999994277954,"connectStart":989.5999994277954,"domainLookupEnd":989.5999994277954,"domainLookupStart":989.5999994277954,"fetchStart":989.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":989.5999994277954,"responseEnd":1314.3000001907349,"responseStart":1314.3000001907349,"secureConnectionStart":989.5999994277954},{"duration":315.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/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":1561.3999996185303,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1561.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1877.0999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":235.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/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":1562.5,"connectEnd":1562.5,"connectStart":1562.5,"domainLookupEnd":1562.5,"domainLookupStart":1562.5,"fetchStart":1562.5,"redirectEnd":0,"redirectStart":0,"requestStart":1562.5,"responseEnd":1798,"responseStart":1798,"secureConnectionStart":1562.5},{"duration":240,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/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":1562.8999996185303,"connectEnd":1562.8999996185303,"connectStart":1562.8999996185303,"domainLookupEnd":1562.8999996185303,"domainLookupStart":1562.8999996185303,"fetchStart":1562.8999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":1562.8999996185303,"responseEnd":1802.8999996185303,"responseStart":1802.8999996185303,"secureConnectionStart":1562.8999996185303},{"duration":185.69999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1701.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1701.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1887,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":9,"responseStart":191,"responseEnd":229,"domLoading":241,"domInteractive":1913,"domContentLoadedEventStart":1913,"domContentLoadedEventEnd":1969,"domComplete":2619,"loadEventStart":2619,"loadEventEnd":2621,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1894.8000001907349},{"name":"bigPipe.sidebar-id.end","time":1895.5999994277954},{"name":"bigPipe.activity-panel-pipe-id.start","time":1895.8000001907349},{"name":"bigPipe.activity-panel-pipe-id.end","time":1898.3000001907349},{"name":"activityTabFullyLoaded","time":1986.3999996185303}],"measures":[],"correlationId":"760c1cca414aef","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":109,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}