MCPcopy Create free account
hub / github.com/ByConity/ByConity / createTable

Function createTable

src/Databases/MySQL/MaterializedMySQLSyncThreadManager.cpp:187–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187static void createTable(const String & database_name, const String & query_str, const ContextPtr context)
188{
189 auto query_context = MaterializedMySQL::createQueryContext(context);
190 auto txn = createTransactionForMySQL(context);
191 SCOPE_EXIT({
192 if (txn)
193 context->getCnchTransactionCoordinator().finishTransaction(txn);
194 });
195
196 query_context->setCurrentTransaction(txn);
197
198 String comment = "Materialize MySQL step 1: execute MySQL DDL for dump data";
199 tryToExecuteQuery(query_str, query_context, database_name, comment); /// create table.
200}
201
202static inline void dumpDataForTables(
203 mysqlxx::Pool::Entry & connection, const std::unordered_map<String, String> & need_dumping_tables,

Callers 4

dumpDataForTablesFunction · 0.70
createTableMethod · 0.70
createTableMethod · 0.50
createTableMethod · 0.50

Calls 5

createQueryContextFunction · 0.85
setCurrentTransactionMethod · 0.80
tryToExecuteQueryFunction · 0.70
finishTransactionMethod · 0.45

Tested by

no test coverage detected