Permalink
Browse files

Add "<server default>" to the engine drop down on the table editor, a…

…nd make that the new default, so we leave the ENGINE=.. clause away. See https://www.heidisql.com/forum.php?t=23363
  • Loading branch information...
ansgarbecker committed Feb 23, 2017
1 parent 9d2e0f4 commit b4806065c2d49c944f1e109d9d76e0ffc30531ab
Showing with 9 additions and 4 deletions.
  1. +5 −1 out/locale/en/LC_MESSAGES/default.po
  2. +4 −3 source/table_editor.pas
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: HeidiSQL\n"
"POT-Creation-Date: 2012-11-05 21:40\n"
"PO-Revision-Date: 2017-02-01 06:51+0100\n"
"PO-Revision-Date: 2017-02-23 18:14+0100\n"
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/"
"language/en/)\n"
@@ -3248,6 +3248,10 @@ msgstr "Default collation:"
msgid "Engine:"
msgstr "Engine:"
#. Server's default table engine (e.g.)
msgid "Server default"
msgstr "Server default"
#. frmTableEditor..PageControlMain..tabOptions..chkChecksum..Caption
#: table_editor.dfm:310
msgid "Checksum for rows:"
View
@@ -256,7 +256,8 @@ procedure TfrmTableEditor.Init(Obj: TDBObject);
inherited;
FLoaded := False;
comboEngine.Items := DBObject.Connection.TableEngines;
comboEngine.ItemIndex := comboEngine.Items.IndexOf(DBObject.Connection.TableEngineDefault);
comboEngine.Items.Insert(0, '<'+_('Server default')+'>');
comboEngine.ItemIndex := 0;
comboCollation.Items := DBObject.Connection.CollationList;
if DBObject.Connection.Parameters.IsMariaDB then begin
with listColumns.Header do begin
@@ -542,7 +543,7 @@ function TfrmTableEditor.ComposeAlterStatement: TSQLBatch;
end;
if (comboCollation.Tag = MODIFIEDFLAG) or (chkCharsetConvert.Checked) then
Specs.Add('COLLATE=' + esc(comboCollation.Text));
if comboEngine.Tag = MODIFIEDFLAG then begin
if (comboEngine.Tag = MODIFIEDFLAG) and (comboEngine.ItemIndex > 0) then begin
if DBObject.Connection.ServerVersionInt < 40018 then
Specs.Add('TYPE=' + comboEngine.Text)
else
@@ -710,7 +711,7 @@ function TfrmTableEditor.ComposeCreateStatement: TSQLBatch;
SQL := SQL + 'COMMENT='+esc(memoComment.Text) + CRLF;
if comboCollation.Text <> '' then
SQL := SQL + 'COLLATE='+esc(comboCollation.Text) + CRLF;
if comboEngine.Text <> '' then begin
if (comboEngine.Text <> '') and (comboEngine.ItemIndex > 0) then begin
if DBObject.Connection.ServerVersionInt < 40018 then
SQL := SQL + 'TYPE='+comboEngine.Text + CRLF
else

0 comments on commit b480606

Please sign in to comment.