Create a table like this
CREATE TABLE `foo` (
|
`id` int(11) NOT NULL,
|
`modified` datetime NOT NULL,
|
PRIMARY KEY (`id`)
|
);
|
Then run the following query to crash the server:
select a.* from foo a left join foo b on a.id = b.id where a.modified > b.modified or b.modified is null;
|
The query will enter the optimizing state and start consuming memory (and swap, if applicable) until the server runs out of memory and mysqld is killed.
Note that it does not matter whether the table is an InnoDB or MyISAM table. MySQL 5.5.29 does not exhibit this behavior.
- relates to
-
MDEV-4461
Server uses all memory and CPU in remove_eq_conds
-
-
Closed
{"report":{"fcp":1003.1999998092651,"ttfb":143.89999985694885,"pageVisibility":"visible","entityId":23517,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6e1a333b-e608-4caa-99a9-d917d2a9debf","navigationType":0,"readyForUser":1056.8999998569489,"redirectCount":0,"resourceLoadedEnd":742.1999998092651,"resourceLoadedStart":148.59999990463257,"resourceTiming":[{"duration":376.59999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":148.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":148.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":525.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":376.2999999523163,"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":148.89999985694885,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":148.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":525.1999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":401,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":149.09999990463257,"connectEnd":149.09999990463257,"connectStart":149.09999990463257,"domainLookupEnd":149.09999990463257,"domainLookupStart":149.09999990463257,"fetchStart":149.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":149.09999990463257,"responseEnd":550.0999999046326,"responseStart":550.0999999046326,"secureConnectionStart":149.09999990463257},{"duration":455.09999990463257,"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":149.09999990463257,"connectEnd":149.09999990463257,"connectStart":149.09999990463257,"domainLookupEnd":149.09999990463257,"domainLookupStart":149.09999990463257,"fetchStart":149.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":149.09999990463257,"responseEnd":604.1999998092651,"responseStart":604.1999998092651,"secureConnectionStart":149.09999990463257},{"duration":458.90000009536743,"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":149.19999980926514,"connectEnd":149.19999980926514,"connectStart":149.19999980926514,"domainLookupEnd":149.19999980926514,"domainLookupStart":149.19999980926514,"fetchStart":149.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":149.19999980926514,"responseEnd":608.0999999046326,"responseStart":608.0999999046326,"secureConnectionStart":149.19999980926514},{"duration":459.10000014305115,"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":149.39999985694885,"connectEnd":149.39999985694885,"connectStart":149.39999985694885,"domainLookupEnd":149.39999985694885,"domainLookupStart":149.39999985694885,"fetchStart":149.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":149.39999985694885,"responseEnd":608.5,"responseStart":608.5,"secureConnectionStart":149.39999985694885},{"duration":459.7999999523163,"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":149.5,"connectEnd":149.5,"connectStart":149.5,"domainLookupEnd":149.5,"domainLookupStart":149.5,"fetchStart":149.5,"redirectEnd":0,"redirectStart":0,"requestStart":149.5,"responseEnd":609.2999999523163,"responseStart":609.2999999523163,"secureConnectionStart":149.5},{"duration":460,"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":149.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":149.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":609.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":460,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":149.59999990463257,"connectEnd":149.59999990463257,"connectStart":149.59999990463257,"domainLookupEnd":149.59999990463257,"domainLookupStart":149.59999990463257,"fetchStart":149.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":149.59999990463257,"responseEnd":609.5999999046326,"responseStart":609.5999999046326,"secureConnectionStart":149.59999990463257},{"duration":460.40000009536743,"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":149.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":149.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":610.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":460.39999985694885,"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":149.79999995231628,"connectEnd":149.79999995231628,"connectStart":149.79999995231628,"domainLookupEnd":149.79999995231628,"domainLookupStart":149.79999995231628,"fetchStart":149.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":149.79999995231628,"responseEnd":610.1999998092651,"responseStart":610.1999998092651,"secureConnectionStart":149.79999995231628},{"duration":543.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":156.89999985694885,"connectEnd":156.89999985694885,"connectStart":156.89999985694885,"domainLookupEnd":156.89999985694885,"domainLookupStart":156.89999985694885,"fetchStart":156.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":156.89999985694885,"responseEnd":700.3999998569489,"responseStart":700.3999998569489,"secureConnectionStart":156.89999985694885},{"duration":585.0999999046326,"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":157.09999990463257,"connectEnd":157.09999990463257,"connectStart":157.09999990463257,"domainLookupEnd":157.09999990463257,"domainLookupStart":157.09999990463257,"fetchStart":157.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":157.09999990463257,"responseEnd":742.1999998092651,"responseStart":742.1999998092651,"secureConnectionStart":157.09999990463257},{"duration":374,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":776.2999999523163,"connectEnd":776.2999999523163,"connectStart":776.2999999523163,"domainLookupEnd":776.2999999523163,"domainLookupStart":776.2999999523163,"fetchStart":776.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":776.2999999523163,"responseEnd":1150.2999999523163,"responseStart":1150.2999999523163,"secureConnectionStart":776.2999999523163}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":9,"responseStart":144,"responseEnd":157,"domLoading":147,"domInteractive":1104,"domContentLoadedEventStart":1104,"domContentLoadedEventEnd":1145,"domComplete":1859,"loadEventStart":1859,"loadEventEnd":1860,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1087.7999999523163},{"name":"bigPipe.sidebar-id.end","time":1088.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":1088.7999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":1091.0999999046326},{"name":"activityTabFullyLoaded","time":1150.5}],"measures":[],"correlationId":"98cedc3c6080dd","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":78,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}