origin/10.6 066f920484bb186774d65e243ca2763a4293d866 2024-10-28T13:29:21+02:00
Scenario:
1. Start the server
|
2. One session (RQG Thread1) creates a table
|
CREATE TABLE t2 (
|
col1 INT PRIMARY KEY, col2 INT, col_int INTEGER , col_string INTEGER,
|
col_varchar VARCHAR(500), col_text TEXT )
|
ENGINE = InnoDB ROW_FORMAT = compressed.
|
The second session (RQG Thread2) runs
|
SET AUTOCOMMIT = 0; SET @fill_amount = (@@innodb_page_size / 2 ) + 1 ;
|
3. RQG Thread1 runs in a loop
|
DELETE FROM t2 WHERE col2 = { $my_int= $prng->int(513, 4096) } OR col2 IS NULL ;
|
COMMIT ;
|
RQG Thread2 runs in a loop a statement picked random from
|
a) ALTER TABLE t2 ADD UNIQUE KEY ( col_text(9) ) , ADD UNIQUE KEY ( col_text(9) ) |
|
b) INSERT INTO t2 (col1,col2,col_int, col_string, col_text)
|
VALUES ( { $my_int= $prng->int(513, 4096) } , $my_int, $my_int,
|
REPEAT(SUBSTR(CAST( $my_int AS CHAR),1,1), 10),
|
REPEAT(SUBSTR(CAST( $my_int AS CHAR),1,1), @fill_amount) ); COMMIT ;
|
$prng->int(513, 4096) dices an integer between 513 and 4096.
|
|
Runs of this test end
|
- very high likelihood if RelWithDebInfo or high optimized without debug info
|
- low likelihood if build with debug and optimization -Og
|
with
|
# 2024-11-13 10:03:37 14 [ERROR] InnoDB: Cannot load compressed BLOB [page id: space=6, page number=143]
|
# 2024-11-13 10:03:37 0x5c50418cf6c0 InnoDB: Assertion failure in file /data/Server/10.6/storage/innobase/row/row0merge.cc line 728
|
# 2024-11-13T10:03:49 [2453905] | InnoDB: Failing assertion: buf != field_ref_zero
|
...
|
# 2024-11-13T10:06:31 [2453905] | Thread 3 (Thread 2455585.2456461 (mariadbd)):
|
# 2024-11-13T10:06:31 [2453905] | #0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
|
# 2024-11-13T10:06:31 [2453905] | #1 __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
|
# 2024-11-13T10:06:31 [2453905] | #2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
|
# 2024-11-13T10:06:31 [2453905] | #3 0x0000679b706a426e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
# 2024-11-13T10:06:31 [2453905] | #4 0x0000679b706878ff in __GI_abort () at ./stdlib/abort.c:79
|
# 2024-11-13T10:06:31 [2453905] | #5 0x0000576e4fb5b1f4 in ut_dbg_assertion_failed (expr=expr@entry=0x576e5002fbcb "buf != field_ref_zero", file=file@entry=0x576e4ff7a9f0 "/data/Server/10.6/storage/innobase/row/row0merge.cc", line=line@entry=728) at /data/Server/10.6/storage/innobase/ut/ut0dbg.cc:60
|
# 2024-11-13T10:06:31 [2453905] | #6 0x0000576e4facacfc in row_merge_buf_add (buf=buf@entry=0x576e4802bee0, fts_index=fts_index@entry=0x0, old_table=old_table@entry=0xe404b1d0, new_table=<optimized out>, psort_info=psort_info@entry=0x0, row=<optimized out>, ext=<optimized out>, doc_id=<optimized out>, conv_heap=<optimized out>, err=<optimized out>, v_heap=<optimized out>, my_table=<optimized out>, trx=<optimized out>, col_collate=<optimized out>) at /data/Server/10.6/storage/innobase/row/row0merge.cc:728
|
# 2024-11-13T10:06:31 [2453905] | #7 0x0000576e4facdc6a in row_merge_read_clustered_index (trx=trx@entry=0x749a0384c780, table=table@entry=0x5c50418cb230, old_table=old_table@entry=0xe404b1d0, new_table=<optimized out>, new_table@entry=0xe404b1d0, online=online@entry=true, index=index@entry=0x576e4805ae28, fts_sort_idx=<optimized out>, psort_info=<optimized out>, files=<optimized out>, key_numbers=<optimized out>, n_index=<optimized out>, defaults=<optimized out>, add_v=<optimized out>, col_map=<optimized out>, add_autoinc=<optimized out>, sequence=..., block=<optimized out>, skip_pk_sort=<optimized out>, tmpfd=<optimized out>, stage=<optimized out>, pct_cost=pct_cost@entry=33.333333333333336, crypt_block=<optimized out>, eval_table=<optimized out>, allow_not_null=<optimized out>, col_collate=<optimized out>) at /data/Server/10.6/storage/innobase/row/row0merge.cc:2350
|
# 2024-11-13T10:06:31 [2453905] | #8 0x0000576e4facf3e6 in row_merge_build_indexes (trx=0x749a0384c780, old_table=0xe404b1d0, new_table=new_table@entry=0xe404b1d0, online=true, indexes=0x576e4805ae28, key_numbers=0x576e4805ae38, n_indexes=2, table=0x5c50418cb230, defaults=0x0, col_map=0x0, add_autoinc=18446744073709551615, sequence=..., skip_pk_sort=false, stage=0xe4038c90, add_v=0x0, eval_table=0x5c50418cb230, allow_not_null=false, col_collate=0x0) at /data/Server/10.6/storage/innobase/row/row0merge.cc:4519
|
# 2024-11-13T10:06:31 [2453905] | #9 0x0000576e4f9cdc7b in ha_innobase::inplace_alter_table (this=0xe403b090, altered_table=0x5c50418cb230, ha_alter_info=0x5c50418cb170) at /data/Server/10.6/storage/innobase/handler/handler0alter.cc:8903
|
# 2024-11-13T10:06:31 [2453905] | #10 0x0000576e4f5a0446 in handler::ha_inplace_alter_table (ha_alter_info=0x5c50418cb170, altered_table=0x5c50418cb230, this=<optimized out>) at /data/Server/10.6/sql/handler.h:4699
|
# 2024-11-13T10:06:31 [2453905] | #11 mysql_inplace_alter_table (thd=thd@entry=0x576e48000f98, table_list=0x576e48023438, table=table@entry=0xe40008f8, altered_table=altered_table@entry=0x5c50418cb230, ha_alter_info=ha_alter_info@entry=0x5c50418cb170, target_mdl_request=target_mdl_request@entry=0x5c50418cbaf0, ddl_log_state=0x5c50418cb130, trigger_param=0x5c50418cb660, alter_ctx=0x5c50418cc6b0) at /data/Server/10.6/sql/sql_table.cc:7586
|
# 2024-11-13T10:06:31 [2453905] | #12 0x0000576e4f5b083a in mysql_alter_table (thd=thd@entry=0x576e48000f98, new_db=new_db@entry=0x576e48005a48, new_name=<optimized out>, create_info=create_info@entry=0x5c50418cd550, table_list=<optimized out>, table_list@entry=0x576e48023438, recreate_info=recreate_info@entry=0x5c50418cd3a0, alter_info=<optimized out>, order_num=<optimized out>, order=<optimized out>, ignore=<optimized out>, if_exists=<optimized out>) at /data/Server/10.6/sql/sql_table.cc:10681
|
# 2024-11-13T10:06:31 [2453905] | #13 0x0000576e4f61dcb2 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x576e48000f98) at /data/Server/10.6/sql/sql_alter.cc:675
|
# 2024-11-13T10:06:31 [2453905] | #14 0x0000576e4f5058fe in mysql_execute_command (thd=thd@entry=0x576e48000f98, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/Server/10.6/sql/sql_parse.cc:6153
|
# 2024-11-13T10:06:31 [2453905] | #15 0x0000576e4f5063fa in mysql_parse (thd=thd@entry=0x576e48000f98, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x5c50418ce410) at /data/Server/10.6/sql/sql_parse.cc:8193
|
# 2024-11-13T10:06:31 [2453905] | #16 0x0000576e4f507ccb in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x576e48000f98, packet=packet@entry=0x576e4801b229 "ALTER TABLE t2 ADD UNIQUE KEY ( col_text(9) ), ADD UNIQUE KEY ( col_text(9) ) /* E_R Thread2 QNO 1867 CON_ID 14 */ ", packet_length=packet_length@entry=115, blocking=blocking@entry=true) at /data/Server/10.6/sql/sql_parse.cc:1909
|
|
I am aware that the statement
|
ALTER TABLE t2 ADD UNIQUE KEY ( col_text(9) ), ADD UNIQUE KEY ( col_text(9) );
|
is nonsense. IMHO the server should deny the execution of the statement.
|
But I am more irritated by the fact that changing the ROW_FORMAT to other formats like Dynamic, Compact, Redundant lets the problem disappear.
|
|
{"report":{"fcp":788.7000000476837,"ttfb":177.70000004768372,"pageVisibility":"visible","entityId":131593,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"f597ab34-b416-499f-a415-a2624784aa40","navigationType":0,"readyForUser":861.7000000476837,"redirectCount":0,"resourceLoadedEnd":915.0999999046326,"resourceLoadedStart":183.09999990463257,"resourceTiming":[{"duration":139.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":183.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":183.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":139.60000014305115,"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":183.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":183.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":322.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":148.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":183.5,"connectEnd":183.5,"connectStart":183.5,"domainLookupEnd":183.5,"domainLookupStart":183.5,"fetchStart":183.5,"redirectEnd":0,"redirectStart":0,"requestStart":183.5,"responseEnd":331.7999999523163,"responseStart":331.7999999523163,"secureConnectionStart":183.5},{"duration":214,"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":183.5,"connectEnd":183.5,"connectStart":183.5,"domainLookupEnd":183.5,"domainLookupStart":183.5,"fetchStart":183.5,"redirectEnd":0,"redirectStart":0,"requestStart":183.5,"responseEnd":397.5,"responseStart":397.40000009536743,"secureConnectionStart":183.5},{"duration":217.89999985694885,"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":183.70000004768372,"connectEnd":183.70000004768372,"connectStart":183.70000004768372,"domainLookupEnd":183.70000004768372,"domainLookupStart":183.70000004768372,"fetchStart":183.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":183.70000004768372,"responseEnd":401.59999990463257,"responseStart":401.59999990463257,"secureConnectionStart":183.70000004768372},{"duration":218.29999995231628,"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":183.70000004768372,"connectEnd":183.70000004768372,"connectStart":183.70000004768372,"domainLookupEnd":183.70000004768372,"domainLookupStart":183.70000004768372,"fetchStart":183.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":183.70000004768372,"responseEnd":402,"responseStart":402,"secureConnectionStart":183.70000004768372},{"duration":218.89999985694885,"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":183.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":183.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":402.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":218.39999985694885,"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":183.90000009536743,"connectEnd":183.90000009536743,"connectStart":183.90000009536743,"domainLookupEnd":183.90000009536743,"domainLookupStart":183.90000009536743,"fetchStart":183.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":183.90000009536743,"responseEnd":402.2999999523163,"responseStart":402.2999999523163,"secureConnectionStart":183.90000009536743},{"duration":218.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":184.09999990463257,"connectEnd":184.09999990463257,"connectStart":184.09999990463257,"domainLookupEnd":184.09999990463257,"domainLookupStart":184.09999990463257,"fetchStart":184.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":184.09999990463257,"responseEnd":402.7999999523163,"responseStart":402.7999999523163,"secureConnectionStart":184.09999990463257},{"duration":218.89999985694885,"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":184.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":184.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":403.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":218.90000009536743,"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":184.29999995231628,"connectEnd":184.29999995231628,"connectStart":184.29999995231628,"domainLookupEnd":184.29999995231628,"domainLookupStart":184.29999995231628,"fetchStart":184.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":184.29999995231628,"responseEnd":403.2000000476837,"responseStart":403.2000000476837,"secureConnectionStart":184.29999995231628},{"duration":422.30000019073486,"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":185.09999990463257,"connectEnd":185.09999990463257,"connectStart":185.09999990463257,"domainLookupEnd":185.09999990463257,"domainLookupStart":185.09999990463257,"fetchStart":185.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":185.09999990463257,"responseEnd":607.4000000953674,"responseStart":607.4000000953674,"secureConnectionStart":185.09999990463257},{"duration":555.7000000476837,"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":185.09999990463257,"connectEnd":185.09999990463257,"connectStart":185.09999990463257,"domainLookupEnd":185.09999990463257,"domainLookupStart":185.09999990463257,"fetchStart":185.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":185.09999990463257,"responseEnd":740.7999999523163,"responseStart":740.7999999523163,"secureConnectionStart":185.09999990463257},{"duration":131.79999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":542.2999999523163,"connectEnd":542.2999999523163,"connectStart":542.2999999523163,"domainLookupEnd":542.2999999523163,"domainLookupStart":542.2999999523163,"fetchStart":542.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":542.2999999523163,"responseEnd":674.0999999046326,"responseStart":674.0999999046326,"secureConnectionStart":542.2999999523163},{"duration":173.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/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":736.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":736.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":909.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":173.09999990463257,"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":737,"connectEnd":737,"connectStart":737,"domainLookupEnd":737,"domainLookupStart":737,"fetchStart":737,"redirectEnd":0,"redirectStart":0,"requestStart":737,"responseEnd":910.0999999046326,"responseStart":910.0999999046326,"secureConnectionStart":737},{"duration":177.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/f51ef5507eea4c158f257c66c93b2a3f-CDN/lu2bu7/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":737.4000000953674,"connectEnd":737.4000000953674,"connectStart":737.4000000953674,"domainLookupEnd":737.4000000953674,"domainLookupStart":737.4000000953674,"fetchStart":737.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":737.4000000953674,"responseEnd":915.0999999046326,"responseStart":915.0999999046326,"secureConnectionStart":737.4000000953674},{"duration":157.90000009536743,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":767.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":767.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":925.2000000476837,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":51,"responseStart":178,"responseEnd":181,"domLoading":181,"domInteractive":929,"domContentLoadedEventStart":929,"domContentLoadedEventEnd":970,"domComplete":1683,"loadEventStart":1683,"loadEventEnd":1684,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":904.2999999523163},{"name":"bigPipe.sidebar-id.end","time":905.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":905.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":907.5999999046326},{"name":"activityTabFullyLoaded","time":983.9000000953674}],"measures":[],"correlationId":"998455d64bb953","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":70,"dbReadsTimeInMs":11,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}