fix: prevent slice panic on multi-byte UTF-8 in DDL log truncation
This commit is contained in:
1 parent
0887b96236
commit
36374edfc2
1 file changed
+1
-1
@@ -2146,7 +2146,7 @@ where
|
||||
source_db_type,
|
||||
table_comment.as_deref(),
|
||||
);
|
||||
log::info!("[transfer] creating target table: {}", &ddl[..ddl.len().min(200)]);
|
||||
log::info!("[transfer] creating target table: {}", ddl.chars().take(200).collect::<String>());
|
||||
let table_exists = match execute_on_pool(state, target_pool_key, &ddl).await {
|
||||
Ok(_) => true,
|
||||
Err(e) => {
|
||||
|
||||
Reference in new issue
Block a user