However, the thd->transaction->stmt.is_empty() assertion is seen only in debug builds, and is MDEV-24706. The SIGSEGV's in dict_table_t::is_active_ddl and dict_table_t::is_native_online_ddl are new. The bug does not replay in MTR including with modifications, please use the CLI.
Attachments
Issue Links
relates to
MDEV-24706Assertion `thd->transaction->stmt.is_empty() || thd->in_sub_stmt' failed in mysql_execute_command (from mysql_parse) and in trans_check
It looks like mysql.general_log must be an InnoDB table for this crash to occur. Here is a slightly revised test that reproduces the crash in mtr:
--source include/have_innodb.inc
SETGLOBAL general_log='ON';
CREATEORREPLACETABLE mysql.general_log (a INT) ENGINE=InnoDB;
CREATETEMPORARYTABLE t (c INT) ENGINE=InnoDB;
INSERTINTO t VALUES (1);
SETGLOBAL log_output='TABLE';
SET autocommit=0;
UPDATE t SET c=0;
TRUNCATE t;
SELECT a;
10.6 a74bea7ba99a8c215cf085ff7a9dd4bdabab51e8
mysqltest: At line 10: query 'SELECT a' failed: <Unknown> (2013): Lost connection to server during query
…
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
240914 10:49:50 [ERROR] mysqld got signal 11 ;
Curiously, if I replace the invalid statement SELECT a with ROLLBACK, there will be no crash. Similarly, if I replace SET autocommit=0 with BEGIN, it will not crash.
I don’t think that the table mysql.general_log can possibly work as an InnoDB table due to various reasons, also including locking conflicts. It would seem to me that this kind of an incorrect CREATE OR REPLACE TABLE statement needs to be rejected, or the log writes must check that the storage engine is something that can be expected to work for this usage. As far as I understand, the default is ENGINE=CSV.
This is not an InnoDB bug.
Marko Mäkelä
added a comment - It looks like mysql.general_log must be an InnoDB table for this crash to occur. Here is a slightly revised test that reproduces the crash in mtr :
--source include/have_innodb.inc
SET GLOBAL general_log= 'ON' ;
CREATE OR REPLACE TABLE mysql.general_log (a INT ) ENGINE=InnoDB;
CREATE TEMPORARY TABLE t (c INT ) ENGINE=InnoDB;
INSERT INTO t VALUES (1);
SET GLOBAL log_output= 'TABLE' ;
SET autocommit=0;
UPDATE t SET c=0;
TRUNCATE t;
SELECT a;
10.6 a74bea7ba99a8c215cf085ff7a9dd4bdabab51e8
mysqltest: At line 10: query 'SELECT a' failed: <Unknown> (2013): Lost connection to server during query
…
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
240914 10:49:50 [ERROR] mysqld got signal 11 ;
Curiously, if I replace the invalid statement SELECT a with ROLLBACK , there will be no crash. Similarly, if I replace SET autocommit=0 with BEGIN , it will not crash.
I don’t think that the table mysql.general_log can possibly work as an InnoDB table due to various reasons, also including locking conflicts. It would seem to me that this kind of an incorrect CREATE OR REPLACE TABLE statement needs to be rejected, or the log writes must check that the storage engine is something that can be expected to work for this usage. As far as I understand, the default is ENGINE=CSV .
This is not an InnoDB bug.
People
Oleksandr Byelkin
Roel Van de Paar
Votes:
0Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1441.2000002861023,"ttfb":443.59999990463257,"pageVisibility":"visible","entityId":130752,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"e8c30781-d841-4792-9a9e-f7904e831c0e","navigationType":0,"readyForUser":1531.5,"redirectCount":0,"resourceLoadedEnd":1912.4000000953674,"resourceLoadedStart":449.7000002861023,"resourceTiming":[{"duration":435,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":449.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":449.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":884.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":435.7000002861023,"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":450,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":450,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":885.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":506.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":450.09999990463257,"connectEnd":450.09999990463257,"connectStart":450.09999990463257,"domainLookupEnd":450.09999990463257,"domainLookupStart":450.09999990463257,"fetchStart":450.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":450.09999990463257,"responseEnd":956.4000000953674,"responseStart":956.4000000953674,"secureConnectionStart":450.09999990463257},{"duration":580.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":450.30000019073486,"connectEnd":450.30000019073486,"connectStart":450.30000019073486,"domainLookupEnd":450.30000019073486,"domainLookupStart":450.30000019073486,"fetchStart":450.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":450.30000019073486,"responseEnd":1031,"responseStart":1031,"secureConnectionStart":450.30000019073486},{"duration":585.5,"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":450.5,"connectEnd":450.5,"connectStart":450.5,"domainLookupEnd":450.5,"domainLookupStart":450.5,"fetchStart":450.5,"redirectEnd":0,"redirectStart":0,"requestStart":450.5,"responseEnd":1036,"responseStart":1036,"secureConnectionStart":450.5},{"duration":586.0999999046326,"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":450.80000019073486,"connectEnd":450.80000019073486,"connectStart":450.80000019073486,"domainLookupEnd":450.80000019073486,"domainLookupStart":450.80000019073486,"fetchStart":450.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":450.80000019073486,"responseEnd":1036.9000000953674,"responseStart":1036.9000000953674,"secureConnectionStart":450.80000019073486},{"duration":586.7000002861023,"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":451,"connectEnd":451,"connectStart":451,"domainLookupEnd":451,"domainLookupStart":451,"fetchStart":451,"redirectEnd":0,"redirectStart":0,"requestStart":451,"responseEnd":1037.7000002861023,"responseStart":1037.7000002861023,"secureConnectionStart":451},{"duration":672.9000000953674,"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":451.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":451.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1124,"responseStart":0,"secureConnectionStart":0},{"duration":587.2999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":451.30000019073486,"connectEnd":451.30000019073486,"connectStart":451.30000019073486,"domainLookupEnd":451.30000019073486,"domainLookupStart":451.30000019073486,"fetchStart":451.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":451.30000019073486,"responseEnd":1038.5999999046326,"responseStart":1038.5999999046326,"secureConnectionStart":451.30000019073486},{"duration":672.8000001907349,"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":451.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":451.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1124.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":588.3000001907349,"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":451.59999990463257,"connectEnd":451.59999990463257,"connectStart":451.59999990463257,"domainLookupEnd":451.59999990463257,"domainLookupStart":451.59999990463257,"fetchStart":451.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":451.59999990463257,"responseEnd":1039.9000000953674,"responseStart":1039.9000000953674,"secureConnectionStart":451.59999990463257},{"duration":1458.5999999046326,"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":452.40000009536743,"connectEnd":452.40000009536743,"connectStart":452.40000009536743,"domainLookupEnd":452.40000009536743,"domainLookupStart":452.40000009536743,"fetchStart":452.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":452.40000009536743,"responseEnd":1911,"responseStart":1911,"secureConnectionStart":452.40000009536743},{"duration":1460,"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":452.40000009536743,"connectEnd":452.40000009536743,"connectStart":452.40000009536743,"domainLookupEnd":452.40000009536743,"domainLookupStart":452.40000009536743,"fetchStart":452.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":452.40000009536743,"responseEnd":1912.4000000953674,"responseStart":1912.4000000953674,"secureConnectionStart":452.40000009536743},{"duration":773.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1138.0999999046326,"connectEnd":1138.0999999046326,"connectStart":1138.0999999046326,"domainLookupEnd":1138.0999999046326,"domainLookupStart":1138.0999999046326,"fetchStart":1138.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1138.0999999046326,"responseEnd":1911.5999999046326,"responseStart":1911.5999999046326,"secureConnectionStart":1138.0999999046326},{"duration":487.69999980926514,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1434.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1434.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1921.9000000953674,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":275,"responseStart":444,"responseEnd":446,"domLoading":448,"domInteractive":1959,"domContentLoadedEventStart":1959,"domContentLoadedEventEnd":2049,"domComplete":2329,"loadEventStart":2329,"loadEventEnd":2329,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1928.3000001907349},{"name":"bigPipe.sidebar-id.end","time":1929.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1929.2000002861023},{"name":"bigPipe.activity-panel-pipe-id.end","time":1931.0999999046326},{"name":"activityTabFullyLoaded","time":2072.9000000953674}],"measures":[],"correlationId":"fbfe94a550f32f","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":103,"dbReadsTimeInMs":13,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
It looks like mysql.general_log must be an InnoDB table for this crash to occur. Here is a slightly revised test that reproduces the crash in mtr:
--source include/have_innodb.inc
10.6 a74bea7ba99a8c215cf085ff7a9dd4bdabab51e8
mysqltest: At line 10: query 'SELECT a' failed: <Unknown> (2013): Lost connection to server during query
…
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
2024-09-14 10:49:50 4 [ERROR] Failed to write to mysql.general_log:
240914 10:49:50 [ERROR] mysqld got signal 11 ;
Curiously, if I replace the invalid statement SELECT a with ROLLBACK, there will be no crash. Similarly, if I replace SET autocommit=0 with BEGIN, it will not crash.
I don’t think that the table mysql.general_log can possibly work as an InnoDB table due to various reasons, also including locking conflicts. It would seem to me that this kind of an incorrect CREATE OR REPLACE TABLE statement needs to be rejected, or the log writes must check that the storage engine is something that can be expected to work for this usage. As far as I understand, the default is ENGINE=CSV.
This is not an InnoDB bug.