Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dictionary name (RELOAD and system.dictionaries) after DETACH/ATTACH #10415

Merged

Conversation

azat
Copy link
Collaborator

@azat azat commented Apr 21, 2020

Changelog category (leave one):

  • Bug Fix

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix dictionary name (RELOAD and system.dictionaries) after DETACH/ATTACH

Detailed description / Documentation draft:

After DETACH/ATTACH (or at server startup) the following will be broken:
- SYSTEM RELOAD DICTIONARY db_name.dict_name
- system.dictionaries will not have database for those dictionaries

The problem is that after DETACH/ATTACH the dictionary information is
obtained from metadata/$db/$dict.sql, but it does not have database
name.

Fix this by passing database name to the getDictionaryConfigurationFromAST().

Introduced-in: #10234 (yet another fix for dictionaries loading)
Cc: @vitlibar

This is the case when the server is starting.
After DETACH/ATTACH (or at server startup) the following will be broken:
- SYSTEM RELOAD DICTIONARY db_name.dict_name
- system.dictionaries will not have database for those dictionaries

The problem is that after DETACH/ATTACH the dictionary information is
obtained from metadata/$db/$dict.sql, but it does not have database
name.

Fix this by passing database name to the getDictionaryConfigurationFromAST().

Introduced-in: ClickHouse#10234
@azat
Copy link
Collaborator Author

azat commented Apr 21, 2020

ClickHouse build check — 15/16 builds are OK

AFAICS the clang [readability-*] was not introduced by this PR

@alexey-milovidov alexey-milovidov merged commit eb0a1ec into ClickHouse:master Apr 22, 2020
@azat azat deleted the dict-load-after-detach-attach branch April 22, 2020 06:50
@CurtizJ CurtizJ added pr-bugfix Pull request with bugfix, not backported by default pr-no-backport labels Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix Pull request with bugfix, not backported by default pr-no-backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants