28 Commits

Author SHA1 Message Date
249610072e Minor followup to rev 1170:
- Wording: "table" should be more clear than "objects"
- Source: Add TODO for platform specific method call
- GUI: Add right hand anchor for new radiobutton to ensure it's not covering some borders of the parent box
2007-12-13 18:04:49 +00:00
4e731b7fe5 Follow up to rev 1169: Add a more eye catching and user friendly solution to export to a directory.
- Add a fourth radiobutton + edit + button labeled "Directory" below the "File" option
- Code just uses that new option just like the File option. Only differentiate in the InitFileStream method.
- The SelectDirectory() method expects the unit FileCtrl in the USES clause. Silence a relevant compiler warning about usage of platform specific units - we will never compile anything else than a Win32 app here.
2007-12-12 21:42:49 +00:00
4793d275cd Add feature #1843670 "Multi-table Automated File Exporting"
The output filename gets parsed and the eventually existing "<table>" pattern gets replaced by either "header", "table1", "table2", ..., or "footer". That means, the single SQL files won't be complete in the end, as the header and footer is missing in the table-files. Not 100% sure if this is a good strategy. For me it seemed like the best/fast/lame way of working around the fact that the header potentially contains a CREATE DATABASE statement.
2007-12-10 21:02:06 +00:00
8c0965166c Fix second part of issue #1839045: conditional around default charset winds on for too long, encapsulating "row_format" too. Lines 754-768 should probably be factored out into a general method for doing these conditionals. Hmm, and why are there different target MySQL versions when the export function generates multi-version SQL anyway? 2007-11-29 20:42:48 +00:00
92737fa072 When masking USING <indexing algorithm>, place the end of the conditional enclosing right after the name of the algorithm (at the first space. assuming the name is only one word), rather than after at the first comma or parenthesis. Fixes issue #1839045. 2007-11-29 20:36:49 +00:00
e7bcbdf293 * Bugfix: plug the most obvious memory leaks.
* Clear some unused code and wrong comments.
2007-11-09 09:51:31 +00:00
fcc066d3e0 Follow-up to r1103: Enable keys before unlocking the table, so things are done in reverse to the locking process. 2007-11-06 14:20:11 +00:00
6d326739c2 Bugfix: LOCK TABLES needs to be done before DISABLE KEYS. MySQL seemingly does not always enforce this correctly? Either way, it's the correct semantics, to prevent other writers leaving data in the table after keys has been disabled but before HeidiSQL locks it. 2007-11-06 13:07:39 +00:00
a42a84ff6e Fix bug #1819886 "export silently overwrites target files" by later prompting for overwriting the target file. 2007-10-28 13:01:02 +00:00
382af79afc Fix issue #1819883. 2007-10-25 13:32:24 +00:00
17d41b8494 Fix/avoid AV on servers with 0 databases 2007-10-03 12:38:52 +00:00
46fd6af6d3 Fullfill feature wish #1789651 "export tables as sql to another host" (preselect matching remote database) 2007-10-02 22:32:37 +00:00
4449a6c055 * Bugfix: regression from r903: Fix the last couple of cases where ExecUseQuery was being used to no effect.
* 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..)
2007-09-17 19:10:38 +00:00
b04631b21e Bugfix: regression from r903: user manager was non-functional. 2007-09-17 16:41:21 +00:00
1b9b4fb6df Fix bug #1794536 "Export cause SQL Error on MySQL in ANSI - Mode" 2007-09-14 08:55:24 +00:00
9409c798ab Remove ActualDatabase and ActualTable variables, plus various minor optimizations that ensued from said change. Fixes a problem where when:
- viewing data in a table
 - switching to query tab
 - pressing master refresh
some of the tabs would disappear.
2007-09-11 15:58:47 +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
80a64fff0b Produce less spam when exporting empty tables. Set your differ to ignore whitespace. Fixes issue #1779063. 2007-08-29 00:20:57 +00:00
0ee7e15e4b Only show tables in the "export tables" window, do not include views.
(Views need to be exported last for an import to work properly, which is a better solution - should do that at some point.  Other stuff needs to be exported too, stored procedures etc).  Fixes issue #1779068.
2007-08-29 00:12:57 +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
75387fb490 Bugfix: export to database needs to know the current character set. 2007-08-21 20:17:32 +00:00
b015b87fcb Fix confusion with TYPE/ENGINE in CREATE TABLE statements. On target versions below 4.1.2 we now use "TYPE", "ENGINE" on all other versions.
Was discussed here:
http://www.heidisql.com/forum/viewtopic.php?p=1226#1226
2007-08-13 23:25:20 +00:00
b7cdd2b4cd Foreign Key support on ExportSQL: fixSQL for ANSI SQL compatibility 2007-08-09 17:44:23 +00:00
5d62871cb4 Foreign Key support on ExportSQL, prevents errors on dump import. 2007-08-08 16:31:25 +00:00
d05a4fedb9 Detect max_allowed_packet also when exporting to a file. 2007-07-23 20:47:26 +00:00
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
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