38 Commits

Author SHA1 Message Date
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
5f9a62de94 Use cached result of SHOW CHARSET in one more place. 2009-11-28 21:39:15 +00:00
3caf576eac Fix mixed up combo box item when generating LOAD DATA query. Fixes issue #1481 2009-11-24 18:11:43 +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
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
f01893d08a Experimental: Reintroduce table tab, this time by placing the existing editors for tables, views and routines as TFrames onto that tab. Unfortunately a whole bunch of GUI changes involved here which makes the diff unreadable. Should solve issue #1149 . 2009-06-04 12:56:55 +00:00
dbb84e6df9 Integrate stored procedures and functions into the GUI flow, so they are visible like tables and editable from everywhere.
- FetchDbTableList now makes use of various tables in INFORMATION_SCHEMA if available - the only way of listing stored routines.
- If a routine is selected, Table + Data tab hide their grids and display a corresponding message instead. Seemed the only way to keep the normal flow of clicks, not changing too much click logic.
2009-03-02 21:40:44 +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
502d15cca1 CSV import: Allow charset selection on server versions 5.0.38 +, but not on 5.1.0 to 5.1.17 2008-09-03 17:27:47 +00:00
789e6672d6 LOAD DATA with charset is supported since MySQL 5.1.17. On prior versions it makes no sense to fill the comboCharset on the Import textfile dialog.
See http://dev.mysql.com/doc/refman/5.1/en/load-data.html
2008-09-02 23:21:44 +00:00
cc901ae8d3 Fix bug #693 Import CSV file: LOAD DATA statement breaks data if the CSV file has a different charset than the current DB. Implements the discussed pulldown on the first page of the dialog, below the file input. Defaults to UTF-8 selection. 2008-09-02 23:11:05 +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
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
ffc58c022b Revert broken r1561. Worse than before - more AVs, even when pressing a speedbutton which has loaded its icon correctly. Weird. 2008-07-02 22:33:05 +00:00
94822c33fa Fix one critical AV, part of bug #580 . Loading a PNGImage from a TPNGImagelist onto a TSpeedbuttons seems buggy. Instead, assign icons at designtime. Ugly fix as we now have redundant icons, anyway, we should look after not using TPNGSpeedbutton in too many places. 2008-07-02 22:21:04 +00:00
4cd5743980 Revert r1457 for the benefit of updatable views. Rely on the server responding with an error if the view is not updatable. 2008-06-19 16:53:14 +00:00
2ed4507666 Code cosmetic: Sanitize NODETYPE_BASETABLE constant from superflous "BASE" 2008-06-14 12:48:04 +00:00
e7ec3b9a1d Only display base tables in the table pulldown of the "Import Textfile" dialog. Views should be handled as read only for this task. 2008-06-14 12:40:49 +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
cbb6d3d220 Benefit from childwin's table cache in "Import text file" dialog 2008-03-23 14:01:46 +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
e53db0a9b7 PngIcons:
- Ban glyph data of all TSpeedButton's + TBitBtn's out of dfm files by converting them to TPngSpeedButtons and assign an image from PngImageListMain at runtime.
- Add "highlight" versions of "database" and "table" icons and use these on selected DBtree nodes.
- Remove no longer used BMP icons

Todo: Fill PngImageListMain at runtime.
Note 1: TBitBtn's are not Windows-theme-aware, even with a manifest in place, so we should avoid using them anywhere.
Note 2: T(Png)SpeedButton lacks a TabOrder property, so some of the other TabOrder's are automatically changed here.
2008-03-09 19:56:52 +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
415ef1d8c2 Fix bug #1832418 "access violation. no import" 2007-11-15 17:51:24 +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
c8d8712a89 Fix bug #1827494 import csv file field terminated by not working 2007-11-07 19:01:02 +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
cd8e361c7c Sanitize USE clauses from unused units 2007-07-28 12:05:35 +00:00
067cf4bf21 Stylechange: Get rid of some ugly WITH statements
Enhancement: Use ready to use function ToggleCheckListBox.
2007-07-07 19:11:53 +00:00
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
2c3f1a02b4 Perform some check routines before enabling the "Import"-button. 2007-07-07 18:39:36 +00:00
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
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
8bc4e646f3 Sanitize default component names. 2007-07-05 18:49:56 +00:00
fe6d534120 Move creation of loaddataform from application startup to a place where it's done on demand. 2007-07-03 19:26:17 +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