74 Commits

Author SHA1 Message Date
adf68ecc65 Issue #401: Extend SSH tunnel options: Allow user to set SHH host/ip and port, and a private key file used for authentication. If SSH host is not set, use what the user specified as MySQL server host. 2010-04-01 23:34:07 +00:00
899040655c Add sub tab "Databases" with a more detailed list than the tree has. Also, paint bars for size and number of items in it. Implement TMySQLConnection.GetDBSize() which caches the size of dbs, synchronized with DBobjectlists. 2010-03-31 19:13:22 +00:00
0ec02d6fa3 Issue #401: Hide console window by passing CREATE_NO_WINDOW to CreateProcess(). 2010-03-31 10:36:46 +00:00
0970f5c2bd Implement SSH tunnel with plink.exe on session manager. Fixes issue #401 Plus:
* Simplify code for getting connection parameters from registry by implementing helpers:LoadConnectionParams()
* Use combobox for network type instead of radio buttons, now that 3 options would need more horizontal space than we have
* Hide tabs on session manager which are irrelevant for the selected network type (e.g. no SSL options for named pipe)
* Some minor code simplifications
2010-03-30 23:22:08 +00:00
aa9525e527 Unify default sorting of database objects in tree and lists. Fixes issue #1799. 2010-03-25 21:03:37 +00:00
03cc9d632a Attempt to fix issue #1780 - AV on closing main window. Free the cached list of db object lists, instead of making it empty, so a call to Assigned() returns false. 2010-03-20 00:18:17 +00:00
4147bbcfbc r3150 didn't fix all exceptions thrown by ListTables.OnGetText when nodes are bound to already freed TDBObjects. Do it right now - introduce a new event TMySQLConnection.OnAfterClearDBObjects for this purpose. Todo: Fix related issue #1723. 2010-03-12 22:23:09 +00:00
65d0b59eba Minor: Reset highlighter's list of table names when selecting a new db and not having fetched its objects. 2010-03-07 17:37:27 +00:00
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
15d698dfdb Do not truncate contents of column contents if it contains NUL chars. Fixes issue #1731. 2010-02-27 15:10:43 +00:00
4e84c99a72 Introduce SSL support on session manager. Code parts from SuperNiFF. Fixes issue #518. 2010-02-26 00:13:17 +00:00
f9ea5dc1ec Add support for startup SQL script on session manager. Fixes issue #1716. 2010-02-25 20:45:16 +00:00
95e12a0bd1 Introduce new log category lcUserFiredSQL, and make log level customizable via preferences. Fixes issue #1652. 2010-02-04 00:39:29 +00:00
efbf7a0b98 Add a toolbar button which, when pressed, allows BLOBs to be displayed as text. Explicitly ignoring weird effects in grid updates/inserts. Fixes issue #1624. 2010-01-30 07:57:07 +00:00
9f139029b7 Enhance command line processing:
* Rewrite parameter parser
* Remove support for "-C" option (compressed). Anyway switched on by default.
* Add support for loading multiple SQL files at once instead of only one: "fileA.sql fileB.sql ..."
* Also process connection parameters when "Allow multiple application instances" is disabled
* If a session name is specified with -dXYZ, load params from registry, but allow the user to override these by passing e.g. a different user name "-uOtherUser"
Fixes issue #1332.
2010-01-27 23:39:34 +00:00
b0ccbaadbd Minor code simplification 2010-01-24 15:15:46 +00:00
798cc36b99 Remove TMySQLConnection.Capabilities , which should have brought some light into the feature set of the server. Still doing that per version comparison which is nice enough. 2010-01-24 15:07:03 +00:00
1008dcf194 Convert MySQL date/time values more safely against 0-dates. Fixes issue #1613 2010-01-19 23:19:19 +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
307bb8ca65 Fix sporadic AV which seems to follow after a reconnect with no db selected. 2010-01-14 18:23:17 +00:00
9b8fb4cc1f Fix critical character in SQL on old servers which can be converted using the local codepage. Fixes issue #1569. 2010-01-12 22:17:54 +00:00
df6397abc7 Fix detection of VARCHAR columns as BLOBs on 4.0 servers. Workaround for shared type FIELD_TYPE_* constants should only apply to (TINY|MEDIUM|LONG)TEXT columns. Fixes issue #1588. 2010-01-11 22:24:25 +00:00
35aa9c4dbf Make use of "Generics" provided by Delphi, to hold the list of tables, views etc. Easy to use and removes silly, redundant code. 2010-01-07 23:46:30 +00:00
3610f0a73b Decide to return String instead of AnsiString in BinColAsHex(), to satisfy all callers without additional casting. Fixes some compiler warnings. 2010-01-07 22:57:43 +00:00
f65e5bbc68 Don't double check if a column is binary, just trust in the caller doing the right thing. Fixes cut binary values in data grid. Additionally, return hex code right away, so we don't convert the hex value to UnicodeString and back to AnsiString. Consistently rename ColAsAnsi() to BinColAsHex(). 2010-01-07 21:52:35 +00:00
49b06f41b7 Safety check if PMYSQL handle is assigned in Ping() method. Tries to fix a sporadic access violation, unreproducible here but reported here: http://www.heidisql.com/forum.php?t=4694 2010-01-07 07:02:18 +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
882a2b9995 Old unicode unit no longer compiles here. Anyway, the new Utf8ToWideString() seems to solve what issue #1328 says in the same way. 2010-01-06 00:24:09 +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
51cdaa9995 Some queries do not fail with mysql_real_query(), but later, after calling mysql_store_result(). Pass them to the application. Fixes issue #1563. 2009-12-27 23:32:52 +00:00
e5ae3a934d Include triggers in SQL export. Fixes issue #334. 2009-12-27 13:05:05 +00:00
c191b1b24e Minor: documentation 2009-12-27 13:00:34 +00:00
cdc5b1a78a Always strip and hide server-side appendage "InnoDB free: xyz KB" from table comment, fetched by SHOW TABLE STATUS. If that detail is of any interest, we should display it in a separate column of ListTables, rather than leaving it in the user-editable comment field. Fixes issue #1561. 2009-12-25 06:43:31 +00:00
4e14b1a5ec Fix detection of views with invalid referenced tables, which have a different comment than "VIEW". 2009-12-23 00:21:41 +00:00
a9e404e181 Move string escaping methods from helpers to connection unit, replace code in TMySQLConnection.EscapeString(). So we don't use two different methods for the same task. Also, EscapeString() converted WideStrings into Strings using Utf8Encode, which was then displayed as broken text in SQL log. 2009-12-21 10:23:58 +00:00
f1d22faa6a Gracefully ignore non existent columns on older servers. Fixes issue #1547 2009-12-21 09:13:01 +00:00
4501f070a9 Wrap Connection.Database in try..except blocks, so they don't throw access violations when the selected db was deleted from outside. Fixes issue #1445 2009-12-21 09:07:21 +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
eefdbec81c Render primary key columns in query results in bold font, like in data grid. 2009-12-09 20:03:46 +00:00
1c69941f11 SELECT GROUP_CONCAT() does return binary collation also in the latest server versions, that was not fixed in 5.0.46. Extend the workaround with PMYSQL_FIELD.org_table to all versions above 4.1. Fixes issue #1514. 2009-12-08 18:05:48 +00:00
44cedeed4e Try a 99% work around for binary contents of function results: Check if a field is a function result on servers below 5.0.46, if yes, detect it as text type rather than binary. If it's a real table column, leave detection logic as is (Field.charsetnr = COLLATION_BINARY). This surely returns evil text type for SELECT LEFT(binaryfield, 5), but that seems to be a rare situation so that's the compromise here. Fixes issue #725. 2009-12-05 18:12:47 +00:00
de45bdd24a Fix a follow up error of previous commit - need to call CharsetTable.First now. 2009-12-05 16:54:43 +00:00
37f83b6af8 Fix offset in charset table, always set to 0. See http://www.heidisql.com/forum.php?t=4638 2009-12-05 16:03:07 +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
1995e2e820 Try to fix sporadic access violation when destroying a non-results-query. Unlikely but probably fixes issue #1494 . 2009-11-29 11:51:29 +00:00
30b970c92b Implement bulk table editing in table tools dialog. Fixes issue #576 2009-11-28 19:51:57 +00:00
312f9cb67f Fix too short SQL query timer, used in query tabs: Also count network time consumed by mysql_store_result(), display that time separately. 2009-11-25 21:36:06 +00:00
db3fbd0df7 Move timer stuff for server uptime and connection from main unit into connection layer. Both are seconds since start now. 2009-11-23 21:12:26 +00:00