Commit Graph

123 Commits

Author SHA1 Message Date
Ansgar Becker
3174feaf64 Doh.. fix "Clear" item when Filter memo is active. 2007-07-26 07:05:38 +00:00
Ansgar Becker
8d896f732d Followup to rev 756:
* Hide new menuitems when SynMemoFilter is focused.
* Call SynMemoQuery.OnChange in popupQuery.Popup to ensure various menuitems are dis-/enabled
* Disable "Clear" item when memo is empty
2007-07-26 06:45:45 +00:00
Ansgar Becker
c83bcb5315 Minor: Fix displaying formatted bytes. Use K-units on 1024 factor. 2007-07-26 06:11:48 +00:00
Ansgar Becker
5cecd6a91e Minor: Change format of "123,456,789 Characters" above querymemo to a better readable "123,4 MB" 2007-07-26 06:07:01 +00:00
Ansgar Becker
021d56e0bc Clean up and enhance popupQuery menu:
* Bring items in a better, usable order
* Nuke dependency of hardcoded itemcount in code for SQL functions: "popupQuery.Items[i+13].Add(mi);"
* Add useful actions:
  + Insert file at cursor
  + Save selection to file
  + Save as snippet
  + Save selection as snippet
* Assign procedures for menuLoad + menuSave at designtime, not at runtime (which made sense in a MDI mechanism)
* Minor optimization of detecting selected text in SynMemo
2007-07-25 21:18:20 +00:00
Ansgar Becker
c10ff3fab6 Try to nuke some memory leaks. 2007-07-23 20:48:10 +00:00
Ansgar Becker
d05a4fedb9 Detect max_allowed_packet also when exporting to a file. 2007-07-23 20:47:26 +00:00
Ansgar Becker
6d8f8e1299 Implement a dialog/mechanism to run a SQL file directly without loading it into the query editor (= memory):
1. When user opens a file which is bigger than LOAD_SIZE (currently 5M), ask what to do
2. User can normally open the file, cancel, or use the new mechanism:
3. Load a chunk of LOAD_SIZE of SQL into memory
4. Split chunk with parseSQL into single queries
5. Run queries and go on with 3.

parseSQL is the bottleneck here, very CPU consuming, as it has to take care of different comment-styles and delimiters. So, the above strategy effected a good compromise regarding overall performance on different tests with worst case SQL files:
- "Wide" table exports with many big sized fields => long lines
- "Narrow" table exports with only one mini-sized field, extended INSERTs => short lines
Especially in the latter case it avoids to cause a hellfire of parseSQL-calls

Still seems to have some memory leaks somewhere.
2007-07-23 20:25:29 +00:00
rosenfield
561b057d5c Bugfix: Fix a (silenced) double reset of running flag caused by redundant CheckConnection calls, which in turn caused reconnect logic to break wrt manually fired queries.
Bugfix: FetchActiveDb...() is a helper function, do not try to handle exceptions as it leads to AVs.
Bugfix: ShowTableProperties() is a helper function, do not try to handle exceptions as it leads to AVs.
Bugfix: AV in ShowProcessList when disconnected.
Bugfix: AV in ShowVariablesAndProcesses when disconnected.  (Something tells me it could be better to let the default for HandleErrors be 'false', a lot of these seems to pop up during testing...)
Bugfix: Connected time counter did not stop when connection got dropped.
Bugfix: Uptime counter did not stop when connection got dropped.
viewdata(): Use standard method of fetching data to get rid of redundant code.
...BeforeSendingSql(): Remove now redundant code.
2007-07-23 15:03:34 +00:00
Ansgar Becker
9e26d96887 Add dependent project references to D11 package of HeidiComponents. Avoids warning about automatic addition at first time building. 2007-07-18 19:06:04 +00:00
Ansgar Becker
f2fc494b1c Add notes about different file suffixes in Delphi 11 2007-07-18 19:00:28 +00:00
Ansgar Becker
8e10529741 New feature: Enable column renaming from within listColumns.
Side-effect: Needed to change some editor-related shortcuts so they don't trigger their corresponding menu-commands from popupTableGrid when the user presses them at the time the column name gets edited:
- Call field editor : Now "Alt+Enter", was "Enter"
- Drop field : Now "Ctrl+Del", was "Del"
2007-07-15 06:45:47 +00:00
Ansgar Becker
457db77cc8 Simplify code: Use one try-except block instead of two for procedures which can throw exceptions. 2007-07-14 20:46:57 +00:00
Ansgar Becker
c711a29254 Remove superflous code which has no longer any visible effect since revision 745. Selected table item keeps focus because ShowDBProperties is not called any longer. 2007-07-14 19:14:58 +00:00
Ansgar Becker
8573b7401d Fix: Restore previously set mousecursor after using crHourGlass. Fixes staying crHourGlass after renaming a table. 2007-07-14 19:09:20 +00:00
Ansgar Becker
2f3bcd9e38 Enhancement: Only refresh table cache after renaming, don't refresh the listview. In any error case don't rename the list-item. 2007-07-14 19:03:59 +00:00
Ansgar Becker
0f00d4a3c8 Enhancement: Disable the OK button in the new sorting dialog if there's no change to the old ORDER clause. Disabling that button should be the signal to the user that he didn't make any effective change yet. Helps forgetful people. 2007-07-14 18:51:27 +00:00
Ansgar Becker
490e192ca9 Call help window when pressing F1 in those query helpers tabs for which that makes sense. 2007-07-14 18:31:14 +00:00
Ansgar Becker
d6da05aa13 Add a splitter between query memo and helpers which recalls its position set in the last session. 2007-07-14 18:21:00 +00:00
Ansgar Becker
f49e9f9e41 New Feature. Add SQL snippets to query helpers in a new tab 2007-07-14 18:03:27 +00:00
Ansgar Becker
f39222fea5 Refresh table cache when one or more tables got renamed, created, dropped. 2007-07-14 12:59:25 +00:00
Ansgar Becker
e1b1f80fa3 Include unit data_sorting in project files. Fixes compiler error about missing "data_sorting.dcu". 2007-07-13 15:13:37 +00:00
Ansgar Becker
3e566dcf13 Fix selecting the correct database when opening the usermanager and when it's closed. 2007-07-13 05:42:52 +00:00
Ansgar Becker
8e391548d4 Fix restoring column names with spaces from ORDER clause in registry 2007-07-13 05:25:15 +00:00
Ansgar Becker
064ed3b4da Decide to refresh data if the OK button in any of the two dialogs (column_selection, data_sorting) was pressed. Don't call viewdata in the dialogs, but in ChildWin itself. Saves some superflous procedures / code. 2007-07-12 22:44:05 +00:00
Ansgar Becker
cc84963b25 Implement a dialog for easier accessing the options for ordered columns.
This has one positive side effect: ViewData no longer re-saves an ORDERCLAUSE to registry after it has been read. At the same time the ORDERCLAUSE is read everytime when grid is filled, not only the first time. Those changes were needed to be able to apply an ORDERCLAUSE which was generated and saved by the new dialog.

Left for later: Moving order-columns up and down. Tested that with a TUpDown which seems to ignore clicks sometimes and then doesn't fire OnClick.
2007-07-12 22:33:59 +00:00
rosenfield
4d12bd3e42 Send focus back to query editor after a column name has been double clicked into it. 2007-07-12 09:54:59 +00:00
rosenfield
2c0caa154d Bugfix: 'stop on errors when executing sql batch' got broken in revision 667. 2007-07-12 09:47:38 +00:00
Ansgar Becker
37f0b45363 Display rowcount statistics in a wordwrapped TLabel. Makes room for coming buttons "ORDER" (and "GROUP"). 2007-07-08 19:10:21 +00:00
Ansgar Becker
067cf4bf21 Stylechange: Get rid of some ugly WITH statements
Enhancement: Use ready to use function ToggleCheckListBox.
2007-07-07 19:11:53 +00:00
Ansgar Becker
40eb52729a Remove a done TODO-note 2007-07-07 18:54:32 +00:00
Ansgar Becker
6936031742 Replace a note on the loaddata-form about an unsupported feature by a simple version check routine which enables/disables the calling controls. 2007-07-07 18:51:02 +00:00
Ansgar Becker
2c3f1a02b4 Perform some check routines before enabling the "Import"-button. 2007-07-07 18:39:36 +00:00
Ansgar Becker
530d45a660 Reorder components on dialog for CSV-import and use the same pagecontrol-layout as on ExportSQL-dialog. 2007-07-07 18:28:22 +00:00
Ansgar Becker
1e6b065015 Fix rowcount statistics for pre-4.0 servers.
See also: http://www.heidisql.com/forum/viewtopic.php?p=1046#1046
2007-07-07 11:16:47 +00:00
Ansgar Becker
028aa65b72 Add navigation link below each paragraph. 2007-07-07 07:26:02 +00:00
Ansgar Becker
31c65c9e2f Display flash-icon in menuitems for functions. 2007-07-06 22:10:12 +00:00
Ansgar Becker
86f01b4675 Attach server version to SQL functions and use that to hide unsupported functions in query helpers, popupQuery and SynCompletionProposal. 2007-07-06 22:07:05 +00:00
Ansgar Becker
fa46bd85c8 Add functions from help categories "Geometric feature" and "Functions and Modifiers for Use with GROUP BY". Always use names of root categories, as we don't need a tree structure here. 2007-07-06 21:29:47 +00:00
Ansgar Becker
5207ec37a7 Move popupmenu main.SQLfunctions to childwin.popupQuery. So every new created MDI-child get its own instance of this popupmenu. 2007-07-06 19:10:04 +00:00
Ansgar Becker
5d82d7661f Fix AV after unsuccessful table renaming. 2007-07-06 06:01:23 +00:00
Ansgar Becker
bf68e4433c Improvements for CSV import dialog:
* Add feature: Read and write all options from / to registry, using some existing CSV-options
* Fix bug: Correct escaping for db, table, columns, values for terminator, etc.
* Style change: Drop superflous checkboxes from checkbox/edit pairs to save clicks. Checking for empty edits has the same effect.
* Style change: Don't convert backslashes in filename to slashes. No need to take care of escaping, esc() does that better.
2007-07-05 19:45:18 +00:00
Ansgar Becker
8bc4e646f3 Sanitize default component names. 2007-07-05 18:49:56 +00:00
Francisco Ernesto Teixeira
feb47109f5 Code rearrangement. 2007-07-05 13:01:54 +00:00
Ansgar Becker
69e1abbf43 Implement an up-to-date list of MySQL functions in mysql.pas. Used for
- popupmenu in query memo
- query helpers
- SynCompletionProposal
Drops function.txt and parser for that file.

Pros:
- No dependency on this file anymore
- Much easier and safer coding
- File-parsing no longer needed

Notes:

The old function.txt was meant to be editable and extensible for users but I never saw or heard anyone who does that, most likely because it wasn't documented. Another problem was that the file resided in the programs-directory, where only administrators have write-access, so in these cases it couldn't be edited anyway.

The PHP file in /extras can be used for creating an up-to-date list for mysql.pas .

As not all functions of the new list are available in all mysql-versions, it would be the best if we would fetch the list by the use of HELP commands. Contra: Would result in poor performancing popupmenu and many servers don't have the help-tables filled.
2007-07-04 22:31:56 +00:00
Ansgar Becker
01c66955f6 Important followup to last commit: Makes EnsureActiveDatabase accessible in other units. 2007-07-04 20:19:36 +00:00
Ansgar Becker
efcc58f7bb Fix firing queries on correct DB when user selects another DB in "Source" tab. Broken in rev 687. 2007-07-04 20:10:39 +00:00
Ansgar Becker
79c95bd9fd Move creation of SQLhelp from application startup to a place where it's done on demand.
Move public property keyword to the private context as it is no longer accessed from outside.
2007-07-03 20:22:49 +00:00
Ansgar Becker
c02ae7a711 Move creation of EditUserForm from application startup to a place where it's done on demand. 2007-07-03 19:41:15 +00:00
Ansgar Becker
6de920d8ec Move creation of CopyTableForm from application startup to a place where it's done on demand. 2007-07-03 19:35:09 +00:00