Skip to content

Commit b97122c

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 bcea889 commit b97122c

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
@@ -6050,7 +6050,7 @@ function TMySQLConnection.GetTableKeys(Table: TDBObject): TTableKeyList;
60506050

60516051
end else begin
60526052

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

0 commit comments

Comments
 (0)