Summary: | QA: the sysprefs.sql is not correctly sorted | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Test Suite | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Galen Charlton <gmcharlt> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | fridolin.somers, kyle |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 11562: sysprefs.sql is not correctly sorted.
[SIGNED OFF] Bug 11562: sysprefs.sql is not correctly sorted. Bug 11562: sysprefs.sql is not correctly sorted. |
Description
Jonathan Druart
2014-01-15 15:27:43 UTC
Created attachment 24409 [details] [review] Bug 11562: sysprefs.sql is not correctly sorted. The QA tools does not manage to catch error sorting on the sysprefs.sql file if it is already bad sorted. This patch tidies up the sysprefs file. This one needs a quick push. Created attachment 25392 [details] [review] [SIGNED OFF] Bug 11562: sysprefs.sql is not correctly sorted. The QA tools does not manage to catch error sorting on the sysprefs.sql file if it is already bad sorted. This patch tidies up the sysprefs file. TEST PLAN --------- 0) Back up your system preferences table. 1) check out master 2) Use your koha database, and then: DELETE FROM systempreferences; SOURCE ~/kohaclone/installer/data/mysql/sysprefs.sql 3) suspend your mysql client and type something similar to: mysql -u root -p -e 'USE kohadata;SELECT * from systempreferences ORDER BY Variable;' > ~/master_sysprefs 4) apply the patch 5) foreground your mysql client, and then: DELETE FROM systempreferences; SOURCE ~/kohaclone/installer/data/mysql/sysprefs.sql 6) suspend your mysql client and type something similar to: mysql -u root -p -e 'USE kohadata;SELECT * from systempreferences ORDER BY Variable;' > ~/11562_sysprefs 7) foreground your mysql client and quit 8) Take a diff, they should be identical diff ~/master_sysprefs ~/11562_sysprefs NOTE: You can't use your own system preferences values, because upgrades and changed values would require a lot of time to compare the results. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Created attachment 25533 [details] [review] Bug 11562: sysprefs.sql is not correctly sorted. The QA tools does not manage to catch error sorting on the sysprefs.sql file if it is already bad sorted. This patch tidies up the sysprefs file. TEST PLAN --------- 0) Back up your system preferences table. 1) check out master 2) Use your koha database, and then: DELETE FROM systempreferences; SOURCE ~/kohaclone/installer/data/mysql/sysprefs.sql 3) suspend your mysql client and type something similar to: mysql -u root -p -e 'USE kohadata;SELECT * from systempreferences ORDER BY Variable;' > ~/master_sysprefs 4) apply the patch 5) foreground your mysql client, and then: DELETE FROM systempreferences; SOURCE ~/kohaclone/installer/data/mysql/sysprefs.sql 6) suspend your mysql client and type something similar to: mysql -u root -p -e 'USE kohadata;SELECT * from systempreferences ORDER BY Variable;' > ~/11562_sysprefs 7) foreground your mysql client and quit 8) Take a diff, they should be identical diff ~/master_sysprefs ~/11562_sysprefs NOTE: You can't use your own system preferences values, because upgrades and changed values would require a lot of time to compare the results. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master, although as you can probably see from the comment I made in the commit message, I would suggest that it is a good idea to not lose perspective on the difference between a minor convention meant to reduce the chance of merge conflicts as opposed to an actual error. Thanks, Jonathan. (In reply to Galen Charlton from comment #5) > Pushed to master, although as you can probably see from the comment I made > in the commit message, I would suggest that it is a good idea to not lose > perspective on the difference between a minor convention meant to reduce the > chance of merge conflicts as opposed to an actual error. Galen, Yes I completely agree, it is not an "error". The (small) problem occurs when the file is already badly sorted. In this case, the qa script doesn't catch a patch introducing a line in the wrong place. This means if a pref is added at the end of the file (as we previously did), there is no warning. Pushed to 3.14.x, will be in 3.14.07 |