From f6e915b8d36e0824e626aa076f89aa23e33b954c Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Tue, 20 Jul 2010 07:42:39 +0000 Subject: [PATCH] Table editor fails to detect the default collation on some tables. Fetch it from SHOW TABLE STATUS instead as fallback. See http://www.heidisql.com/forum.php?t=6202 --- source/mysql_connection.pas | 2 ++ source/table_editor.pas | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/mysql_connection.pas b/source/mysql_connection.pas index d0d8d191..232c1a0c 100644 --- a/source/mysql_connection.pas +++ b/source/mysql_connection.pas @@ -2428,6 +2428,8 @@ begin if Source is TDBObject then begin s := Source as TDBObject; Name := s.Name; + Collation := s.Collation; + Engine := s.Engine; Database := s.Database; NodeType := s.NodeType; Created := s.Created; diff --git a/source/table_editor.pas b/source/table_editor.pas index 6b315395..183a8239 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -284,6 +284,8 @@ begin end else begin // Editing existing table editName.Text := DBObject.Name; + // Try collation from SHOW TABLE STATUS, sometimes missing in SHOW CREATE TABLE result + comboCollation.ItemIndex := comboCollation.Items.IndexOf(DBObject.Collation); CreateTable := Mainform.SelectedTableCreateStatement; rx := TRegExpr.Create; rx.ModifierI := True;