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)
--source include/have_innodb.inc
CREATE TABLE t (f TEXT) WITH SYSTEM VERSIONING CHARACTER SET utf8 ENGINE=InnoDB;
INSERT INTO t VALUES ( 'foo' );
DELETE FROM t;
ALTER TABLE t ADD FULLTEXT (f);
# Cleanup
DROP TABLE t;
10.3 7a98d232
/src/storage/innobase/data/data0type.cc:63: ulint dtype_get_at_most_n_mbchars(ulint, ulint, ulint, ulint, ulint, const char*): Assertion `!mbmaxlen || !(prefix_len % mbmaxlen)' failed
#7 0x00007f3e7237b662 in __GI___assert_fail (assertion=0x564011d04300 "!mbmaxlen || !(prefix_len % mbmaxlen)", file=0x564011d04240 "/src/storage/innobase/data/data0type.cc", line=63, function=0x564011d04360 "ulint dtype_get_at_most_n_mbchars(ulint, ulint, ulint, ulint, ulint, const char*)") at assert.c:101
#8 0x0000564010d00461 in dtype_get_at_most_n_mbchars (prtype=2212092, mbminlen=1, mbmaxlen=3, prefix_len=1, data_len=3, str=0x7f3e683ec092 "fooc\331T{\bwUc\331T{\b}\277") at /src/storage/innobase/data/data0type.cc:63
#9 0x000056401099bdda in row_merge_buf_add (buf=0x615000044d08, fts_index=0x618000049d08, old_table=0x6190000d4e08, new_table=0x6190000d9408, psort_info=0x6190000e5b80, row=0x63100008c8b8, ext=0x0, history_fts=true, doc_id=0x7f3e5bb42b10, conv_heap=0x0, err=0x7f3e5bb42ab0, v_heap=0x7f3e5bb42af0, my_table=0x61f000043688, trx=0x7f3e687898b8) at /src/storage/innobase/row/row0merge.cc:725
#10 0x00005640109a8515 in row_merge_read_clustered_index (trx=0x7f3e687898b8, table=0x61f000043688, old_table=0x6190000d4e08, new_table=0x6190000d9408, online=false, index=0x6190000d91b0, fts_sort_idx=0x618000055908, psort_info=0x6190000e5b80, files=0x60800000c2a0, key_numbers=0x6190000d91d0, n_index=3, defaults=0x0, add_v=0x0, col_map=0x61d0001f9108, add_autoinc=18446744073709551615, sequence=..., block=0x7f3e5b5e5000 "", skip_pk_sort=true, tmpfd=0x7f3e5bb43920, stage=0x60700001cd40, pct_cost=25, crypt_block=0x0, eval_table=0x61f000043688, allow_not_null=false) at /src/storage/innobase/row/row0merge.cc:2329
#11 0x00005640109b854d in row_merge_build_indexes (trx=0x7f3e687898b8, old_table=0x6190000d4e08, new_table=0x6190000d9408, online=false, indexes=0x6190000d91b0, key_numbers=0x6190000d91d0, n_indexes=3, table=0x61f000043688, defaults=0x0, col_map=0x61d0001f9108, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=true, stage=0x60700001cd40, add_v=0x0, eval_table=0x61f000043688, allow_not_null=false) at /src/storage/innobase/row/row0merge.cc:4707
#12 0x000056401074d9bf in ha_innobase::inplace_alter_table (this=0x61c0000610a8, altered_table=0x61f000043688, ha_alter_info=0x7f3e5bb44df0) at /src/storage/innobase/handler/handler0alter.cc:7241
#13 0x000056400fc34e82 in handler::ha_inplace_alter_table (this=0x61c0000610a8, altered_table=0x61f000043688, ha_alter_info=0x7f3e5bb44df0) at /src/sql/handler.h:4153
#14 0x000056400fc17c08 in mysql_inplace_alter_table (thd=0x62a0000ba208, table_list=0x62b000000338, table=0x61f000042888, altered_table=0x61f000043688, ha_alter_info=0x7f3e5bb44df0, target_mdl_request=0x7f3e5bb44fd0, alter_ctx=0x7f3e5bb45830) at /src/sql/sql_table.cc:7778
#15 0x000056400fc29141 in mysql_alter_table (thd=0x62a0000ba208, new_db=0x62a0000be918, new_name=0x62a0000bed00, create_info=0x7f3e5bb46550, table_list=0x62b000000338, alter_info=0x7f3e5bb46450, order_num=0, order=0x0, ignore=false) at /src/sql/sql_table.cc:10166
#16 0x000056400fd9287c in Sql_cmd_alter_table::execute (this=0x62b000000ac8, thd=0x62a0000ba208) at /src/sql/sql_alter.cc:512
#17 0x000056400f9de0bf in mysql_execute_command (thd=0x62a0000ba208) at /src/sql/sql_parse.cc:6076
#18 0x000056400f9e9ef0 in mysql_parse (thd=0x62a0000ba208, rawbuf=0x62b000000228 "ALTER TABLE t ADD FULLTEXT (f)", length=30, parser_state=0x7f3e5bb48950, is_com_multi=false, is_next_command=false) at /src/sql/sql_parse.cc:7855
#19 0x000056400f9c1580 in dispatch_command (command=COM_QUERY, thd=0x62a0000ba208, packet=0x629000136209 "ALTER TABLE t ADD FULLTEXT (f)", packet_length=30, is_com_multi=false, is_next_command=false) at /src/sql/sql_parse.cc:1852
#20 0x000056400f9be138 in do_command (thd=0x62a0000ba208) at /src/sql/sql_parse.cc:1398
#21 0x000056400fd82166 in do_handle_one_connection (connect=0x608000000ea8) at /src/sql/sql_connect.cc:1404
#22 0x000056400fd81a62 in handle_one_connection (arg=0x608000000ea8) at /src/sql/sql_connect.cc:1309
#23 0x0000564011333775 in pfs_spawn_thread (arg=0x615000007608) at /src/storage/perfschema/pfs.cc:1869
#24 0x00007f3e72526ea7 in start_thread (arg=<optimized out>) at pthread_create.c:477
#25 0x00007f3e72446aef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
The failure started happening on 10.3 after this commit:
commit e056efdd6cfa62cc4c978fce5730af0b8d4c3c6b
Author: Aleksey Midenkov
Date: Tue Dec 27 00:02:02 2022 +0300
MDEV-25004 Missing row in FTS_DOC_ID_INDEX during DELETE HISTORY
On higher versions the assertion is a bit different. The test case is the same.
10.11
ulint dtype_get_at_most_n_mbchars(ulint, ulint, ulint, ulint, ulint, const char*): Assertion `!mbmaxlen || !(prefix_len % mbmaxlen) || !(prefix_len % 4)' failed
Non-debug builds also fail, with a non-debug version of the assertion
10.3 f812f8e1
2023-01-31 20:16:07 0x7f91e3287700 InnoDB: Assertion failure in file /data/src/10.3/storage/innobase/data/data0type.cc line 66
InnoDB: Failing assertion: !(prefix_len % mbmaxlen)
{"report":{"fcp":766,"ttfb":199.29999995231628,"pageVisibility":"visible","entityId":118785,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"6fc98eda-f58d-44d4-a603-24d3f2e982ab","navigationType":0,"readyForUser":897.2000000476837,"redirectCount":0,"resourceLoadedEnd":953.4000000953674,"resourceLoadedStart":207.59999990463257,"resourceTiming":[{"duration":129.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":207.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":207.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":336.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":129.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":208,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":208,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":337.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":137.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":208.09999990463257,"connectEnd":208.09999990463257,"connectStart":208.09999990463257,"domainLookupEnd":208.09999990463257,"domainLookupStart":208.09999990463257,"fetchStart":208.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":208.09999990463257,"responseEnd":345.90000009536743,"responseStart":345.90000009536743,"secureConnectionStart":208.09999990463257},{"duration":228.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":208.20000004768372,"connectEnd":208.20000004768372,"connectStart":208.20000004768372,"domainLookupEnd":208.20000004768372,"domainLookupStart":208.20000004768372,"fetchStart":208.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":208.20000004768372,"responseEnd":436.7999999523163,"responseStart":436.7999999523163,"secureConnectionStart":208.20000004768372},{"duration":224.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":208.20000004768372,"connectEnd":208.20000004768372,"connectStart":208.20000004768372,"domainLookupEnd":208.20000004768372,"domainLookupStart":208.20000004768372,"fetchStart":208.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":208.20000004768372,"responseEnd":433.09999990463257,"responseStart":433.09999990463257,"secureConnectionStart":208.20000004768372},{"duration":228.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":208.40000009536743,"connectEnd":208.40000009536743,"connectStart":208.40000009536743,"domainLookupEnd":208.40000009536743,"domainLookupStart":208.40000009536743,"fetchStart":208.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":208.40000009536743,"responseEnd":437.2000000476837,"responseStart":437.2000000476837,"secureConnectionStart":208.40000009536743},{"duration":229.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":208.40000009536743,"connectEnd":208.40000009536743,"connectStart":208.40000009536743,"domainLookupEnd":208.40000009536743,"domainLookupStart":208.40000009536743,"fetchStart":208.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":208.40000009536743,"responseEnd":437.7000000476837,"responseStart":437.7000000476837,"secureConnectionStart":208.40000009536743},{"duration":230,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":208.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":208.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":438.5,"responseStart":0,"secureConnectionStart":0},{"duration":230.70000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":208.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":208.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":439.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":229.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":208.70000004768372,"connectEnd":208.70000004768372,"connectStart":208.70000004768372,"domainLookupEnd":208.70000004768372,"domainLookupStart":208.70000004768372,"fetchStart":208.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":208.70000004768372,"responseEnd":438.59999990463257,"responseStart":438.59999990463257,"secureConnectionStart":208.70000004768372},{"duration":230.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":208.90000009536743,"connectEnd":208.90000009536743,"connectStart":208.90000009536743,"domainLookupEnd":208.90000009536743,"domainLookupStart":208.90000009536743,"fetchStart":208.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":208.90000009536743,"responseEnd":439.5,"responseStart":439.5,"secureConnectionStart":208.90000009536743},{"duration":535.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":209.70000004768372,"connectEnd":209.70000004768372,"connectStart":209.70000004768372,"domainLookupEnd":209.70000004768372,"domainLookupStart":209.70000004768372,"fetchStart":209.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":209.70000004768372,"responseEnd":745.2000000476837,"responseStart":745.2000000476837,"secureConnectionStart":209.70000004768372},{"duration":647.1000001430511,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":209.79999995231628,"connectEnd":209.79999995231628,"connectStart":209.79999995231628,"domainLookupEnd":209.79999995231628,"domainLookupStart":209.79999995231628,"fetchStart":209.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":209.79999995231628,"responseEnd":856.9000000953674,"responseStart":856.9000000953674,"secureConnectionStart":209.79999995231628},{"duration":244.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":502.59999990463257,"connectEnd":502.59999990463257,"connectStart":502.59999990463257,"domainLookupEnd":502.59999990463257,"domainLookupStart":502.59999990463257,"fetchStart":502.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":502.59999990463257,"responseEnd":746.7999999523163,"responseStart":746.7999999523163,"secureConnectionStart":502.59999990463257},{"duration":105.79999995231628,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":755.7000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":755.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":861.5,"responseStart":0,"secureConnectionStart":0},{"duration":173.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/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":780.0999999046326,"connectEnd":780.0999999046326,"connectStart":780.0999999046326,"domainLookupEnd":780.0999999046326,"domainLookupStart":780.0999999046326,"fetchStart":780.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":780.0999999046326,"responseEnd":953.4000000953674,"responseStart":953.4000000953674,"secureConnectionStart":780.0999999046326}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":23,"responseStart":200,"responseEnd":206,"domLoading":204,"domInteractive":975,"domContentLoadedEventStart":975,"domContentLoadedEventEnd":1032,"domComplete":1221,"loadEventStart":1221,"loadEventEnd":1222,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":940.5999999046326},{"name":"bigPipe.sidebar-id.end","time":941.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":941.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":943.9000000953674},{"name":"activityTabFullyLoaded","time":1049.2999999523163}],"measures":[],"correlationId":"dbe0d435725870","effectiveType":"4g","downlink":9.6,"rtt":0,"serverDuration":112,"dbReadsTimeInMs":39,"dbConnsTimeInMs":47,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}