fix(mysql): keep leading spaces in compatible catalog column names

This commit is contained in:
zipg authored and GitHub committed 2026-09-20 14:13:00 +08:00
1 parent f57299f2fa
commit c7ffb7b8f1
2 files changed
+101 -2

No files matched your search

@@ -189,8 +189,10 @@ pub async fn get_columns_show_from(
Ok(rows
.iter()
.filter_map(|row| {
let name = get_str_by_name(row, "Field").trim().to_string();
if name.is_empty() {
// MySQL allows leading/trailing spaces in column names, so keep the name verbatim
// and only drop rows whose name is blank, matching `mysql_column_name` in mysql.rs.
let name = get_str_by_name(row, "Field");
if name.trim().is_empty() {
return None;
}
let key = get_str_by_name(row, "Key");