Repository navigation
sql: lowercase existing zone names once - #88
Merged
Merged
Conversation
Zone names are matched exactly in their canonical form, lowercase without the trailing dot. 2.x keeps the case it is given, so a zone it stored in capitals couldn't be found by its name and didn't block a second zone of that name. sql/upgrade/07 rewrites those names, keeping last_modified. A live zone whose canonical name another live zone already has is left alone and listed for an admin to resolve.
NicTool/NicTool#373 makes 2.x store zone names lowercase and adds the same rewrite as upgrade 2.42. api/sql tracks the 2.x schema, so a new install declares 2.42.
The report selected live names still not canonical, so it showed the spelling the rewrite skipped but not the zone it collides with, and nothing for two live zones already spelled the same. It now lists every live member of a name more than one live zone shares, before the temporary table is dropped.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #84, zone names are stored and matched as
zone = ?in canonical form: lowercase, without the trailing dot. 2.x keeps the case it's given, so a zone it stored asVINSCRIPT.COMcan't be found by name and doesn't block a newvinscript.com.sql/upgrade/07_lowercase_zone_names.sqlrewrites each such name once.last_modifiedis kept, so the zone doesn't read as edited.sql/schema.test.jscovers capitals, a trailing dot, a live pair that would collide, a deleted zone beside a live one,last_modified, and a re-run.NicTool/NicTool#373 makes 2.x store new names lowercase and adds the same rewrite as its upgrade 2.42. To match,
sql/12_nt_options.sqlnow declaresdb_version2.42.