Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.1.26 , 5.5(EOL) , 10.0(EOL) , 10.1(EOL) , 10.2(EOL)
Invalid syntax in a partition-related ALTER TABLE statement can cause the server to crash. To reproduce, you can execute:
drop table if exists t;
CREATE TABLE `t` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`d` date NOT NULL,
PRIMARY KEY (`id`,`d`)
) ENGINE=InnoDB
/*!50500 PARTITION BY RANGE COLUMNS(d)
(PARTITION p20171016 VALUES LESS THAN ('2017-10-17') ENGINE = InnoDB,
PARTITION p20171017 VALUES LESS THAN ('2017-10-18') ENGINE = InnoDB,
PARTITION p99991231 VALUES LESS THAN (MAXVALUE) ENGINE = InnoDB) */;
alter table t reorganize partition p99991231 into (
partition p20171018 values less than ('2017-10-19'),
partition p20171126,
PARTITION p99991231 VALUES LESS THAN (MAXVALUE));
Notice that partition p20171126 is not valid in the above statement. The server should reject the statement. Instead, it leads to the following crash:
170912 19:41:23 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.
Server version: 10.1.26-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=1
max_threads=153
thread_count=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467133 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x7fb668a5a008
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 = 0x7fb6910950b0 thread_stack 0x48400
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x7fb69657952e]
/usr/sbin/mysqld(handle_fatal_signal+0x305)[0x7fb69609ced5]
/lib64/libpthread.so.0(+0xf5e0)[0x7fb6956ad5e0]
/usr/sbin/mysqld(_ZN14partition_info21check_range_constantsEP3THD+0xd3)[0x7fb695fd97a3]
/usr/sbin/mysqld(_ZN14partition_info20check_partition_infoEP3THDPP10handlertonP7handlerP14HA_CREATE_INFOb+0x6d1)[0x7fb695fda691]
/usr/sbin/mysqld(_Z21prep_alter_part_tableP3THDP5TABLEP10Alter_infoP14HA_CREATE_INFOP15Alter_table_ctxPbS9_+0xa65)[0x7fb6961d8805]
/usr/sbin/mysqld(_Z17mysql_alter_tableP3THDPcS1_P14HA_CREATE_INFOP10TABLE_LISTP10Alter_infojP8st_orderb+0x891)[0x7fb695fa3e71]
/usr/sbin/mysqld(_ZN19Sql_cmd_alter_table7executeEP3THD+0x60a)[0x7fb695fed6aa]
/usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x1327)[0x7fb695f12a17]
/usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x342)[0x7fb695f1ad52]
/usr/sbin/mysqld(+0x43d671)[0x7fb695f1b671]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x2111)[0x7fb695f1dfc1]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x136)[0x7fb695f1f016]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x18a)[0x7fb695fea9da]
/usr/sbin/mysqld(handle_one_connection+0x40)[0x7fb695feab80]
/lib64/libpthread.so.0(+0x7e25)[0x7fb6956a5e25]
/lib64/libc.so.6(clone+0x6d)[0x7fb693ac934d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7fb668b14020): alter table t reorganize partition p99991231 into ( partition p20171018 values less than ('2017-10-19'), partition p20171126, PARTITION p99991231 VALUES LESS THAN (MAXVALUE))
Connection ID (thread ID): 5
Status: NOT_KILLED
relates to
MDEV-22112
Assertion `tab_part_info->part_type == RANGE_PARTITION || tab_part_info->part_type == LIST_PARTITION' failed in prep_alter_part_table
Closed
{"report":{"fcp":1482.9000000953674,"ttfb":373.60000014305115,"pageVisibility":"visible","entityId":63114,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"29845af0-77b3-4f2f-a142-36b1385f6cbe","navigationType":0,"readyForUser":1571.5,"redirectCount":0,"resourceLoadedEnd":1273.4000000953674,"resourceLoadedStart":379.40000009536743,"resourceTiming":[{"duration":516.5999999046326,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":379.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":379.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":896,"responseStart":0,"secureConnectionStart":0},{"duration":517,"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":379.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":379.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":896.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":689.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":379.80000019073486,"connectEnd":379.80000019073486,"connectStart":379.80000019073486,"domainLookupEnd":379.80000019073486,"domainLookupStart":379.80000019073486,"fetchStart":379.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":901.1000001430511,"responseEnd":1068.9000000953674,"responseStart":925.7000000476837,"secureConnectionStart":379.80000019073486},{"duration":803.2999999523163,"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":380.10000014305115,"connectEnd":380.10000014305115,"connectStart":380.10000014305115,"domainLookupEnd":380.10000014305115,"domainLookupStart":380.10000014305115,"fetchStart":380.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":901.3000001907349,"responseEnd":1183.4000000953674,"responseStart":926.8000001907349,"secureConnectionStart":380.10000014305115},{"duration":550.2000000476837,"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":380.2000000476837,"connectEnd":380.2000000476837,"connectStart":380.2000000476837,"domainLookupEnd":380.2000000476837,"domainLookupStart":380.2000000476837,"fetchStart":380.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":901.6000001430511,"responseEnd":930.4000000953674,"responseStart":928.2000000476837,"secureConnectionStart":380.2000000476837},{"duration":550.2999999523163,"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":380.40000009536743,"connectEnd":380.40000009536743,"connectStart":380.40000009536743,"domainLookupEnd":380.40000009536743,"domainLookupStart":380.40000009536743,"fetchStart":380.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":901.9000000953674,"responseEnd":930.7000000476837,"responseStart":928.9000000953674,"secureConnectionStart":380.40000009536743},{"duration":552.1000001430511,"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":380.7000000476837,"connectEnd":380.7000000476837,"connectStart":380.7000000476837,"domainLookupEnd":380.7000000476837,"domainLookupStart":380.7000000476837,"fetchStart":380.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":902.6000001430511,"responseEnd":932.8000001907349,"responseStart":931.5,"secureConnectionStart":380.7000000476837},{"duration":521,"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":380.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":380.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":901.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":605.1000001430511,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":381,"connectEnd":381,"connectStart":381,"domainLookupEnd":381,"domainLookupStart":381,"fetchStart":381,"redirectEnd":0,"redirectStart":0,"requestStart":903.8000001907349,"responseEnd":986.1000001430511,"responseStart":984.7000000476837,"secureConnectionStart":381},{"duration":521.3999998569489,"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":381.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":381.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":902.7000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":553.2999999523163,"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":381.40000009536743,"connectEnd":381.40000009536743,"connectStart":381.40000009536743,"domainLookupEnd":381.40000009536743,"domainLookupStart":381.40000009536743,"fetchStart":381.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":906.8000001907349,"responseEnd":934.7000000476837,"responseStart":933.6000001430511,"secureConnectionStart":381.40000009536743},{"duration":728.6000001430511,"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":386.7000000476837,"connectEnd":386.7000000476837,"connectStart":386.7000000476837,"domainLookupEnd":386.7000000476837,"domainLookupStart":386.7000000476837,"fetchStart":386.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1045.3000001907349,"responseEnd":1115.3000001907349,"responseStart":1111.9000000953674,"secureConnectionStart":386.7000000476837},{"duration":886.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":386.90000009536743,"connectEnd":386.90000009536743,"connectStart":386.90000009536743,"domainLookupEnd":386.90000009536743,"domainLookupStart":386.90000009536743,"fetchStart":386.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":1262.2000000476837,"responseEnd":1273.4000000953674,"responseStart":1272.6000001430511,"secureConnectionStart":386.90000009536743},{"duration":210.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1202.8000001907349,"connectEnd":1202.8000001907349,"connectStart":1202.8000001907349,"domainLookupEnd":1202.8000001907349,"domainLookupStart":1202.8000001907349,"fetchStart":1202.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1379.5,"responseEnd":1413.3000001907349,"responseStart":1412.4000000953674,"secureConnectionStart":1202.8000001907349}],"fetchStart":0,"domainLookupStart":166,"domainLookupEnd":167,"connectStart":167,"connectEnd":186,"secureConnectionStart":175,"requestStart":186,"responseStart":374,"responseEnd":379,"domLoading":377,"domInteractive":1674,"domContentLoadedEventStart":1675,"domContentLoadedEventEnd":1736,"domComplete":3021,"loadEventStart":3021,"loadEventEnd":3022,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1652.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1653},{"name":"bigPipe.activity-panel-pipe-id.start","time":1653.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1655.6000001430511},{"name":"activityTabFullyLoaded","time":1744.2000000476837}],"measures":[],"correlationId":"f906169ea2f6a5","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":120,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}