Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

fix(manticore): correct index metadata query syntax

Guoyu Su7457fd2930c2
diff --git a/crates/dbx-driver-mysql/src/manticoresearch.rs b/crates/dbx-driver-mysql/src/manticoresearch.rs
index dd1418c73a..a6d6034cc9 100644
--- a/crates/dbx-driver-mysql/src/manticoresearch.rs
+++ b/crates/dbx-driver-mysql/src/manticoresearch.rs
@@ -185,7 +185,7 @@ pub async fn list_indexes(pool: &MySqlPool, table: &str) -> Result<Vec<IndexInfo
}
fn list_indexes_sql(table: &str) -> String {
- format!("SHOW TABLE INDEXES FROM {}", quote_identifier(table))
+ format!("SHOW TABLE {} INDEXES", quote_identifier(table))
}
fn index_info_from_row(row: &mysql_async::Row) -> IndexInfo {
@@ -248,8 +248,8 @@ mod tests {
#[test]
fn indexes_sql_uses_show_table_indexes() {
- assert_eq!(list_indexes_sql("materials"), "SHOW TABLE INDEXES FROM `materials`");
- assert_eq!(list_indexes_sql("odd`name"), "SHOW TABLE INDEXES FROM `odd``name`");
+ assert_eq!(list_indexes_sql("materials"), "SHOW TABLE `materials` INDEXES");
+ assert_eq!(list_indexes_sql("odd`name"), "SHOW TABLE `odd``name` INDEXES");
}
#[test]