to MaterializedMySQL_improvement_bug_fix-fix codestyle

This commit is contained in:
zzsmdfj 2022-11-11 10:44:16 +08:00
parent eeb9c57c59
commit d4e270b522
3 changed files with 13 additions and 7 deletions

View File

@ -119,7 +119,7 @@ namespace MySQLReplication
else if (query.starts_with("SAVEPOINT") || query.starts_with("ROLLBACK") else if (query.starts_with("SAVEPOINT") || query.starts_with("ROLLBACK")
|| query.starts_with("RELEASE SAVEPOINT")) || query.starts_with("RELEASE SAVEPOINT"))
{ {
typ = QUERY_EVENT_OTHER; typ = QUERY_SAVEPOINT;
} }
} }
@ -942,8 +942,8 @@ namespace MySQLReplication
{ {
case QUERY_EVENT_MULTI_TXN_FLAG: case QUERY_EVENT_MULTI_TXN_FLAG:
case QUERY_EVENT_XA: case QUERY_EVENT_XA:
/// Ignore queries that have no impact on the data /// Ignore queries that have no impact on the data.
case QUERY_EVENT_OTHER: case QUERY_SAVEPOINT:
{ {
event = std::make_shared<DryRunEvent>(std::move(query->header)); event = std::make_shared<DryRunEvent>(std::move(query->header));
break; break;

View File

@ -369,7 +369,7 @@ namespace MySQLReplication
QUERY_EVENT_DDL = 0, QUERY_EVENT_DDL = 0,
QUERY_EVENT_MULTI_TXN_FLAG = 1, QUERY_EVENT_MULTI_TXN_FLAG = 1,
QUERY_EVENT_XA = 2, QUERY_EVENT_XA = 2,
QUERY_EVENT_OTHER = 3 QUERY_SAVEPOINT = 3
}; };
class QueryEvent : public EventBase class QueryEvent : public EventBase

View File

@ -875,9 +875,15 @@ def alter_rename_table_with_materialized_mysql_database(
"1\n2\n3\n4\n5\n", "1\n2\n3\n4\n5\n",
) )
mysql_node.query("ALTER TABLE test_database_rename_table.test_table_4 RENAME test_database_rename_table.test_table_5") mysql_node.query(
mysql_node.query("ALTER TABLE test_database_rename_table.test_table_5 RENAME TO test_database_rename_table.test_table_6") + "ALTER TABLE test_database_rename_table.test_table_4 RENAME test_database_rename_table.test_table_5"
mysql_node.query("ALTER TABLE test_database_rename_table.test_table_6 RENAME AS test_database_rename_table.test_table_7") + )
mysql_node.query(
+ "ALTER TABLE test_database_rename_table.test_table_5 RENAME TO test_database_rename_table.test_table_6"
+ )
mysql_node.query(
+ "ALTER TABLE test_database_rename_table.test_table_6 RENAME AS test_database_rename_table.test_table_7"
+ )
check_query( check_query(
clickhouse_node, clickhouse_node,