1. Two bugs are filed as tentative blockers for the feature:
MDEV-33881 INDEX_STATISTICS skip system tables inconsistently
MDEV-33901 INDEX_STATISTICS.QUERIES is incremented additionally for subqueries
They should be looked at before the feature is released with RC. However, if as a result of the analysis they are determined to be not bugs or not critical enough to prevent the feature release, I won't dispute it. For "not bugs", please redirect the JIRA items to documentation. For "unimportant", please downgrade the issues in JIRA.
2. Two bugs are filed as not blocking the feature release:
MDEV-33903 For stored functions INDEX_STATISTICS.QUERIES only counts the top-most query
MDEV-33904 For triggers INDEX_STATISTICS.QUERIES only counts the triggering query
It would be nice if they were looked at before the release and, similarly to those in (1), redirected to documentation if they are not bugs.
3. A number of legacy bugs were filed as a by-product of the feature testing: MDEV-33883MDEV-33885MDEV-33886MDEV-33890MDEV-33900MDEV-33902MDEV-33905
They are not directly related to the feature implemented in the scope of the task, but concern the old baseline functionality which this feature extends. As such, they limited the testing to some extent.
It is possible that most of them would also be ruled out as intended behavior, but I don't expect that anyone will look at them any time soon.
4. MTR coverage flagged 2 lines of the feature-related changes as not covered, even after running Galera suites with --big (line numbers as of 802e89b17):
The first line appears to be a false-positive, probably related to the way GCOV sometimes handles branches. There is however a question about validity of the line itself. The line is a part of the following fragment:
if ((tbl && tbl->s->table_category != TABLE_CATEGORY_STATISTICS) ||
So,if (!tbl && !is_stat_table(&tables->db, &tables->alias))) ever turns out to be true, there will be a big problem with the next line. I haven't hit this situation though, so hopefully it's just an excessive condition which is always false.
The second GCOV miss, line 1492, is real. Something like this in the context of Galera tests should cover it:
deletefrom mysql.wsrep_cluster;
or maybe this as it looks safer:
deletefrom mysql.wsrep_streaming_log;
5. main.userstat test fails on bb-11.5-MDEV-33152-index-statistics deterministically. The reason for the failure is the above-mentioned MDEV-33881. In other trees, e.g. bb-11.5-monty or bb-11.5-MDEV-33151-userstat, to avoid the failure, the test and result files were amended like this: change in main.userstat. So, if it's decided that MDEV-33881 is not to be fixed, then the test needs to be modified before the feature is merged into main. If MDEV-33881 is fixed to allow system tables again, hopefully it won't be necessary.
If the points above lead to non-trivial code changes, then another (short) round of testing may be needed. Otherwise I don't object releasing the feature with 11.5 RC.
Elena Stepanova
added a comment - Testing results:
1. Two bugs are filed as tentative blockers for the feature:
MDEV-33881 INDEX_STATISTICS skip system tables inconsistently
MDEV-33901 INDEX_STATISTICS.QUERIES is incremented additionally for subqueries
They should be looked at before the feature is released with RC. However, if as a result of the analysis they are determined to be not bugs or not critical enough to prevent the feature release, I won't dispute it. For "not bugs", please redirect the JIRA items to documentation. For "unimportant", please downgrade the issues in JIRA.
2. Two bugs are filed as not blocking the feature release:
MDEV-33903 For stored functions INDEX_STATISTICS.QUERIES only counts the top-most query
MDEV-33904 For triggers INDEX_STATISTICS.QUERIES only counts the triggering query
It would be nice if they were looked at before the release and, similarly to those in (1), redirected to documentation if they are not bugs.
3. A number of legacy bugs were filed as a by-product of the feature testing:
MDEV-33883 MDEV-33885 MDEV-33886 MDEV-33890 MDEV-33900 MDEV-33902 MDEV-33905
They are not directly related to the feature implemented in the scope of the task, but concern the old baseline functionality which this feature extends. As such, they limited the testing to some extent.
It is possible that most of them would also be ruled out as intended behavior, but I don't expect that anyone will look at them any time soon.
4. MTR coverage flagged 2 lines of the feature-related changes as not covered, even after running Galera suites with --big (line numbers as of 802e89b17 ):
===File sql/wsrep_mysqld.cc:
1472 : + (!tbl && !is_stat_table(&tables->db, &tables->alias)))
1492 : + !strcmp(tbl->s->db.str, "information_schema"));
The first line appears to be a false-positive, probably related to the way GCOV sometimes handles branches. There is however a question about validity of the line itself. The line is a part of the following fragment:
if ((tbl && tbl->s->table_category != TABLE_CATEGORY_STATISTICS) ||
(!tbl && !is_stat_table(&tables->db, &tables->alias)))
{
if (tbl->s->primary_key == MAX_KEY &&
So,if (!tbl && !is_stat_table(&tables->db, &tables->alias))) ever turns out to be true, there will be a big problem with the next line. I haven't hit this situation though, so hopefully it's just an excessive condition which is always false.
The second GCOV miss, line 1492, is real. Something like this in the context of Galera tests should cover it:
delete from mysql.wsrep_cluster;
or maybe this as it looks safer:
delete from mysql.wsrep_streaming_log;
5. main.userstat test fails on bb-11.5- MDEV-33152 -index-statistics deterministically. The reason for the failure is the above-mentioned MDEV-33881 . In other trees, e.g. bb-11.5-monty or bb-11.5- MDEV-33151 -userstat, to avoid the failure, the test and result files were amended like this: change in main.userstat . So, if it's decided that MDEV-33881 is not to be fixed, then the test needs to be modified before the feature is merged into main. If MDEV-33881 is fixed to allow system tables again, hopefully it won't be necessary.
If the points above lead to non-trivial code changes, then another (short) round of testing may be needed. Otherwise I don't object releasing the feature with 11.5 RC.
I am not sure if there could be a case where tbl is 0 and the table is a stat table. I tried to ask on Galera channel but did not get an answer, which is why I kept the logic as as the original code.
Michael Widenius
added a comment - Regarding the code:
if ((tbl && tbl->s->table_category != TABLE_CATEGORY_STATISTICS) ||
(!tbl && !is_stat_table(&tables->db, &tables->alias)))
This is an exact rework of the original code:
if (!is_stat_table(&tables->db, &tables->alias))
The original code would also crash if tbl is 0.
I am not sure if there could be a case where tbl is 0 and the table is a stat table. I tried to ask on Galera channel but did not get an answer, which is why I kept the logic as as the original code.
Fixes for MDEV-33881 and MDEV-33901 were pushed into bb-11.5-monty and cherry-picked into bb-11.5-MDEV-33152-index-statistics.
Note: The fix for MDEV-33881 was pushed into bb-11.5-monty as "squash 8372d62a863008ea6faa1547db5c275a5863f167", that is, as a postfix for MDEV-33151 rather than MDEV-33152. The bug MDEV-33881 was filed in the scope of MDEV-33152 testing; the fix semantically applies to both/either of MDEV-33151 and MDEV-33152; but the patch was causing conflicts when I was trying to apply it to bb-11.5-MDEV-33151-userstat, while it applied smoothly to bb-11.5-MDEV-33152-index-statistics, so I pushed it there.
I took a quick look without performing full re-testing, the patches seem to be doing what they are claimed to do, I think they can and should be incorporated.
However, it cannot be merged into 11.5 as is. The point (5) from my previous comment still applies: even though MDEV-33881 was fixed, it wasn't in the direction that would make the test failure go away, so main.userstat still fails deterministically. Either it needs to be pushed together with MDEV-33151 where the test was adjusted, or the adjustment should be applied to bb-11.5-MDEV-33152-index-statistics.
Elena Stepanova
added a comment - Fixes for MDEV-33881 and MDEV-33901 were pushed into bb-11.5-monty and cherry-picked into bb-11.5- MDEV-33152 -index-statistics.
Note:
The fix for MDEV-33881 was pushed into bb-11.5-monty as "squash 8372d62a863008ea6faa1547db5c275a5863f167", that is, as a postfix for MDEV-33151 rather than MDEV-33152 .
The bug MDEV-33881 was filed in the scope of MDEV-33152 testing; the fix semantically applies to both/either of MDEV-33151 and MDEV-33152 ; but the patch was causing conflicts when I was trying to apply it to bb-11.5- MDEV-33151 -userstat, while it applied smoothly to bb-11.5- MDEV-33152 -index-statistics, so I pushed it there.
I took a quick look without performing full re-testing, the patches seem to be doing what they are claimed to do, I think they can and should be incorporated.
The resulting commit is, as of now, bb-11.5-MDEV-33152-index-statistics 15930619 .
However, it cannot be merged into 11.5 as is . The point (5) from my previous comment still applies: even though MDEV-33881 was fixed, it wasn't in the direction that would make the test failure go away, so main.userstat still fails deterministically. Either it needs to be pushed together with MDEV-33151 where the test was adjusted, or the adjustment should be applied to bb-11.5- MDEV-33152 -index-statistics.
People
Sergei Golubchik
Michael Widenius
Votes:
0Vote for this issue
Watchers:
6Start 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":890.5,"ttfb":243.5,"pageVisibility":"visible","entityId":127118,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"bfab200f-9fdc-4c76-98c6-875dea5f0121","navigationType":0,"readyForUser":965.8999996185303,"redirectCount":0,"resourceLoadedEnd":1183.1000003814697,"resourceLoadedStart":249,"resourceTiming":[{"duration":165.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":249,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":249,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":414.19999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":165.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":249.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":249.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":414.5,"responseStart":0,"secureConnectionStart":0},{"duration":173.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":249.5,"connectEnd":249.5,"connectStart":249.5,"domainLookupEnd":249.5,"domainLookupStart":249.5,"fetchStart":249.5,"redirectEnd":0,"redirectStart":0,"requestStart":249.5,"responseEnd":423.3999996185303,"responseStart":423.3999996185303,"secureConnectionStart":249.5},{"duration":224.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":249.60000038146973,"connectEnd":249.60000038146973,"connectStart":249.60000038146973,"domainLookupEnd":249.60000038146973,"domainLookupStart":249.60000038146973,"fetchStart":249.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":249.60000038146973,"responseEnd":474.5,"responseStart":474.5,"secureConnectionStart":249.60000038146973},{"duration":228.4000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":249.89999961853027,"connectEnd":249.89999961853027,"connectStart":249.89999961853027,"domainLookupEnd":249.89999961853027,"domainLookupStart":249.89999961853027,"fetchStart":249.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":249.89999961853027,"responseEnd":478.30000019073486,"responseStart":478.30000019073486,"secureConnectionStart":249.89999961853027},{"duration":228.60000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":250,"connectEnd":250,"connectStart":250,"domainLookupEnd":250,"domainLookupStart":250,"fetchStart":250,"redirectEnd":0,"redirectStart":0,"requestStart":250,"responseEnd":478.6000003814697,"responseStart":478.6000003814697,"secureConnectionStart":250},{"duration":228.69999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":250.30000019073486,"connectEnd":250.30000019073486,"connectStart":250.30000019073486,"domainLookupEnd":250.30000019073486,"domainLookupStart":250.30000019073486,"fetchStart":250.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":250.30000019073486,"responseEnd":479,"responseStart":479,"secureConnectionStart":250.30000019073486},{"duration":314,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":250.39999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":250.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":564.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":228.89999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":250.60000038146973,"connectEnd":250.60000038146973,"connectStart":250.60000038146973,"domainLookupEnd":250.60000038146973,"domainLookupStart":250.60000038146973,"fetchStart":250.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":250.60000038146973,"responseEnd":479.5,"responseStart":479.5,"secureConnectionStart":250.60000038146973},{"duration":313.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":250.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":250.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":564.5,"responseStart":0,"secureConnectionStart":0},{"duration":229.10000038146973,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":250.89999961853027,"connectEnd":250.89999961853027,"connectStart":250.89999961853027,"domainLookupEnd":250.89999961853027,"domainLookupStart":250.89999961853027,"fetchStart":250.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":250.89999961853027,"responseEnd":480,"responseStart":480,"secureConnectionStart":250.89999961853027},{"duration":441.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":252,"connectEnd":252,"connectStart":252,"domainLookupEnd":252,"domainLookupStart":252,"fetchStart":252,"redirectEnd":0,"redirectStart":0,"requestStart":252,"responseEnd":693.6000003814697,"responseStart":693.6000003814697,"secureConnectionStart":252},{"duration":919.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":252.19999980926514,"connectEnd":252.19999980926514,"connectStart":252.19999980926514,"domainLookupEnd":252.19999980926514,"domainLookupStart":252.19999980926514,"fetchStart":252.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":252.19999980926514,"responseEnd":1171.8999996185303,"responseStart":1171.8999996185303,"secureConnectionStart":252.19999980926514},{"duration":120.19999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":575.8000001907349,"connectEnd":575.8000001907349,"connectStart":575.8000001907349,"domainLookupEnd":575.8000001907349,"domainLookupStart":575.8000001907349,"fetchStart":575.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":575.8000001907349,"responseEnd":696,"responseStart":696,"secureConnectionStart":575.8000001907349},{"duration":328,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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":844.6999998092651,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":844.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1172.6999998092651,"responseStart":0,"secureConnectionStart":0},{"duration":330.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/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":845.6000003814697,"connectEnd":845.6000003814697,"connectStart":845.6000003814697,"domainLookupEnd":845.6000003814697,"domainLookupStart":845.6000003814697,"fetchStart":845.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":845.6000003814697,"responseEnd":1176.5,"responseStart":1176.5,"secureConnectionStart":845.6000003814697},{"duration":337.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/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":846,"connectEnd":846,"connectStart":846,"domainLookupEnd":846,"domainLookupStart":846,"fetchStart":846,"redirectEnd":0,"redirectStart":0,"requestStart":846,"responseEnd":1183.1000003814697,"responseStart":1183.1000003814697,"secureConnectionStart":846},{"duration":404.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":884.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":884.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1288.8000001907349,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":50,"responseStart":244,"responseEnd":246,"domLoading":247,"domInteractive":1205,"domContentLoadedEventStart":1205,"domContentLoadedEventEnd":1249,"domComplete":1470,"loadEventStart":1471,"loadEventEnd":1471,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1173.6999998092651},{"name":"bigPipe.sidebar-id.end","time":1174.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":1174.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1176.8999996185303},{"name":"activityTabFullyLoaded","time":1300.8999996185303}],"measures":[],"correlationId":"55ef76c83265a1","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":135,"dbReadsTimeInMs":26,"dbConnsTimeInMs":37,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
to test this feature separately please use bb-11.5-
MDEV-33152-index-statistics