- Show line numbers as they can be quite useful
- Increase starting number when the first line gets deleted from the log, so the line numbers don't lie about the real number of loglines.
* Add helpful (hopefully) delimiter syntax checking.
* Protect the backslash-in-string-literal parsing a bit more by only activating it inside string literals. Also move it towards the string literal handler to improve readability.
* Fix regression: choose characters for secchar and thdchar that are really unused by the parser logic.
* When shortcutting and snipping whitespace early, the start pointer must be adjusted whenever a comment "whitespace" is accounted for.
* When handling end-of-string inside loop, shortcutting via continue must not be performed if at the last character of the string, otherwise an entire sentence might be skipped.
* Processing sentence contents must happen after processing comments (as before the delimiter changes).
* Trying to handle the conditional markers with a state variable inside the end-of-sentence block did not work, sometimes too much sql got included in the conditional.
* parsesql():
- Much added complexity.
- Handle end-of-sql inside loop instead of being a special case outside.
- Only set 'start' after a complete statement has been handled.
* addResults(): Adjustment to allow trimming of enclosed string.
* isNumber(): New helper.
* DELIMITER is not a SQL reserved word interpreted in any way by mysqld.
* ComboBoxQueryDelimiterExit was not attached to ComboBoxQueryDelimiter's exit event.
* Fork out IsValidDelimiter to avoid code duplication.
* Simplify delimiter handling:
- Shortcut on whitespace in start of SQL sentences, trims it off by skipping it.
- Remove start_of_command_pos variable in SQL parser, with the above change 'start' is interchangeable.
- Remove comment stating that a delimiter could be part of the SQL command currently being parsed (it can't).
- Disallow DELIMITER inside conditional comment.
- Remove region without matching end-region (?).
- Disallow DELIMITER DELIMITER, it makes for simpler code.
Plus minor optimizations:
* Fast continue at end of one-line comments.
* Test for most-likely-to-fail conditions first in some of the "if"'s.
* Avoid calling (?) Length() for each invocation of the loop.
- File logging can be activated in preferences dialog, by default of course NOT active.
- One file per session is written to [Documents and settings]\[username]\Application data\HeidiSQL\Sessionlogs\
- Filename pattern: "[session name] [zeropadded session nr].log"
- Fetch more descriptive CSIDL_* constants for system folders from ShlObj unit rather than hardcoded hex values
- Fix initial enabled-status of "Paste" menuitem by setting the cursor into the relevant SynMemo when the contextmenu pops up. Should be handled automatically by SynMemo, but it doesn't. And no "FocusOnRightClick" property in sight.
- Don't hide Copy + Paste menuitems in SynMemoFilter. (Probably accidently hidden in rev 759)
1. Doubleclick a table in ListTables
2. Go back to Database tab and doubleclick another table. -> AV
3. Look at the SQL log - shows at least 2 times the SHOW COLUMNS FROM table
This commit sets the behaviour of PopulateTreeTableList + SetSelectedTable to gracefully ignore the change-events of dbtree while adding or deleting tree items. Avoids unwanted cascaded procedure calls in some places.
Implement an optimized and universal way to safe and restore the column visibibility of ListTables (and all other VirtualStringTrees) by merging that code with the code for the column-resizing feature.
- Drops global var ListTablesColumnNames and proc SetupListTablesHeader.
- Change + move "RestoreColumnWidths" to private "RestoreListSetup", add code from SetupListTablesHeader
- Change + move "SafeColumnWidths" to private "SafeListSetup", add code from MenuTablelistColumnsClick
- Default visible columns are (must be) set at design time now
Pro:
- RestoreListSetup is called once in FormShow, while SetupListTablesHeader was called each time in LoadDatabaseProperties.
- SafeListSetup is only called once in FormClose
- Just safes the column indexes, not the column names in registry. Makes it safe to rename columns in the future
- Less registry read/write access in general.
- Safe/RestoreListSetup open an easy way to implement further list features (column moving, etc.)
- Makes it a cakewalk to implement the same column un/hiding feature for the remaining 4 Lists.
Contra:
- people/developers who used a build from 870 to this one on will see their activated columns in ListTables reset to the default (7 first columns) because the registry key and value has changed. (but: better do that now than after an official relase)
1. drop, create or rename table(s)
2. call RefreshDbTableList + LoadDatabaseProperties
3. call PopulateTreeTableList
Pro: Safes an extra and superflous "SHOW TABLE STATUS FROM..." query
Contra: PopulateTreeTableList is called in quite many places and doesn't exit early now
- Give the user a prettier confirmation message with listed tables to drop.
- Add documentation
- Drop large WITH .. DO statement
- Correctly call refresh-procedures