65 Commits

Author SHA1 Message Date
09dbc9c926 Issue #2011: pre-select a reasonable collation if the servers default collation is not set or not yet supported by Heidi 2024-08-25 13:37:33 +02:00
54bb0bab45 Issue #1965: show SQL warnings in forms: event editor, copy table, create database, insert files, load CSV 2024-06-19 17:09:46 +02:00
0d9de512cd Remove unit scopes from project settings, prefer fully qualified unit names in uses clauses. Enhance readability and compiler performance. 2022-12-26 17:59:19 +01:00
25d15d8b41 Optimization: set up a single TSynMemo instance instead of all, e.g. when creating a new query tab 2022-05-25 13:16:27 +02:00
dd38ba4f6f Code cosmetic: rename implodestr() to Implode() 2021-06-03 08:32:06 +02:00
e0f8a36bfe Restore previously used collation when creating new database. Closes #702 2019-10-27 11:59:23 +01:00
b2a3551704 Replace remaining SHOW VARIABLES queries with GetSessionVariable 2019-07-29 12:41:55 +02:00
fcdf323086 Let TExtForm translate all strings on a form, to reduce the code in any FormCreate event 2019-07-21 20:12:13 +02:00
92c8f62b85 High DPI:
* remove ParentFont flag from forms again (introduced in 9cdcd631454f6f9e999893ea89fcf502d994474c for #213). This just inherits from default Windows settings.
* instead, scale font size in InheritFont(), and move that to the new TExtForm class
* mark app with PerMonitorV2 support
2019-07-17 21:59:18 +02:00
2a91a13b42 Issue #677:
* drop workaround for application crash on WinXP, when loading newer libmariadb (see #79)
* raise TDbLib's own exception instead of baking an own one with less details. Probably helps in debugging: https://www.heidisql.com/forum.php?t=34044
* rename EDatabaseError to EDbError, to overcome naming conflict in DB unit
* load libpq.dll always with path, which should anyway work better than without it. See http://www.heidisql.com/forum.php?t=22514
2019-07-08 20:23:05 +02:00
2a10422373 Issue #8: provide two color presets for SQL editors in preferences dialog per dropdown, one for dark themes and one for light ones 2018-11-05 20:53:43 +01:00
9cdcd63145 Issue #213: Assign system or custom font once, to the application, and let all forms inherit that font, so there is no need to call InheritFont() for each form. 2018-10-25 19:24:45 +02:00
5a8a4af29a Rename helpers unit to apphelpers, to overcome a naming conflict with the FireMonkey unit FMX.Canvas.GPU.Helpers. Closes #102. 2018-01-22 19:48:17 +01:00
af7ea3708e Use FreeAndNil() to reset global variables for dialogs we need in TMainform.SetupSynEditors(). Finally fixes a bunch of access violations in SetupSynEditors, due to referencing already free'd variables. Fixes issue #3414. 2013-11-10 10:03:17 +00:00
33730aa064 Create database dialog: Remove charset pulldown, leave collation pulldown alone. Init collation pulldown with the server variable "collation_server". 2013-02-21 08:56:58 +00:00
f96288fce9 Translate string variables and literals in .pas files. TODO: translate constants. 2012-11-26 05:44:01 +00:00
ca1d94c87b Issue #557: Include gnugettext.pas from https://dxgettext.svn.sourceforge.net/svnroot/dxgettext/trunk/dxgettext/sample/ . And add basic code to all FormCreate events to translate their components in the future. 2012-11-10 14:28:44 +00:00
90ab0b6cf1 Refactor logic for reading and writing application and session settings:
* Introduce TAppSettings, created in dpr file
* Implement read and write methods, and replace callers of GetRegValue and MainReg.WriteInt/... with these
* Optimize read and write methods for avoiding redundant accesses to registry
* Auto-remove stored default settings from registry to avoid registry spam
* Replace synced MainForm.pref* variables with TAppSettings.Read* calls
* Move SetLocales call to dpr file
* Move MainForm.FDirname* variables to appropriate methods in helpers.pas
* Implement TQueryHistory.Create(SessionPath), reading its items within constructor
2012-08-19 10:55:08 +00:00
56e0d8b445 Implement session folders. Fixes issue #1228. 2012-07-27 06:54:56 +00:00
46497c03e1 Expand session tree again after creating a new database and refreshing the tree. Fixes issue #2806 2012-03-29 20:48:03 +00:00
3c725b3d76 Quote collation clause in all places. Fixes issue #2479. Related: issue #1852. 2011-06-27 19:44:07 +00:00
e96fa77cbd Do not cache dialog instances any longer. OnCreate code is mostly very quick, and caching them adds quite some pitfalls into the code. Not to mention 30 lines less code in main.pas now :) 2011-06-26 20:01:42 +00:00
2d548b5ef6 Introduce some wrapper functions for message and error dialogs in order to have less code and to avoid hidden titles on Windows XP. Fixes issue #2425. 2011-05-27 04:48:21 +00:00
478c0306c7 Use modern TaskMessageDlg as a replacement for MessageDlg where appropriate. 2011-05-26 06:08:19 +00:00
c8b25c75fa Bind session parameter object to session manager list nodes, to be able to show the right vendor icon in that list. 2011-04-17 23:21:05 +00:00
4fbf2c23dd Introduce experimental MS SQL support 2011-03-29 23:20:21 +00:00
49a97584e6 Code preparation for non-MySQL connections: Extract abstract stuff into a new TDBConnection class, and let TMySQLConnection derive from that. Same with TDBQuery / TMySQLQuery. See issue #1008. 2011-03-17 23:03:54 +00:00
6f95a796e1 Modify identifier quoting logic:
- Move QuoteIdent() and DeQuoteIdent() out of TMySQLConnection, make them classless
- Remove TMainForm.mask(), instead always use QuoteIdent()
- Introduce a third parameter to QuoteIdent(): "AlwaysQuote" - setting this to false will quote only if required
- Set AlwaysQuote to false for all stuff which drops some code into the query editor, see http://www.heidisql.com/forum.php?t=6986
2010-11-24 23:12:13 +00:00
6c2a100945 Implement combo box for definer in routine + view + trigger editor. Fixes issue #2189. Some related changes here:
- Remove ensureValidIdentifier() and its partly uncatched exceptions. Instead, disable "OK" buttons for empty table/view/proc name.
- QuoteIdent and DeQuoteIdent now take the glue char instead of a "HasMultiSegments" boolean param, so they're more exact when "user@host" or "db.name" come in.
2010-10-12 22:13:08 +00:00
0fa6c15c9d Implement multiple connections per window. DBtree and friends now have their nodes bound to TDBObject instances. Fixes issue #2144. 2010-10-05 23:06:29 +00:00
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