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

Function tryToExecuteQuery

src/Databases/MySQL/MaterializeMySQLSyncThread.cpp:45–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43static constexpr auto MYSQL_BACKGROUND_THREAD_NAME = "MySQLDBSync";
44
45static BlockIO tryToExecuteQuery(const String & query_to_execute, ContextMutablePtr query_context, const String & database, const String & comment)
46{
47 try
48 {
49 if (!database.empty())
50 query_context->setCurrentDatabase(database);
51
52 return executeQuery("/*" + comment + "*/ " + query_to_execute, query_context, true);
53 }
54 catch (...)
55 {
56 tryLogCurrentException(
57 &Poco::Logger::get("MaterializeMySQLSyncThread(" + database + ")"),
58 "Query " + query_to_execute + " wasn't finished successfully");
59 throw;
60 }
61}
62
63MaterializeMySQLSyncThread::~MaterializeMySQLSyncThread()
64{

Callers 4

getTableOutputFunction · 0.70
iterateMethod · 0.50
getNeedRepairGransMethod · 0.50
waitForNoDuplicationMethod · 0.50

Calls 5

tryLogCurrentExceptionFunction · 0.85
setCurrentDatabaseMethod · 0.80
executeQueryFunction · 0.50
getFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected