38 Commits

Author SHA1 Message Date
cc0b931551 Internal refactoring: Directly bind TDBObject's to nodes in ListTables, instead of copying everything to an internal array structure first. Most events on ListTables have their own procedures now. Also, when selecting a database in the tree without expanding it and a query tab is selected, do not fetch objects. Could annoy some SQL writers which won't see the objects in selected db highlighted in that case. On the other hand this avoids loading objects in situations where you don't need them. For larger databases this should be really helpful, e.g. for the reporter of issue #1742. 2010-03-07 09:46:49 +00:00
5c37b3024d Old servers need TYPE instead of ENGINE in CREATE TABLE statement. Fixes issue #1732. 2010-03-01 07:52:23 +00:00
0e271ee7de Replace remaining loadXYZwindow() functions for dialogs by a more native way. 2010-02-21 10:44:55 +00:00
9080ad7607 No need to use the Wide* version of string functions any longer. 2010-01-15 20:28:48 +00:00
52ea8f410a Use Unicode enabled TStringList instead of TWideStringList in all places. Should have no visible effect, apart from a very minor performance optimization, as String reference pointers are handled by Delphi, WideString by Windows. 2010-01-14 19:41:58 +00:00
a4652d39a4 * Fix compiler warnings due to implicit AnsiString to (Unicode)String or vice versa
* Remove workaround for Unicode text to and from clipboard
* Fix writing/reading wrong encoded text into/from registry - no need to use Utf8Encode() any longer
* Implement TMySQLQuery.ColAsAnsi() for cases in which we read binary data.
2010-01-07 00:00:56 +00:00
7d401ffde8 Upgrade to Delphi 2010:
* Removes TNT Unicode controls, which are no longer required. All VCL controls now have native Unicode support.
* Remove Delphi 11 packages, otherwise we would either need to keep TNT or break Unicode
* PngComponents update from Uwe Raabe on http://cc.embarcadero.com/Item/26127
* Adjust auto build process
* Since Delphi 2009, Strings are now UnicodeStrings, not AnsiStrings any longer. Fix a bunch of compiler errors which came along with this change.
TODO: Project should compile but give tons of compiler warnings.
2010-01-05 23:14:33 +00:00
eff81d8e35 Code cosmetic: Let GetSelectedTable return a TDBObject which has the same properties as TListNode but even more. 2009-12-25 11:26:05 +00:00
e356cb7ed7 Sanitize all "uses" clauses from unneeded unit references. 2009-12-22 23:19:56 +00:00
35e8bbb304 Do not fetch database objects from information_schema, which has gotten extremely slow on servers with many databases and triggers, since we support triggers.
* Instead, use separate SHOW commands for tables, functions, procedures and triggers
* Catch this chance to move these methods from main unit to mysql_connection, so they're accessible in a more generic way
* Additionally, introduce new classes TDBObject and TDBObjectList which provide a more generic way than TMySQLQuery to access these database objects.
Fixes issue #1529
2009-12-19 11:40:28 +00:00
44c0cfbfe8 Overtake comment of original table in "Create table copy". Fixes issue #1141. 2009-11-24 19:43:47 +00:00
45fa64fe81 Wrap most queries in a try..except block which may fail with a SQL privilege error. So these places do not raise an exception at user level. Exceptions should only raise in unpredictable error situations. Important for reactivating the MadExcept dialog. 2009-11-22 18:07:53 +00:00
b378aa7af3 Fix fatal error in "Copy table" dialog. Column names are handled case sensitive now. 2009-10-29 00:52:31 +00:00
12a8e2ebc5 Implement a more lightweight connection layer, consisting of 2 units in source directory. Breaks threading and window to window communication, which should be reimplemented later. 2009-10-28 00:08:49 +00:00
c0f445185d Fix issue #1239: table copy from context menu copies wrong table 2009-07-21 06:10:18 +00:00
ffe82bc8c7 Bugfix: avoid calling FieldByName() with a field name that doesn't exist, it causes an exception. Fixes issue #1118. 2009-05-05 08:53:54 +00:00
f5c1839acd Fix target table lacking CURRENT_TIMESTAMP defaults in copy table dialog. (Issue #996) 2009-03-17 19:37:09 +00:00
4babc8c103 Include collation and engine in tables created by "Copy table" dialog. Fixes one part of issue #996. 2009-03-15 19:47:32 +00:00
d905f69e10 * Fix the various refresh menu items to use the one and only refresh TAction.
* Move the auto refresh items to main menu (Tools) so it is usable in all places now, including the Data tab (which makes it working similar to tail -f).
2009-01-14 21:30:06 +00:00
909d31fd64 Simplify writing settings to registry:
* Keep only one TRegistry object in memory instead of creating a new one in each routine.
* Move out relevant functions and TRegistry object from main to helpers to make them usable globally.
2009-01-03 17:16:11 +00:00
f1b3f5501f Remove last traces of MDI (issue #513). Merges code, controls and events from childwin into main. 2009-01-01 23:24:36 +00:00
30e6e5a403 Do not readd auto_increment property if indexes were deselected in copy table dialog. Issue #918. 2008-12-17 20:00:52 +00:00
874a95121f Support index names with reserved words or spaces in it. Issue #918. 2008-12-17 19:56:00 +00:00
82740972fe Rounding for copy tabe dialog:
- Fix cut labels using Vista font
- Fix wording in several places
- Normalize positions of controls, use default 8px margin to form edges
- Put a "Select / deselect all" checkbox below the field selection box
- Move registry related constants to const.inc and normalize their names
2008-09-06 19:19:07 +00:00
9a52593dc2 Use Vista's Segeo font for all forms by using the SetVistaFonts() in mainform plus the new routine InheritFont() which simply overtakes fontname and size from the mainform to all other forms. 2008-08-29 18:20:14 +00:00
b333c83c6e Fix unquoted primary key columns in copy table dialog 2008-08-25 20:26:34 +00:00
6daf4b3f76 Fix most remaining Unicode unsafe GUI controls. 2008-08-25 20:24:00 +00:00
aabd4bbf57 Add some more support for databases and tables with unicode characters. 2008-08-08 19:32:24 +00:00
41074d211e Convert database tree from TTreeView to TVirtualStringTree.
- Fixes bug #271 "F5 shortcut in database tree not working"
- Fullfills rfe #519 "Highlight selected item in tree view when focus is elsewhere"
- Fixes inconsistent expansion state of nodes after refreshing
- Fixes plus sign staying when a db node with 0 tables was selected
- Slightly enhances painting speed within the dbtree
- Removes temporary storage of a rightclicked node (DBRightClickSelectItem). VirtualTree handles its right clicked selection exactly like the left clicked one, which makes makes coding a bit cleaner as we can always use the selected item instead of hacking with the right and left clicked node. On the other side it removes a quite user friendly feature. Well, we can reimplement this feature later, though it's not user UNfriendly currently.
- Reasonably rename the StringList "OnlyDBs" to "DatabasesWanted" and "OnlyDBs2" to "Databases"
2008-06-13 23:05:51 +00:00
38caa4cd99 Make most "btnCancelClick" procedures superflous by assigning the correct ModalResult (mrCancel) to the relevant cancel buttons. 2008-03-09 20:27:12 +00:00
4e23728aa2 - Move all hardcoded preferences names (registry) plus their default values to const.inc to fix inconsistencies like the one described here: http://www.heidisql.com/forum/viewtopic.php?p=1739
- Consequently use Mainform.GetRegValue() to read these values, an overloaded method with either Boolean, String or Integer result. These methods keep a global TRegistry object (regMain) open while the application runs, rather than creating a new one for each caller.
- Remove Mainform.SaveRegValue() which was used in one or two callers. Rather use a TRegistry object and do that by hand. There's no significant advantage in using a SaveRegValue method currently.
2008-02-06 00:00:52 +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
7f901e325b "Copy table" dialog: Use ensureValidIdentifier() to validate the name of the new table. 2007-10-12 19:27:39 +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
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
f39222fea5 Refresh table cache when one or more tables got renamed, created, dropped. 2007-07-14 12:59:25 +00:00
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
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