Skip to content

Commit 8d9ab31

Browse files
committed
[MySQL] Fix only_full_group_by could not obtain metadata #180
1 parent c682ced commit 8d9ab31

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/renderer/config/plugin/mysql.config.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import { BaseConfig } from "@renderer/config/base.config";
33
export class MySQLConfig implements BaseConfig {
44
columnDiskUsedRatio = `SELECT '{0}' AS db, '{1}' AS name`;
55
columnItems = `
6-
SELECT
7-
TABLE_SCHEMA AS "database", TABLE_NAME AS tableName, COLUMN_NAME AS name,
6+
SELECT TABLE_SCHEMA AS "database", TABLE_NAME AS tableName, COLUMN_NAME AS name
87
-- DATA_TYPE AS type
9-
concat(DATA_TYPE, '(', CHARACTER_MAXIMUM_LENGTH, ')') AS type
8+
-- concat(DATA_TYPE, '(', CHARACTER_MAXIMUM_LENGTH, ')') AS type
109
FROM information_schema.columns
1110
WHERE table_schema = '{0}' AND table_name = '{1}'
1211
GROUP BY COLUMN_NAME
@@ -87,9 +86,7 @@ FROM information_schema.tables
8786
WHERE table_schema = '{0}'
8887
`;
8988
tableItems = `
90-
SELECT
91-
table_schema AS "database", TABLE_NAME AS name,
92-
ENGINE AS value, MAX_DATA_LENGTH AS total_rows
89+
SELECT table_schema AS "database", TABLE_NAME AS name
9390
FROM information_schema.tables
9491
WHERE table_schema = '{0}'
9592
GROUP BY TABLE_NAME

0 commit comments

Comments
 (0)