From 7c81da884aee9fb4918597ba68fafad538f916df Mon Sep 17 00:00:00 2001 From: mertmit Date: Tue, 5 Dec 2023 18:00:18 +0300 Subject: [PATCH] fix: binding for TidbClient Signed-off-by: mertmit --- packages/nocodb/src/db/sql-client/lib/mysql/TidbClient.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/db/sql-client/lib/mysql/TidbClient.ts b/packages/nocodb/src/db/sql-client/lib/mysql/TidbClient.ts index cd386d8016..5454896c0c 100644 --- a/packages/nocodb/src/db/sql-client/lib/mysql/TidbClient.ts +++ b/packages/nocodb/src/db/sql-client/lib/mysql/TidbClient.ts @@ -24,7 +24,8 @@ class Tidb extends MysqlClient { try { const response = await this.sqlClient.raw( - `select *, TABLE_NAME as tn from INFORMATION_SCHEMA.KEY_COLUMN_USAGE where CONSTRAINT_SCHEMA='${this.connectionConfig.connection.database}' and TABLE_NAME='${args.tn}'`, + `select *, TABLE_NAME as tn from INFORMATION_SCHEMA.KEY_COLUMN_USAGE where CONSTRAINT_SCHEMA=? and TABLE_NAME=?`, + [this.connectionConfig.connection.database, args.tn], ); if (response.length === 2) {