ANALYZE TABLE t1 does not collect statistical data on min/max values for BLOB columns of table t1. However these values can be added manually into mysql.column_stats.
If we do this we observe a memory leak after running any query over table t1 when
use_stat_tables is set to 'PREFERABLY'.
The following test case demonstrates the problem:
SET use_stat_tables= PREFERABLY;
|
|
CREATE TABLE t1 (pk INT PRIMARY KEY, t TEXT);
|
INSERT INTO t1 VALUES (1,'foo'),(2,'bar');
|
ANALYZE TABLE t1;
|
SELECT * FROM mysql.column_stats;
|
DELETE FROM mysql.column_stats
|
WHERE db_name='test' AND table_name='t1' AND column_name='t';
|
INSERT INTO mysql.column_stats VALUES
|
('test','t1','t','bar','foo', 0.0, 3.0, 1.0, 0, NULL, NULL);
|
SELECT * FROM mysql.column_stats;
|
|
SELECT pk FROM t1;
|
|
DROP TABLE t1;
|
After running this test in mtr we see
Warning: 8 bytes lost at 0x7f343402b560, allocated by T@0 at 0x70fe0b, 0x5c83d1, 0x84b4a7, 0x70dc99, 0x709657, 0x70a212, 0x613302, 0x6074f1
|
Warning: 8 bytes lost at 0x7f343407e7a0, allocated by T@0 at 0x70fe0b, 0x5c83d1, 0x84b4a7, 0x70dbef, 0x709657, 0x70a212, 0x613302, 0x6074f1
|
Transition |
Time In Source Status |
Execution Times |
Open |
|
In Progress |
|
6h 41m
|
1
|
In Progress |
|
Closed |
|
3d 5h 43m
|
1
|
{"report":{"fcp":887.6000001430511,"ttfb":135.70000004768372,"pageVisibility":"visible","entityId":68690,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"e0693451-a4d4-4bb0-a036-a8e2b7930d5f","navigationType":0,"readyForUser":959.9000000953674,"redirectCount":0,"resourceLoadedEnd":842.8000001907349,"resourceLoadedStart":149.80000019073486,"resourceTiming":[{"duration":50.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":149.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":149.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":200.70000004768372,"responseStart":0,"secureConnectionStart":0},{"duration":243.39999985694885,"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":150.10000014305115,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":150.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":393.5,"responseStart":0,"secureConnectionStart":0},{"duration":296.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":150.20000004768372,"connectEnd":150.20000004768372,"connectStart":150.20000004768372,"domainLookupEnd":150.20000004768372,"domainLookupStart":150.20000004768372,"fetchStart":150.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":150.20000004768372,"responseEnd":446.80000019073486,"responseStart":446.80000019073486,"secureConnectionStart":150.20000004768372},{"duration":379.2999999523163,"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":150.30000019073486,"connectEnd":150.30000019073486,"connectStart":150.30000019073486,"domainLookupEnd":150.30000019073486,"domainLookupStart":150.30000019073486,"fetchStart":150.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":150.30000019073486,"responseEnd":529.6000001430511,"responseStart":529.6000001430511,"secureConnectionStart":150.30000019073486},{"duration":382.7000000476837,"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":150.5,"connectEnd":150.5,"connectStart":150.5,"domainLookupEnd":150.5,"domainLookupStart":150.5,"fetchStart":150.5,"redirectEnd":0,"redirectStart":0,"requestStart":150.5,"responseEnd":533.2000000476837,"responseStart":533.2000000476837,"secureConnectionStart":150.5},{"duration":383.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":150.5,"connectEnd":150.5,"connectStart":150.5,"domainLookupEnd":150.5,"domainLookupStart":150.5,"fetchStart":150.5,"redirectEnd":0,"redirectStart":0,"requestStart":150.5,"responseEnd":533.6000001430511,"responseStart":533.6000001430511,"secureConnectionStart":150.5},{"duration":383.5,"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":150.60000014305115,"connectEnd":150.60000014305115,"connectStart":150.60000014305115,"domainLookupEnd":150.60000014305115,"domainLookupStart":150.60000014305115,"fetchStart":150.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":150.60000014305115,"responseEnd":534.1000001430511,"responseStart":534.1000001430511,"secureConnectionStart":150.60000014305115},{"duration":383.7000000476837,"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":150.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":150.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":534.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":383.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":150.80000019073486,"connectEnd":150.80000019073486,"connectStart":150.80000019073486,"domainLookupEnd":150.80000019073486,"domainLookupStart":150.80000019073486,"fetchStart":150.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":150.80000019073486,"responseEnd":534.6000001430511,"responseStart":534.6000001430511,"secureConnectionStart":150.80000019073486},{"duration":384,"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":151,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":151,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":535,"responseStart":0,"secureConnectionStart":0},{"duration":384,"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":151.10000014305115,"connectEnd":151.10000014305115,"connectStart":151.10000014305115,"domainLookupEnd":151.10000014305115,"domainLookupStart":151.10000014305115,"fetchStart":151.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":151.10000014305115,"responseEnd":535.1000001430511,"responseStart":535.1000001430511,"secureConnectionStart":151.10000014305115},{"duration":604,"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":151.60000014305115,"connectEnd":151.60000014305115,"connectStart":151.60000014305115,"domainLookupEnd":151.60000014305115,"domainLookupStart":151.60000014305115,"fetchStart":151.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":151.60000014305115,"responseEnd":755.6000001430511,"responseStart":755.6000001430511,"secureConnectionStart":151.60000014305115},{"duration":689.7999999523163,"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":151.60000014305115,"connectEnd":151.60000014305115,"connectStart":151.60000014305115,"domainLookupEnd":151.60000014305115,"domainLookupStart":151.60000014305115,"fetchStart":151.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":151.60000014305115,"responseEnd":841.4000000953674,"responseStart":841.4000000953674,"secureConnectionStart":151.60000014305115},{"duration":161.29999995231628,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":594.9000000953674,"connectEnd":594.9000000953674,"connectStart":594.9000000953674,"domainLookupEnd":594.9000000953674,"domainLookupStart":594.9000000953674,"fetchStart":594.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":594.9000000953674,"responseEnd":756.2000000476837,"responseStart":756.2000000476837,"secureConnectionStart":594.9000000953674},{"duration":48.60000014305115,"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":794.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":794.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":842.8000001907349,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":10,"responseStart":135,"responseEnd":137,"domLoading":147,"domInteractive":1007,"domContentLoadedEventStart":1007,"domContentLoadedEventEnd":1044,"domComplete":1281,"loadEventStart":1281,"loadEventEnd":1282,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":991.7000000476837},{"name":"bigPipe.sidebar-id.end","time":992.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":992.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":993.6000001430511},{"name":"activityTabFullyLoaded","time":1056.6000001430511}],"measures":[],"correlationId":"ef9fa30bbdcb07","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":71,"dbReadsTimeInMs":11,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}