Skip to content

Commit 6a0e238

Browse files
committed
fix: prefer SHOW KEYS over SHOW INDEXES, which are synonyms, while very old servers only accept the one with KEYS
https://www.heidisql.com/forum.php?t=45113
1 parent 04a9492 commit 6a0e238

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source/dbconnection.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6206,7 +6206,7 @@ function TMySQLConnection.GetTableKeys(Table: TDBObject): TTableKeyList;
62066206

62076207
end else begin
62086208

6209-
KeyQuery := GetResults('SHOW INDEXES FROM '+QuoteIdent(Table.Name)+' FROM '+QuoteIdent(Table.Database));
6209+
KeyQuery := GetResults('SHOW KEYS FROM '+QuoteIdent(Table.Name)+' FROM '+QuoteIdent(Table.Database));
62106210
NewKey := nil;
62116211
while not KeyQuery.Eof do begin
62126212
if (not Assigned(NewKey)) or (NewKey.Name <> KeyQuery.Col('Key_name')) then begin

0 commit comments

Comments
 (0)