Solution: Just keep CreateTableForm open after firing a faulty CREATE TABLE statement.
Note: The "Create" button has ModalResult := mrOK, so the form is automatically closed in the normal case.
- Use variables like "have_innodb" for detection of supported engines.
- Move redundant code from two places to Childwin.TableEnginesCombo()
- Remove some legacy code around this logic
- Don't free the instance of CreateTableForm after closing it. Saves some SQL queries from being fired each time the form gets created.
- Fetch charsets from collations dataset rather than firing an extra "SHOW CHARSET"
- Move fetching defaultCharset to existing TRY clause. No functionality change, just more consistent.
- Sort all comboboxes with charsets and collations alphabetically
- Leave the responsibility for disabling the comboboxes on old servers to the code rather than to the DFM file.
- Adapt Enabled-property of TLables to the comboboxes they belong to.
* Make export table locks local to current connection work.
* Bugfix: In non-file mode, export commands go directly to server without being parsed; thus they must not have semicolons at end of sentence. A regression here causes issue #1747558 and issue #1795486, which this commit fixes again.
(Briefly considered adding a cleanSql() which just runs result := parseSql(sql)[0], which would do the same in fewer lines of code, albeit with the small overhead of having the semicolon both added and afterwards removed again..)