mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-03 04:52:10 +00:00
try fix synchronization check
This commit is contained in:
parent
789a6022c5
commit
b9fdc49e1a
@ -1,7 +1,10 @@
|
||||
#include <Databases/MySQL/MaterializeMetadata.h>
|
||||
|
||||
#if USE_MYSQL
|
||||
|
||||
#include <Core/Block.h>
|
||||
#include <DataTypes/DataTypeString.h>
|
||||
#include <DataTypes/DataTypesNumber.h>
|
||||
#include <Databases/MySQL/MaterializeMetadata.h>
|
||||
#include <Formats/MySQLBlockInputStream.h>
|
||||
#include <IO/ReadBufferFromFile.h>
|
||||
#include <IO/WriteBufferFromFile.h>
|
||||
@ -206,3 +209,5 @@ MaterializeMetadata::MaterializeMetadata(
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,5 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(ARCADIA_BUILD)
|
||||
# include "config_core.h"
|
||||
#endif
|
||||
|
||||
#if USE_MYSQL
|
||||
|
||||
#include <Core/Types.h>
|
||||
#include <Core/MySQLReplication.h>
|
||||
#include <mysqlxx/Connection.h>
|
||||
@ -42,3 +48,4 @@ struct MaterializeMetadata
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -3,6 +3,7 @@
|
||||
#endif
|
||||
|
||||
#include <Interpreters/InterpreterExternalDDLQuery.h>
|
||||
#include <Interpreters/Context.h>
|
||||
|
||||
#include <Parsers/IAST.h>
|
||||
#include <Parsers/ASTDropQuery.h>
|
||||
@ -11,7 +12,6 @@
|
||||
#include <Parsers/ASTExternalDDLQuery.h>
|
||||
|
||||
#ifdef USE_MYSQL
|
||||
# include <Interpreters/Context.h>
|
||||
# include <Interpreters/MySQL/InterpretersMySQLDDLQuery.h>
|
||||
# include <Parsers/MySQL/ASTAlterQuery.h>
|
||||
# include <Parsers/MySQL/ASTCreateQuery.h>
|
||||
|
@ -165,7 +165,7 @@ static inline std::tuple<NamesAndTypesList, NamesAndTypesList, NamesAndTypesList
|
||||
if (options->changes.count("primary_key"))
|
||||
primary_keys->arguments->children.emplace_back(std::make_shared<ASTIdentifier>(declare_column->name));
|
||||
|
||||
if (options->changes.contains("auto_increment"))
|
||||
if (options->changes.count("auto_increment"))
|
||||
increment_columns.emplace(declare_column->name);
|
||||
}
|
||||
}
|
||||
@ -272,10 +272,10 @@ static ASTPtr getOrderByPolicy(
|
||||
|
||||
for (const auto & [name, type] : names_and_types)
|
||||
{
|
||||
if (order_by_columns_set.contains(name))
|
||||
if (order_by_columns_set.count(name))
|
||||
continue;
|
||||
|
||||
if (increment_columns.contains(name))
|
||||
if (increment_columns.count(name))
|
||||
{
|
||||
increment_keys.emplace_back(name);
|
||||
order_by_columns_set.emplace(name);
|
||||
|
@ -16,12 +16,11 @@
|
||||
|
||||
using namespace DB;
|
||||
|
||||
static inline ASTPtr tryRewrittenCreateQuery(const String & query, const Context & context_)
|
||||
static inline ASTPtr tryRewrittenCreateQuery(const String & query, const Context & context)
|
||||
{
|
||||
ParserExternalDDLQuery external_ddl_parser;
|
||||
ASTPtr ast = parseQuery(external_ddl_parser, query, 0, 0);
|
||||
|
||||
Context context = context_;
|
||||
return MySQLInterpreter::InterpreterCreateImpl::getRewrittenQuery(
|
||||
*ast->as<ASTExternalDDLQuery>()->external_ddl->as<MySQLParser::ASTCreateQuery>(),
|
||||
context, "test_database", "test_database");
|
||||
|
Loading…
Reference in New Issue
Block a user