| 43 | static constexpr auto MYSQL_BACKGROUND_THREAD_NAME = "MySQLDBSync"; |
| 44 | |
| 45 | static 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 | |
| 63 | MaterializeMySQLSyncThread::~MaterializeMySQLSyncThread() |
| 64 | { |
no test coverage detected