<serg> in 10.1 there are now sys_vars.sysvar_* tests they list all system variables and their metadata
<serg> this is, obviously, pretty fragile, I've split them in debug/non-debug, embedded, and created rdiffs for xtradb/innodb, 64bit/32bit, etc
<serg> and simply disabled some of them for valgrind or non-debug builds
<serg> still they require a lot of maintenance. Like after bug changes I need to build 32-bit version to update 32-bit rdiffs, and often do the same on windows etc
<serg> I wonder whether you can manage to optimize them somehow (what should rdiff, what should be .result, where they should be simply disabled, etc)
<serg> so that they won't break that often or that rdiffs apply cleanly?
<serg> like mysqld--help test, rdiff for windows almost always just works, it's enough to update the result on linux
<serg> that's not particularly urgent, I'll keep updating tests manually anyway
<serg> but I've spent too much time on it already and mostly out of ideas now
<serg> that's one of the new features in 10.1 that I've recently pushed
<serg> INFORMATION_SCHEMA.SYSTEM_VARIABLES table: https://mariadb.com/kb/eninformation-schema-system_variables-table/
<elenst> Do you expect it to be so useful that it's worth the trouble?
<serg> the feature - yes, absolutely. tests? I don't know, really, perhaps disabling them isn't that bad
<serg> I'd like to have this feature tested, but it doesn't need to list all variables, I agree
Now, back to comparison with mysqld--help, which mostly works smoothly with its windows rdiff.
It turns out mysqld--help does exactly the same that I did in my "radical" solution. Only it does it much thicker, it just unconditionally replaces all "32-bit-looking" values with the corresponding "64-bit-looking" values, and also suppresses some inconvenient variables completely. Still, it has to have the windows rdiff because for Windows it's not just about different values, there are some variables that only exist on Windows, and some that do not exist on Windows. So, again, it correlates with my existing ugly solution, where I get rid of 32-bit rdiffs, but introduce win rdiffs instead. And of course, xtradb rdiff will have to stay as well.
So, my conclusion is this: we cannot target only mature versions with these tests, and maintaining them on early releases is real pain (I had a chance to feel it while working on this). So, the radical solution wins, I am going to get back to it, maybe will be able to make it somewhat less ugly.
But even then, adding or removing variables can break the context of remaining rdiffs. It happens with mysqld--help as well (for example, see 55e99b29339dae833448ded6d0ca3d31f673d02a); only, without plugin variables it happens rarely. We are going to have this problem with our XtraDB rdiff much more often. When other problems are solved, I will need to get back to this one.
Elena Stepanova
added a comment - - edited Now, back to comparison with mysqld--help, which mostly works smoothly with its windows rdiff.
It turns out mysqld--help does exactly the same that I did in my "radical" solution. Only it does it much thicker, it just unconditionally replaces all "32-bit-looking" values with the corresponding "64-bit-looking" values, and also suppresses some inconvenient variables completely. Still, it has to have the windows rdiff because for Windows it's not just about different values, there are some variables that only exist on Windows, and some that do not exist on Windows. So, again, it correlates with my existing ugly solution, where I get rid of 32-bit rdiffs, but introduce win rdiffs instead. And of course, xtradb rdiff will have to stay as well.
So, my conclusion is this: we cannot target only mature versions with these tests, and maintaining them on early releases is real pain (I had a chance to feel it while working on this). So, the radical solution wins, I am going to get back to it, maybe will be able to make it somewhat less ugly.
But even then, adding or removing variables can break the context of remaining rdiffs. It happens with mysqld--help as well (for example, see 55e99b29339dae833448ded6d0ca3d31f673d02a); only, without plugin variables it happens rarely. We are going to have this problem with our XtraDB rdiff much more often. When other problems are solved, I will need to get back to this one.
Second solution (attached as mdev6887-2.patch) does type and value replacements unconditionally. It's mysqld--help style, which is of course not very precise.
Additional logic for InnoDB version number.
32-bit rdiffs are removed, Windows rdiffs are introduced.
I tried 10.1.1=>10.1.2=>10.1.3=>10.1.4=>10.1.5=>10.1.6 upgrade to see how much maintenance problems it solves.
10.1.1 => 10.1.2
Linux:
server, innodb, xtradb fail
after updating results => xtradb fails (mismatches, rdiff applies smoothly)
Windows (after fixing Linux tests):
server fails (1 hunk, broken context), debug does not build, can't check the rest
10.1.2 => 10.1.3
Linux:
all fail (additions, changes)
after updating results => xtradb fails (1 hunk, broken context)
Windows:
debug and innodb fail (broken context, maybe in the previous version too)
10.1.3 => 10.1.4
Linux:
aria passes, other fail
after updating results => xtradb fails, 2 hunks, broken context
So, only in the last 2 versions all rdiffs worked smoothly, previously they needed to be re-created. Sometimes it's inevitable, when changes affect variables directly covered by rdiffs; but more often it's about the context, neighboring variables get changed, so the hunks cannot be applied.
Elena Stepanova
added a comment - Second solution (attached as mdev6887-2.patch) does type and value replacements unconditionally. It's mysqld--help style, which is of course not very precise.
Additional logic for InnoDB version number.
32-bit rdiffs are removed, Windows rdiffs are introduced.
I tried 10.1.1=>10.1.2=>10.1.3=>10.1.4=>10.1.5=>10.1.6 upgrade to see how much maintenance problems it solves.
10.1.1 => 10.1.2
Linux:
server, innodb, xtradb fail
after updating results => xtradb fails (mismatches, rdiff applies smoothly)
Windows (after fixing Linux tests):
server fails (1 hunk, broken context), debug does not build, can't check the rest
10.1.2 => 10.1.3
Linux:
all fail (additions, changes)
after updating results => xtradb fails (1 hunk, broken context)
Windows:
debug and innodb fail (broken context, maybe in the previous version too)
10.1.3 => 10.1.4
Linux:
aria passes, other fail
after updating results => xtradb fails, 2 hunks, broken context
Windows:
debug and xtradb fail (broken context)
10.1.4 => 10.1.5
Linux:
server and wsrep fail
Windows:
okay
10.1.5 => 10.1.6
Linux:
wsrep, server, innodb, xtradb failed (additions, changes)
after updating result files: okay
WIndows:
okay
So, only in the last 2 versions all rdiffs worked smoothly, previously they needed to be re-created. Sometimes it's inevitable, when changes affect variables directly covered by rdiffs; but more often it's about the context, neighboring variables get changed, so the hunks cannot be applied.
If it's often about the context, this can be fixed, I guess. We can make sure the context never changes. Either by having less context (diff -U1 for example), or by providing constant context:
Sergei Golubchik
added a comment - If it's often about the context, this can be fixed, I guess. We can make sure the context never changes. Either by having less context ( diff -U1 for example), or by providing constant context:
select '' as before1, '' as before2, '' as before3, *, '' as after1, '' as after2, '' as after3 from
Yes, I've been thinking about both possibilities.
I don't think we can afford -U1. I don't know all dark magic of patch, but it appears to me that -U1 might do more harm than good. With the current rdiffs, I'm almost certain it would. Here is a typical hunk:
@@ -144,7 +144,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
NUMERIC_MIN_VALUE 4096
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
So, 1-line context would make it completely indistinguishable; and line numbers alone cannot be enough, because they change even more often than the context.
If we get rid of 32-bit rdiffs, there will be less examples like that, but they still exist:
@@ -1021,7 +1021,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_CRYPT
SESSION_VALUE NULL
-GLOBAL_VALUE YES
+GLOBAL_VALUE NO
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
For the second solution, again my lack of expertise in patch magic does not allow me to be sure, but I suspect patches which add variables will fail miserably, because they won't know where exactly to add them.
I was going to experiment with both, but I start having a suspicion that some context problems might stay unavoidable.
Elena Stepanova
added a comment - - edited Yes, I've been thinking about both possibilities.
I don't think we can afford -U1. I don't know all dark magic of patch , but it appears to me that -U1 might do more harm than good. With the current rdiffs, I'm almost certain it would. Here is a typical hunk:
@@ -144,7 +144,7 @@
VARIABLE_TYPE BIGINT UNSIGNED
VARIABLE_COMMENT The size of the transactional cache for updates to transactional engines for the binary log. If you often use transactions containing many statements, you can increase this to get more performance
NUMERIC_MIN_VALUE 4096
-NUMERIC_MAX_VALUE 18446744073709551615
+NUMERIC_MAX_VALUE 4294967295
NUMERIC_BLOCK_SIZE 4096
ENUM_VALUE_LIST NULL
READ_ONLY NO
So, 1-line context would make it completely indistinguishable; and line numbers alone cannot be enough, because they change even more often than the context.
If we get rid of 32-bit rdiffs, there will be less examples like that, but they still exist:
@@ -1021,7 +1021,7 @@
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME HAVE_CRYPT
SESSION_VALUE NULL
-GLOBAL_VALUE YES
+GLOBAL_VALUE NO
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NULL
VARIABLE_SCOPE GLOBAL
For the second solution, again my lack of expertise in patch magic does not allow me to be sure, but I suspect patches which add variables will fail miserably, because they won't know where exactly to add them.
I was going to experiment with both, but I start having a suspicion that some context problems might stay unavoidable.
On a separate note, performance_schema variables should probably be extracted into their own test, because as it is now, the test should fail if the server is compiled without P_S.
Elena Stepanova
added a comment - On a separate note, performance_schema variables should probably be extracted into their own test, because as it is now, the test should fail if the server is compiled without P_S.
People
Elena Stepanova
Elena Stepanova
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":2079.800000190735,"ttfb":668.3000001907349,"pageVisibility":"visible","entityId":46226,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"df957228-7a35-462e-b241-af110290541d","navigationType":0,"readyForUser":2176.800000190735,"redirectCount":0,"resourceLoadedEnd":1816.8000001907349,"resourceLoadedStart":690.7000002861023,"resourceTiming":[{"duration":266.3999996185303,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":690.7000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":690.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":957.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":266.90000009536743,"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":691,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":691,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":957.9000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":834.7999997138977,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":691.2000002861023,"connectEnd":691.2000002861023,"connectStart":691.2000002861023,"domainLookupEnd":691.2000002861023,"domainLookupStart":691.2000002861023,"fetchStart":691.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":969.3000001907349,"responseEnd":1526,"responseStart":1018.7000002861023,"secureConnectionStart":691.2000002861023},{"duration":1098,"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":691.3000001907349,"connectEnd":691.3000001907349,"connectStart":691.3000001907349,"domainLookupEnd":691.3000001907349,"domainLookupStart":691.3000001907349,"fetchStart":691.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":969.7000002861023,"responseEnd":1789.3000001907349,"responseStart":1021.9000000953674,"secureConnectionStart":691.3000001907349},{"duration":333.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":691.5,"connectEnd":691.5,"connectStart":691.5,"domainLookupEnd":691.5,"domainLookupStart":691.5,"fetchStart":691.5,"redirectEnd":0,"redirectStart":0,"requestStart":969.9000000953674,"responseEnd":1024.8000001907349,"responseStart":1021.4000000953674,"secureConnectionStart":691.5},{"duration":337.3999996185303,"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":691.7000002861023,"connectEnd":691.7000002861023,"connectStart":691.7000002861023,"domainLookupEnd":691.7000002861023,"domainLookupStart":691.7000002861023,"fetchStart":691.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":970,"responseEnd":1029.0999999046326,"responseStart":1025.7000002861023,"secureConnectionStart":691.7000002861023},{"duration":336.90000009536743,"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":691.9000000953674,"connectEnd":691.9000000953674,"connectStart":691.9000000953674,"domainLookupEnd":691.9000000953674,"domainLookupStart":691.9000000953674,"fetchStart":691.9000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":970.0999999046326,"responseEnd":1028.8000001907349,"responseStart":1025.2000002861023,"secureConnectionStart":691.9000000953674},{"duration":273.2000002861023,"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":692.0999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":692.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":965.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":340.59999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":692.3000001907349,"connectEnd":692.3000001907349,"connectStart":692.3000001907349,"domainLookupEnd":692.3000001907349,"domainLookupStart":692.3000001907349,"fetchStart":692.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":972.9000000953674,"responseEnd":1032.9000000953674,"responseStart":1030.5999999046326,"secureConnectionStart":692.3000001907349},{"duration":273.69999980926514,"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":692.4000000953674,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":692.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":966.0999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":366.7000002861023,"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":692.5999999046326,"connectEnd":692.5999999046326,"connectStart":692.5999999046326,"domainLookupEnd":692.5999999046326,"domainLookupStart":692.5999999046326,"fetchStart":692.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":976.9000000953674,"responseEnd":1059.3000001907349,"responseStart":1034.2000002861023,"secureConnectionStart":692.5999999046326},{"duration":1122.0999999046326,"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":693.4000000953674,"connectEnd":693.4000000953674,"connectStart":693.4000000953674,"domainLookupEnd":693.4000000953674,"domainLookupStart":693.4000000953674,"fetchStart":693.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1158.8000001907349,"responseEnd":1815.5,"responseStart":1796.4000000953674,"secureConnectionStart":693.4000000953674},{"duration":1114,"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":702.8000001907349,"connectEnd":702.8000001907349,"connectStart":702.8000001907349,"domainLookupEnd":702.8000001907349,"domainLookupStart":702.8000001907349,"fetchStart":702.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1383.9000000953674,"responseEnd":1816.8000001907349,"responseStart":1803.9000000953674,"secureConnectionStart":702.8000001907349},{"duration":254.69999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1678.3000001907349,"connectEnd":1678.3000001907349,"connectStart":1678.3000001907349,"domainLookupEnd":1678.3000001907349,"domainLookupStart":1678.3000001907349,"fetchStart":1678.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1896.7000002861023,"responseEnd":1933,"responseStart":1929.2000002861023,"secureConnectionStart":1678.3000001907349}],"fetchStart":1,"domainLookupStart":466,"domainLookupEnd":474,"connectStart":475,"connectEnd":493,"secureConnectionStart":482,"requestStart":494,"responseStart":669,"responseEnd":689,"domLoading":688,"domInteractive":2264,"domContentLoadedEventStart":2265,"domContentLoadedEventEnd":2332,"domComplete":2749,"loadEventStart":2749,"loadEventEnd":2750,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2223.7000002861023},{"name":"bigPipe.sidebar-id.end","time":2224.7000002861023},{"name":"bigPipe.activity-panel-pipe-id.start","time":2224.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":2228.4000000953674},{"name":"activityTabFullyLoaded","time":2367}],"measures":[],"correlationId":"e03076aea09228","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":105,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
Now, back to comparison with mysqld--help, which mostly works smoothly with its windows rdiff.
It turns out mysqld--help does exactly the same that I did in my "radical" solution. Only it does it much thicker, it just unconditionally replaces all "32-bit-looking" values with the corresponding "64-bit-looking" values, and also suppresses some inconvenient variables completely. Still, it has to have the windows rdiff because for Windows it's not just about different values, there are some variables that only exist on Windows, and some that do not exist on Windows. So, again, it correlates with my existing ugly solution, where I get rid of 32-bit rdiffs, but introduce win rdiffs instead. And of course, xtradb rdiff will have to stay as well.
So, my conclusion is this: we cannot target only mature versions with these tests, and maintaining them on early releases is real pain (I had a chance to feel it while working on this). So, the radical solution wins, I am going to get back to it, maybe will be able to make it somewhat less ugly.
But even then, adding or removing variables can break the context of remaining rdiffs. It happens with mysqld--help as well (for example, see 55e99b29339dae833448ded6d0ca3d31f673d02a); only, without plugin variables it happens rarely. We are going to have this problem with our XtraDB rdiff much more often. When other problems are solved, I will need to get back to this one.