35 Commits

Author SHA1 Message Date
18c08dc4d1 Handle all types of exceptions when renaming database, not only connection related ones. Fixes issue #1912. 2010-05-07 17:22:28 +00:00
b3b1710c35 Introduce EDatabaseError exception class, so we're able to handle only those and let others raise the exception up to MadExcept. Helps finding non-database related AVs as users are able to get the callstack now. Similar to r3292 but more consistent all over the code now. 2010-04-24 13:56:57 +00:00
97f01a175b Move database filter again from mainform to session manager, so people without privilege to run SHOW DATABASE are not stuck. Fixes issue #1485. Also, allow to see available databases when user does a dropdown. Also, simplify logic for refreshing database list in mainform. 2010-04-22 15:16:27 +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
e356cb7ed7 Sanitize all "uses" clauses from unneeded unit references. 2009-12-22 23:19:56 +00:00
424ff3c8ab Add missing backticks to dropped database name 2009-12-21 06:36:26 +00:00
7272ba3bc3 Remove handling of crashed tables - there is no difference to normal tables in the way we handle them. 2009-12-19 21:25:59 +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
bd2f901e0b Fix wrong SQL for renaming a database with 0 tables. 2009-12-13 07:49:09 +00:00
d8d82e3e72 Move caching of information_schema objects into database connection unit. Simplifies code when accessing them. 2009-11-29 15:50:51 +00:00
ef282ed7f0 Remove unused variable and silence compiler notice. 2009-11-28 23:17:50 +00:00
92bd620309 Introduce caching of collation table and table engines list in connection layer. Remove that stuff from main unit and automatically clear cached stuff on disconnection. 2009-11-22 23:42:39 +00:00
5dfb5a9f45 Fix logic in rename database logic: Check for unmovable routines was not done if target db did not exist. Probably related to issue #1457. 2009-11-10 19:59:40 +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
c6be8dd575 Implement customizing of shortcuts for all available TActions and SynEditor commands. Fixes issue #536. 2009-09-21 23:12:21 +00:00
2ec8938074 Enable database renaming again, this time by renaming all tables and views into the target db. Fixes issue #1338. 2009-09-07 05:52:44 +00:00
f21a81e057 Fix fallback to default collation when that is missing in a SHOW CREATE DATABASE result. Fixes issue #1246 2009-08-05 17:51:30 +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
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
aabd4bbf57 Add some more support for databases and tables with unicode characters. 2008-08-08 19:32:24 +00:00
7c833b3266 Fix bug #556 "Create database: Reset TEdit color to default if database name is empty" 2008-06-20 18:10:51 +00:00
a9e4006b2d Fix bug #535 2008-06-16 16:29:52 +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
e7bcbdf293 * Bugfix: plug the most obvious memory leaks.
* Clear some unused code and wrong comments.
2007-11-09 09:51:31 +00:00
6968817941 Minor enhancements and consistency fixes for CreateDatabase + CreateTable dialogs:
- Fetch charsets from collations dataset rather than firing an extra "SHOW CHARSET"
- Move fetching defaultCharset to existing TRY clause. No functionality change, just more consistent.
- Sort all comboboxes with charsets and collations alphabetically
- Leave the responsibility for disabling the comboboxes on old servers to the code rather than to the DFM file.
- Adapt Enabled-property of TLables to the comboboxes they belong to.
2007-09-25 18:47:34 +00:00
04e272e2c6 Display a SQL dynamic preview for the CREATE DATABASE statement using a SynMemo. 2007-09-18 22:44:17 +00:00
5d00783b02 Safety fixes:
- Only generate COLLATE in CREATE DATABASE if CHARACTER SET was not empty.
- Surround CHARACTER SET + COLLATE in version conditional comment.
2007-09-18 22:19:01 +00:00
917ede28d7 Implement new feature: "Alter database", reachable in rightclick menu from within dbtree. Supports renaming a database and changing existing charset + collation. 2007-09-18 22:10:55 +00:00
a0fb2f7f1b Creation of databases should follow the servers charset by default, not the charset of the currently used database. 2007-09-18 16:13:59 +00:00
7c05ba1f75 Recycle CreateDatabase-form after first usage / don't FreeAndNil' it. Avoids 3 SQL-queries for each calling time after the first one. 2007-09-18 16:10:29 +00:00
1e08e582e8 Partly fullfill feature wish #1693393 "Selection of charset and engine at creation"
By turning the CREATE DATABASE dialog from an InputQuery into a real form with 2 additional pulldowns:
- character set
- collation

See also: http://www.heidisql.com/forum/viewtopic.php?p=1322#1322
2007-09-17 23:11:39 +00:00