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

This commit is contained in:
Ansgar Becker
2010-07-20 07:42:39 +00:00
parent 8e17e4a999
commit f6e915b8d3
2 changed files with 4 additions and 0 deletions

View File

@ -2428,6 +2428,8 @@ begin
if Source is TDBObject then begin if Source is TDBObject then begin
s := Source as TDBObject; s := Source as TDBObject;
Name := s.Name; Name := s.Name;
Collation := s.Collation;
Engine := s.Engine;
Database := s.Database; Database := s.Database;
NodeType := s.NodeType; NodeType := s.NodeType;
Created := s.Created; Created := s.Created;

View File

@ -284,6 +284,8 @@ begin
end else begin end else begin
// Editing existing table // Editing existing table
editName.Text := DBObject.Name; 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; CreateTable := Mainform.SelectedTableCreateStatement;
rx := TRegExpr.Create; rx := TRegExpr.Create;
rx.ModifierI := True; rx.ModifierI := True;