14 Commits

Author SHA1 Message Date
8ab0b95440 Implement a more effective solution for hiding and unhiding columns in ListColumns.
Pros:
- ShowDBProperties doesn't reset column layout
- Sort direction is remembered automatically
- Reading columnlist from registry is done once in a TMDIChild, not on each ShowDBProperties
- Hiding/unhiding columns doesn't call ShowDBProperties
- No more hassling with what is called a "default column" or not. popupDBGrid is usable like in Windows Explorer.
- Column layout is stored global, not per session.
Cons:
- Column layout from old settings logic needed to be discarded

Side effect:
- Fixes a potential AV in FormatNumber(str) with empty strings.
- Created an overloaded FormatByteNumber() which can take a string as input
2007-08-30 23:49:38 +00:00
bf401df253 * Implement Pos2, which takes a start parameter.
* Mask USING {BTREE,HASH,RTREE} from older servers. I wonder why mysqld doesn't do this by itself. Fixes issue #1779065.
2007-08-29 00:49:40 +00:00
5d718e5152 Iterate through data arrays of VirtualTrees rather than through the nodes to get their captions. Fixes sorting in ColumnSelection-dialog and other places where GetVTCaptions is called to get all captions (not the selection). 2007-08-27 18:46:21 +00:00
3f0b70c409 Switch ListColumns from TSortListView to TVirtualStringTree
Additionally/Sideeffects:
- Fix vstFreeNode to delete the item from the array, not only free the item itself
- Change/Rename GetSelectedNodesFromVT to GetVTCaptions and give it the ability to return all captions, not only the selected. This function is very useful now and saves writing much redundant code.

A table with 500 columns needed 3 seconds to display in the TSortListView, now that takes less than a half second.
2007-08-27 00:01:53 +00:00
9068f08609 Convert ListTables from TSortListview to TVirtualStringTree
Additionally/Side effects:
- TVTreeData structure moved to helpers.pas to be able to use it in new function GetSelectedNodesFromVT.
- ListTablesEditing dropped. We don't need to disable any shortcut there because there is none set.
- Avoid potential AVs when accessing not created items in TVTreeData.Captions
2007-08-25 00:08:31 +00:00
b54a122fe6 Fix bug #1757524 "Exporting rather slow when processing large BLOBs" by making use of mysql_real_escape_string() . 2007-08-21 16:47:28 +00:00
e78c25f25b Fix bug #1776163 "Blank/Space in HTML-export"
- Dropping non breaking spaces by adding css attribute border-collapse to table.
- Use the same font and background colors as in the datagrids. Even applies for the colored NULL-fields.
2007-08-18 00:17:08 +00:00
37a5951835 * Add version of GetFilesFromDir() that hides file extensions.
* Change SQL snippet menus and lists to hide the .sql extension.
2007-07-27 11:10:20 +00:00
c83bcb5315 Minor: Fix displaying formatted bytes. Use K-units on 1024 factor. 2007-07-26 06:11:48 +00:00
c10ff3fab6 Try to nuke some memory leaks. 2007-07-23 20:48:10 +00:00
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
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
aeb7be0a37 * Fix hint for SQL functions menuitems which have pipes in declarations (fx TRIM).
* Fix splitting of function descriptions by implementing + using LastPos()
2007-07-02 19:08:59 +00:00
3c8f123a81 Move *.pas, *.dfm and *.inc files from root directory to a new "source" subdirectory. Leaving just the readme in the root to give all newbies a very clear and unique starting point. 2007-06-28 20:00:04 +00:00