mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-23 13:51:31 +00:00
fix: prevent slice panic on multi-byte UTF-8 in DDL log truncation
This commit is contained in:
@@ -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