Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.3(EOL) , 10.4(EOL) , 10.5 , 10.6 , 10.7(EOL) , 10.8(EOL) , 10.9(EOL) , 10.10(EOL)
CREATE TABLE t0(a INT KEY ,b TEXT,FTS_DOC_ID BIGINT UNSIGNED NOT NULL , KEY FTS_DOC_ID_INDEX(FTS_DOC_ID));
ALTER TABLE t0 ADD COLUMN d TEXT GENERATED ALWAYS AS (SUBSTR(b,0,0)) FIRST ;
ALTER TABLE t0 ADD c0 BLOB NULL ;
Leads to:
10.9.2 6ec17142dcfb1e9d9f41211ed1b6d82e062d1541 (Debug)
mysqld: /test/10.9_dbg/storage/innobase/handler/handler0alter.cc:6720: bool prepare_inplace_alter_table_dict(Alter_inplace_info*, const TABLE*, const TABLE*, const char*, ulint, ulint, ulint, bool, bool): Assertion `ha_alter_info->key_count + (dict_table_get_first_index(ctx->new_table))->is_gen_clust() + (ctx->old_table->fts_doc_id_index && innobase_fts_check_doc_id_index_in_def( altered_table->s->keys, altered_table->key_info) != FTS_EXIST_DOC_ID_INDEX) == ctx->num_to_add_index' failed.
10.9.2 6ec17142dcfb1e9d9f41211ed1b6d82e062d1541 (Debug)
Core was generated by `/test/MD280522-mariadb-10.9.2-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
[Current thread is 1 (Thread 0x150df096e700 (LWP 277982))]
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x0000150e0930e859 in __GI_abort () at abort.c:79
#2 0x0000150e0930e729 in __assert_fail_base (fmt=0x150e094a4588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5579c7fe04c0 "ha_alter_info->key_count + (dict_table_get_first_index(ctx->new_table))->is_gen_clust() + (ctx->old_table->fts_doc_id_index && innobase_fts_check_doc_id_index_in_def( altered_table->s->keys, altered_t"..., file=0x5579c7fdd9f0 "/test/10.9_dbg/storage/innobase/handler/handler0alter.cc", line=6720, function=<optimized out>) at assert.c:92
#3 0x0000150e0931ff36 in __GI___assert_fail (assertion=assertion@entry=0x5579c7fe04c0 "ha_alter_info->key_count + (dict_table_get_first_index(ctx->new_table))->is_gen_clust() + (ctx->old_table->fts_doc_id_index && innobase_fts_check_doc_id_index_in_def( altered_table->s->keys, altered_t"..., file=file@entry=0x5579c7fdd9f0 "/test/10.9_dbg/storage/innobase/handler/handler0alter.cc", line=line@entry=6720, function=function@entry=0x5579c7fdf568 "bool prepare_inplace_alter_table_dict(Alter_inplace_info*, const TABLE*, const TABLE*, const char*, ulint, ulint, ulint, bool, bool)") at assert.c:101
#4 0x00005579c77f20d9 in prepare_inplace_alter_table_dict (ha_alter_info=ha_alter_info@entry=0x150df0969ff0, altered_table=altered_table@entry=0x150df096a0b0, old_table=<optimized out>, table_name=<optimized out>, flags=<optimized out>, flags2=<optimized out>, fts_doc_id_col=<optimized out>, add_fts_doc_id=<optimized out>, add_fts_doc_id_idx=<optimized out>) at /test/10.9_dbg/storage/innobase/include/dict0mem.h:1164
#5 0x00005579c77f95f0 in ha_innobase::prepare_inplace_alter_table (this=<optimized out>, altered_table=<optimized out>, ha_alter_info=<optimized out>) at /test/10.9_dbg/storage/innobase/handler/ha_innodb.h:700
#6 0x00005579c74add83 in handler::ha_prepare_inplace_alter_table (this=0x150dbc038b60, altered_table=altered_table@entry=0x150df096a0b0, ha_alter_info=ha_alter_info@entry=0x150df0969ff0) at /test/10.9_dbg/sql/handler.cc:5200
#7 0x00005579c728f499 in mysql_inplace_alter_table (thd=thd@entry=0x150dbc000db8, table_list=0x150dbc013d00, table=table@entry=0x150dbc01e238, altered_table=altered_table@entry=0x150df096a0b0, ha_alter_info=ha_alter_info@entry=0x150df0969ff0, target_mdl_request=target_mdl_request@entry=0x150df096a880, ddl_log_state=0x150df0969f80, trigger_param=0x150df096a470, alter_ctx=0x150df096b730, partial_alter=@0x150df0969eef: false, start_alter_id=@0x150df0969ef8: 0, if_exists=false) at /test/10.9_dbg/sql/sql_table.cc:7614
#8 0x00005579c72a27df in mysql_alter_table (thd=thd@entry=0x150dbc000db8, new_db=new_db@entry=0x150dbc005878, new_name=new_name@entry=0x150dbc005c88, create_info=create_info@entry=0x150df096c540, table_list=<optimized out>, table_list@entry=0x150dbc013d00, alter_info=alter_info@entry=0x150df096c450, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /test/10.9_dbg/sql/sql_table.cc:10706
#9 0x00005579c7328130 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x150dbc000db8) at /test/10.9_dbg/sql/structs.h:569
#10 0x00005579c71c956c in mysql_execute_command (thd=thd@entry=0x150dbc000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:5996
#11 0x00005579c71b1bca in mysql_parse (thd=thd@entry=0x150dbc000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x150df096d470) at /test/10.9_dbg/sql/sql_parse.cc:8036
#12 0x00005579c71bf198 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x150dbc000db8, packet=packet@entry=0x150dbc00b6c9 "ALTER TABLE t0 ADD c0 BLOB NULL", packet_length=packet_length@entry=31, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1364
#13 0x00005579c71c18a0 in do_command (thd=0x150dbc000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1407
#14 0x00005579c7320d88 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5579ca4243a8, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
#15 0x00005579c7321291 in handle_one_connection (arg=0x5579ca4243a8) at /test/10.9_dbg/sql/sql_connect.cc:1312
#16 0x0000150e0981d609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#17 0x0000150e0940b293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Bug confirmed present in:
MariaDB: 10.3.36 (dbg), 10.4.26 (dbg), 10.5.17 (dbg), 10.6.9 (dbg), 10.7.5 (dbg), 10.8.4 (dbg), 10.9.2 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.2.44 (dbg), 10.2.44 (opt), 10.3.35 (opt), 10.4.25 (opt), 10.5.16 (opt), 10.6.8 (opt), 10.7.4 (opt), 10.8.3 (opt)
{"report":{"fcp":1080.6999998092651,"ttfb":349.6000003814697,"pageVisibility":"visible","entityId":112085,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"23afc4f5-fb9a-4274-805f-4c08ff7565b5","navigationType":0,"readyForUser":1166,"redirectCount":0,"resourceLoadedEnd":1000.5,"resourceLoadedStart":354.6000003814697,"resourceTiming":[{"duration":215.39999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":354.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":354.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":570,"responseStart":0,"secureConnectionStart":0},{"duration":215.29999923706055,"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":354.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":354.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":570.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":224.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":355,"connectEnd":355,"connectStart":355,"domainLookupEnd":355,"domainLookupStart":355,"fetchStart":355,"redirectEnd":0,"redirectStart":0,"requestStart":355,"responseEnd":579.6999998092651,"responseStart":579.6999998092651,"secureConnectionStart":355},{"duration":286.80000019073486,"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":355.19999980926514,"connectEnd":355.19999980926514,"connectStart":355.19999980926514,"domainLookupEnd":355.19999980926514,"domainLookupStart":355.19999980926514,"fetchStart":355.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":355.19999980926514,"responseEnd":642,"responseStart":642,"secureConnectionStart":355.19999980926514},{"duration":290.19999980926514,"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":355.4000005722046,"connectEnd":355.4000005722046,"connectStart":355.4000005722046,"domainLookupEnd":355.4000005722046,"domainLookupStart":355.4000005722046,"fetchStart":355.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":355.4000005722046,"responseEnd":645.6000003814697,"responseStart":645.6000003814697,"secureConnectionStart":355.4000005722046},{"duration":290.69999980926514,"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":355.6000003814697,"connectEnd":355.6000003814697,"connectStart":355.6000003814697,"domainLookupEnd":355.6000003814697,"domainLookupStart":355.6000003814697,"fetchStart":355.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":355.6000003814697,"responseEnd":646.3000001907349,"responseStart":646.3000001907349,"secureConnectionStart":355.6000003814697},{"duration":290.80000019073486,"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":355.80000019073486,"connectEnd":355.80000019073486,"connectStart":355.80000019073486,"domainLookupEnd":355.80000019073486,"domainLookupStart":355.80000019073486,"fetchStart":355.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":355.80000019073486,"responseEnd":646.6000003814697,"responseStart":646.6000003814697,"secureConnectionStart":355.80000019073486},{"duration":367.0999994277954,"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":355.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":355.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":723,"responseStart":0,"secureConnectionStart":0},{"duration":291,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":356.1000003814697,"connectEnd":356.1000003814697,"connectStart":356.1000003814697,"domainLookupEnd":356.1000003814697,"domainLookupStart":356.1000003814697,"fetchStart":356.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":356.1000003814697,"responseEnd":647.1000003814697,"responseStart":647.1000003814697,"secureConnectionStart":356.1000003814697},{"duration":366.69999980926514,"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":356.4000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":356.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":723.1000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":291.19999980926514,"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":356.5,"connectEnd":356.5,"connectStart":356.5,"domainLookupEnd":356.5,"domainLookupStart":356.5,"fetchStart":356.5,"redirectEnd":0,"redirectStart":0,"requestStart":356.5,"responseEnd":647.6999998092651,"responseStart":647.6999998092651,"secureConnectionStart":356.5},{"duration":439.30000019073486,"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":367.69999980926514,"connectEnd":367.69999980926514,"connectStart":367.69999980926514,"domainLookupEnd":367.69999980926514,"domainLookupStart":367.69999980926514,"fetchStart":367.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":367.69999980926514,"responseEnd":807,"responseStart":807,"secureConnectionStart":367.69999980926514},{"duration":439.6000003814697,"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":367.80000019073486,"connectEnd":367.80000019073486,"connectStart":367.80000019073486,"domainLookupEnd":367.80000019073486,"domainLookupStart":367.80000019073486,"fetchStart":367.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":367.80000019073486,"responseEnd":807.4000005722046,"responseStart":807.4000005722046,"secureConnectionStart":367.80000019073486},{"duration":57.89999961853027,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":734.9000005722046,"connectEnd":734.9000005722046,"connectStart":734.9000005722046,"domainLookupEnd":734.9000005722046,"domainLookupStart":734.9000005722046,"fetchStart":734.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":734.9000005722046,"responseEnd":792.8000001907349,"responseStart":792.8000001907349,"secureConnectionStart":734.9000005722046},{"duration":203.30000019073486,"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":797,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":797,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1000.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":202.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2cib/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":797.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":797.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1000.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":52,"responseStart":350,"responseEnd":368,"domLoading":353,"domInteractive":1224,"domContentLoadedEventStart":1224,"domContentLoadedEventEnd":1270,"domComplete":2437,"loadEventStart":2437,"loadEventEnd":2438,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1203.1000003814697},{"name":"bigPipe.sidebar-id.end","time":1204},{"name":"bigPipe.activity-panel-pipe-id.start","time":1204.1000003814697},{"name":"bigPipe.activity-panel-pipe-id.end","time":1206.8000001907349},{"name":"activityTabFullyLoaded","time":1277.1000003814697}],"measures":[],"correlationId":"370a862a005c2b","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":231,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}