5 Commits

Author SHA1 Message Date
815aaaf3e7 Fix remembering delimiter string after detecting one with parsesql() 2008-07-07 05:38:37 +00:00
7908f769e0 Accidently forgotten file in r1558 2008-07-02 22:41:10 +00:00
8b898a4a71 Make runsqlfile dialog unicode safe. 2008-06-19 20:01:42 +00:00
c15dcc0c3a Convert callers of parsesql to make the code compile. Note the TSynWideStringList nastiness in childwin, is there a proper way of doing this in Delphi? 2008-06-17 11:57:46 +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