The test case is very non-deterministic, run with big --repeat=N.
Don't put it into the regression suite, create a deterministic one instead.
It usually fails for me within 20-200 attempts, but it can vary on different machines and builds.
I don't know what relation it has to ORACLE mode/packages, to SHOW WARNINGS, and how the actions on the second table affect the outcome, but I couldn't get rid of any of those. Hopefully it can be simplified after the analysis.
The failure is rr-able.
--source include/have_sequence.inc
CREATETABLE t1 SELECT'x'AS f1 FROM seq_1_to_100;
CREATETABLE t2 SELECTNULLAS f2;
--connect (con1,localhost,root,,)
DELETEFROM t1 WHERE f1 = 1;
--connection default
SET sql_mode= 'ORACLE';
--delimiter $
CREATE PACKAGE pkg ISPROCEDURE p; END $
CREATE PACKAGE BODY pkg ISPROCEDURE p ASBEGINALTERTABLE t2 ENGINE=HEAP; END; END $
--delimiter ;
--send
CALL pkg.p;
--connection con1
SHOW WARNINGS;
INSERTINTO t2 VALUES (NULL);
--connection default
--reap
CALL pkg.p;
# Cleanup
DROPTABLE t1, t2;
DROP PACKAGE pkg;
bb-11.0-oalter f9b33ac57
(rr) bt
#0 LEX::first_lists_tables_same (this=0x7f8358310b90) at /data/src/bb-11.0-oalter-debug/sql/sql_lex.cc:4497
#1 0x000055dd0c750bcf in mysql_execute_command (thd=0x7f8358000dc8, is_called_from_prepared_stmt=false) at /data/src/bb-11.0-oalter-debug/sql/sql_parse.cc:3503
#2 0x000055dd0c649e2b in sp_instr_stmt::exec_core (this=0x7f8358310478, thd=0x7f8358000dc8, nextp=0x7f83693a1f4c) at /data/src/bb-11.0-oalter-debug/sql/sp_head.cc:3857
#3 0x000055dd0c649149 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7f83583104c0, thd=0x7f8358000dc8, nextp=0x7f83693a1f4c, open_tables=false, instr=0x7f8358310478)
at /data/src/bb-11.0-oalter-debug/sql/sp_head.cc:3582
#4 0x000055dd0c6499db in sp_instr_stmt::execute (this=0x7f8358310478, thd=0x7f8358000dc8, nextp=0x7f83693a1f4c) at /data/src/bb-11.0-oalter-debug/sql/sp_head.cc:3763
#5 0x000055dd0c642977 in sp_head::execute (this=0x7f835830eb00, thd=0x7f8358000dc8, merge_da_on_success=true) at /data/src/bb-11.0-oalter-debug/sql/sp_head.cc:1459
#6 0x000055dd0c64569c in sp_head::execute_procedure (this=0x7f835830eb00, thd=0x7f8358000dc8, args=0x7f8358006148) at /data/src/bb-11.0-oalter-debug/sql/sp_head.cc:2446
#7 0x000055dd0c74ebaa in do_execute_sp (thd=0x7f8358000dc8, sp=0x7f835830eb00) at /data/src/bb-11.0-oalter-debug/sql/sql_parse.cc:3026
#8 0x000055dd0c74f82c in Sql_cmd_call::execute (this=0x7f8358015598, thd=0x7f8358000dc8) at /data/src/bb-11.0-oalter-debug/sql/sql_parse.cc:3271
#9 0x000055dd0c759a9d in mysql_execute_command (thd=0x7f8358000dc8, is_called_from_prepared_stmt=false) at /data/src/bb-11.0-oalter-debug/sql/sql_parse.cc:6001
#10 0x000055dd0c75fc14 in mysql_parse (thd=0x7f8358000dc8, rawbuf=0x7f83580154d0 "CALL pkg.p", length=10, parser_state=0x7f83693a3370) at /data/src/bb-11.0-oalter-debug/sql/sql_parse.cc:8000
at /data/src/bb-11.0-oalter-debug/sql/sql_parse.cc:1894
#12 0x000055dd0c74a1e6 in do_command (thd=0x7f8358000dc8, blocking=true) at /data/src/bb-11.0-oalter-debug/sql/sql_parse.cc:1407
#13 0x000055dd0c93ca52 in do_handle_one_connection (connect=0x55dd1115d1d8, put_in_cache=true) at /data/src/bb-11.0-oalter-debug/sql/sql_connect.cc:1416
#14 0x000055dd0c93c7c7 in handle_one_connection (arg=0x55dd111aa068) at /data/src/bb-11.0-oalter-debug/sql/sql_connect.cc:1318
#15 0x000055dd0ce5c240 in pfs_spawn_thread (arg=0x55dd1115cc68) at /data/src/bb-11.0-oalter-debug/storage/perfschema/pfs.cc:2201
#16 0x00007f836f8a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#17 0x00007f836f9278d0 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
This bug is about ONLINE ALTER TABLE + 2nd SP execution.
SHOW WARNINGS and ORACLE PACKAGE were only aligning the timing, as well as copying 100-sized table.
--source include/have_debug_sync.inc
CREATETABLE t1 ENGINE=myisam SELECT 1 AS x ;
CREATEPROCEDURE p() ALTERTABLE t1 ENGINE=HEAP;
SET debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end';
send CALL p;
--connect (con1,localhost,root,,)
SET debug_sync= 'now WAIT_FOR ended';
INSERTINTO t1 VALUES (2);
SET debug_sync= 'now SIGNAL end';
--connection default
--reap
CALL p;
DROPTABLE t1;
Nikita Malyavin
added a comment - - edited This bug is about ONLINE ALTER TABLE + 2nd SP execution.
SHOW WARNINGS and ORACLE PACKAGE were only aligning the timing, as well as copying 100-sized table.
--source include/have_debug_sync.inc
CREATE TABLE t1 ENGINE=myisam SELECT 1 AS x ;
CREATE PROCEDURE p() ALTER TABLE t1 ENGINE=HEAP;
SET debug_sync= 'alter_table_copy_end SIGNAL ended WAIT_FOR end' ;
send CALL p;
--connect (con1,localhost,root,,)
SET debug_sync= 'now WAIT_FOR ended' ;
INSERT INTO t1 VALUES (2);
SET debug_sync= 'now SIGNAL end' ;
--connection default
--reap
CALL p;
DROP TABLE t1;
Note: lex->query_tables was set to NULL in restore_empty_query_table_list when an online event is applied.
Then lex->query_tables->prev_global was write-accessed in LEX::first_lists_tables_same, leading to a segfault.
Nikita Malyavin
added a comment - Note:
lex->query_tables was set to NULL in restore_empty_query_table_list when an online event is applied.
Then lex->query_tables->prev_global was write-accessed in LEX::first_lists_tables_same , leading to a segfault.
People
Nikita Malyavin
Elena Stepanova
Votes:
0Vote for this issue
Watchers:
3Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":2136,"ttfb":497.10000014305115,"pageVisibility":"visible","entityId":120428,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"93d4161c-2621-4ee0-86da-17e89145be46","navigationType":0,"readyForUser":2353.800000190735,"redirectCount":0,"resourceLoadedEnd":1723.2000000476837,"resourceLoadedStart":506.90000009536743,"resourceTiming":[{"duration":102.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":506.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":506.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":609,"responseStart":0,"secureConnectionStart":0},{"duration":134.79999995231628,"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":507.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":507.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":642.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":703.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":507.90000009536743,"connectEnd":507.90000009536743,"connectStart":507.90000009536743,"domainLookupEnd":507.90000009536743,"domainLookupStart":507.90000009536743,"fetchStart":507.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":652.2000000476837,"responseEnd":1211.4000000953674,"responseStart":669.4000000953674,"secureConnectionStart":507.90000009536743},{"duration":1147.6999998092651,"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":508.30000019073486,"connectEnd":508.30000019073486,"connectStart":508.30000019073486,"domainLookupEnd":508.30000019073486,"domainLookupStart":508.30000019073486,"fetchStart":508.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":654,"responseEnd":1656,"responseStart":671.2000000476837,"secureConnectionStart":508.30000019073486},{"duration":175.30000019073486,"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":508.5,"connectEnd":508.5,"connectStart":508.5,"domainLookupEnd":508.5,"domainLookupStart":508.5,"fetchStart":508.5,"redirectEnd":0,"redirectStart":0,"requestStart":654.2000000476837,"responseEnd":683.8000001907349,"responseStart":678.8000001907349,"secureConnectionStart":508.5},{"duration":174.29999995231628,"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":508.80000019073486,"connectEnd":508.80000019073486,"connectStart":508.80000019073486,"domainLookupEnd":508.80000019073486,"domainLookupStart":508.80000019073486,"fetchStart":508.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":654.2000000476837,"responseEnd":683.1000001430511,"responseStart":673.7000000476837,"secureConnectionStart":508.80000019073486},{"duration":180.29999995231628,"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":509.40000009536743,"connectEnd":509.40000009536743,"connectStart":509.40000009536743,"domainLookupEnd":509.40000009536743,"domainLookupStart":509.40000009536743,"fetchStart":509.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":655.4000000953674,"responseEnd":689.7000000476837,"responseStart":686.4000000953674,"secureConnectionStart":509.40000009536743},{"duration":139.39999985694885,"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":509.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":509.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":649.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":174.89999985694885,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":511.30000019073486,"connectEnd":511.30000019073486,"connectStart":511.30000019073486,"domainLookupEnd":511.30000019073486,"domainLookupStart":511.30000019073486,"fetchStart":511.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":655.6000001430511,"responseEnd":686.2000000476837,"responseStart":684.3000001907349,"secureConnectionStart":511.30000019073486},{"duration":139.60000014305115,"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":512,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":512,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":651.6000001430511,"responseStart":0,"secureConnectionStart":0},{"duration":176.60000014305115,"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":512.2000000476837,"connectEnd":512.2000000476837,"connectStart":512.2000000476837,"domainLookupEnd":512.2000000476837,"domainLookupStart":512.2000000476837,"fetchStart":512.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":655.7000000476837,"responseEnd":688.8000001907349,"responseStart":685.1000001430511,"secureConnectionStart":512.2000000476837},{"duration":1194.1000001430511,"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":517.7000000476837,"connectEnd":517.7000000476837,"connectStart":517.7000000476837,"domainLookupEnd":517.7000000476837,"domainLookupStart":517.7000000476837,"fetchStart":517.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":900.7000000476837,"responseEnd":1711.8000001907349,"responseStart":1704.3000001907349,"secureConnectionStart":517.7000000476837},{"duration":1205.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":517.7000000476837,"connectEnd":517.7000000476837,"connectStart":517.7000000476837,"domainLookupEnd":517.7000000476837,"domainLookupStart":517.7000000476837,"fetchStart":517.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1015.5,"responseEnd":1723.2000000476837,"responseStart":1705.6000001430511,"secureConnectionStart":517.7000000476837},{"duration":423.39999985694885,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1504.8000001907349,"connectEnd":1504.8000001907349,"connectStart":1504.8000001907349,"domainLookupEnd":1504.8000001907349,"domainLookupStart":1504.8000001907349,"fetchStart":1504.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1891.5,"responseEnd":1928.2000000476837,"responseStart":1927.1000001430511,"secureConnectionStart":1504.8000001907349},{"duration":507.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2006.5,"connectEnd":2006.5,"connectStart":2006.5,"domainLookupEnd":2006.5,"domainLookupStart":2006.5,"fetchStart":2006.5,"redirectEnd":0,"redirectStart":0,"requestStart":2479.5,"responseEnd":2513.9000000953674,"responseStart":2513.4000000953674,"secureConnectionStart":2006.5}],"fetchStart":0,"domainLookupStart":246,"domainLookupEnd":280,"connectStart":280,"connectEnd":300,"secureConnectionStart":289,"requestStart":301,"responseStart":497,"responseEnd":510,"domLoading":502,"domInteractive":2455,"domContentLoadedEventStart":2455,"domContentLoadedEventEnd":2505,"domComplete":3238,"loadEventStart":3238,"loadEventEnd":3238,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2429.7000000476837},{"name":"bigPipe.sidebar-id.end","time":2430.600000143051},{"name":"bigPipe.activity-panel-pipe-id.start","time":2430.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":2432.800000190735},{"name":"activityTabFullyLoaded","time":2533.5}],"measures":[],"correlationId":"c610b6fe290a92","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":105,"dbReadsTimeInMs":16,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This bug is about ONLINE ALTER TABLE + 2nd SP execution.
SHOW WARNINGS and ORACLE PACKAGE were only aligning the timing, as well as copying 100-sized table.
--source include/have_debug_sync.inc
send CALL p;
--connect (con1,localhost,root,,)
--connection default
--reap
CALL p;