Merge pull request #29857 from azat/system-tables-diff-check

Fix system tables recreation check (fails to detect changes in enum values)
This commit is contained in:
Maksim Kita 2021-10-07 23:57:43 +03:00 committed by GitHub
commit 651c725595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -527,7 +527,7 @@ void SystemLog<LogElement>::prepareTable()
auto alias_columns = LogElement::getNamesAndAliases();
auto current_query = InterpreterCreateQuery::formatColumns(ordinary_columns, alias_columns);
if (old_query->getTreeHash() != current_query->getTreeHash())
if (serializeAST(*old_query) != serializeAST(*current_query))
{
/// Rename the existing table.
int suffix = 0;