36 Commits

Author SHA1 Message Date
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
79c5d04cfe Do not ping server in TMySQLConnection.GetActive, rather do that in a new Ping() function. TMySQLConnection.Active now returns true also in cases where the connection had timed out. Reconnection logic should work in such cases, only the connected timer gives the user a wrong info, which is cosmetic and unavoidable if we do not want to spam the server with keep-alive pings every second. 2009-11-23 20:27:27 +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
4b7ce24266 FServerVersionUntouched is a static variable, not a complex function, so it's very OK to call it several times 2009-11-21 14:57:01 +00:00
5326c9ace5 MySQL returns TEXT type for both SET and ENUM columns. Fix that by examining the field's flags. 2009-11-21 08:11:04 +00:00
21a4016d57 Readd the same workaround as in r1665, for binary collation in SHOW results (MySQL bug #10491). 2009-11-21 08:00:59 +00:00
f9c1913d07 BINARY_FLAG seems broken for fields of a utf8_bin table. Instead use the charset nr returned by a PMYSQL_FIELD. Fixes issue #1479 2009-11-20 17:38:34 +00:00
f192953c6b Treat + decode incoming data as Latin1 if Utf-8 charset is not available, e.g. on old 4.0 servers. Fixes issue #1466. 2009-11-19 21:12:57 +00:00
c0a9b63f98 Fix fetching binary field data. Fixes issue #1478 2009-11-18 23:59:52 +00:00
9002a8d42d Text and Blob data types share the same FIELD_TYPE constants. Makes it necessary to adjust type detection logic. 2009-11-18 21:30:26 +00:00
aaec4c991d Reimplement server to server exporting in table tools dialog. This time without the need of having two windows open. Instead, all saved sessions are selectable via pulldown. While exporting we open a temporary connection to the target server - no problem with the new simple database layer. Fixes issue #1434. 2009-11-18 20:42:49 +00:00
662ef79e3a Fix EPrivilege exception ("Privileged instruction"). TMySQLConnection.GetResults() itself frees its result on any exception. Forcing that a second time in a caller per try/finally causes the mentioned exception. 2009-11-13 21:14:38 +00:00
22c15198da Minor performance tweak: cache data types of all columns once at execution time in TMySQLQuery. Only noticeable in places where we heavily check data types. 2009-11-12 21:48:49 +00:00
d15d8b48f6 Fix potential exception when freeing a TMySQLQuery. A destructor should always call its inherited method at the very end. 2009-11-12 18:34:53 +00:00
46330d8042 Revert r2738 - not the cause of issue #1439 2009-11-11 22:36:38 +00:00
f56b1ee76a Try to fix another unreproducible exception on older servers which fail to SHOW TABLES FROM information_schema. Probably fixes issue #1455 and issue #1439. 2009-11-11 20:48:00 +00:00
c835402544 Try a performance optimization: avoid calling mysql_data_seek() in SetRecNo() if not needed - mysql_fetch_row() already does it well enough for successive browsing through records. Only noticable on large results like it's the case when exporting or grid filling. 2009-11-11 19:29:48 +00:00
88d328aabc Enable multi statements by default for db connection. Fixes issue #274 (again) 2009-11-09 21:58:55 +00:00
45f12594e9 mysql_store_result() + mysql_free_result() are needed for all result queries, in order to unblock the connection. Fixes disconnecting + reconnect in query editor with multiple SELECT queries. 2009-11-02 23:16:38 +00:00
fbe813f88e Implement query timer in connection layer. 2009-11-02 20:26:01 +00:00
d2a6f27fba Reimplement readable error messages for InnoDB's cryptic messages, as in r2593. Broken in r2678. 2009-10-30 16:46:59 +00:00
e3feb56242 Include date + time in disconnect log message. 2009-10-29 21:54:56 +00:00
ef0cc6b5b7 Fix access violations on old servers, fixes issue #1417:
a) On a 4.0 server, mysql_real_query("SHOW TABLES FROM nonexistant_db") returns 0/OK . A 5.x server returns 1. On 4.0 servers mysql_num_rows() then causes an access violation. So, we now gracefully avoid calling it when mysql_store_result() returned nil.
b) Various hardcoded queries like SHOW ENGINES need to be quiet in any error case.
2009-10-29 00:40:31 +00:00
8354c106ca Try to fix broken characters in SHOW CREATE TABLE result by using UTF8StringToWideString(). Fixes issue #1328. 2009-10-28 01:16:29 +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