Commit Graph

5018 Commits

Author SHA1 Message Date
Ansgar Becker
e5113a4260 Fix unquoted enum and set values in SQL export. 2009-11-22 23:48:28 +00:00
Ansgar Becker
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
Ansgar Becker
46c650eabd Remove dead code. 2009-11-22 18:20:52 +00:00
Ansgar Becker
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
Ansgar Becker
6491160c99 Remove progress form for "Insert files" dialog. Instead, use the universal progress bar on main form's status bar and integrate existing code into the dialog's unit. 2009-11-21 17:22:40 +00:00
Ansgar Becker
d6367a09fa Code cosmetic in "Insert files" dialog:
* Make sure the INSERT query is fired within a try/except block, and keep form open on any error
* Reasonably rename some component names
* Remove InsertFilesWindow(), instead cache the instance of InsertFiles in main form, like it is for most other dialogs
* Get rid of a with .. do block
* Ger rid of a weird form pointer, instead use the "Owner" property
2009-11-21 16:44:31 +00:00
Ansgar Becker
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
Ansgar Becker
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
Ansgar Becker
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
Ansgar Becker
c15b1e4b43 Add a second column to the checkbox tree to display sizes of tables, like it is in Mainform.DBtree 2009-11-21 07:45:25 +00:00
Ansgar Becker
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
Ansgar Becker
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
Ansgar Becker
c667008483 Performance: Avoid one last empty and useless SELECT query 2009-11-19 20:11:30 +00:00
Ansgar Becker
8fbc923828 Format numbers in result log in regional format 2009-11-19 19:51:36 +00:00
Ansgar Becker
786c5becfd Remove design time caption from target items combo box, so the very first call of this dialog does not show "comboExportOutputTarget". 2009-11-19 19:31:12 +00:00
Ansgar Becker
c0a9b63f98 Fix fetching binary field data. Fixes issue #1478 2009-11-18 23:59:52 +00:00
Ansgar Becker
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
Ansgar Becker
3daa4dcf18 Finetune column header in log grid of table tools dialog: Allow column dragging, hot tracking and auto-resizing on doubleclick. 2009-11-18 21:08:05 +00:00
Ansgar Becker
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
Ansgar Becker
d2e5d1853b Fix another exception cause for issue #1462 2009-11-17 16:38:41 +00:00
Ansgar Becker
83a8df4f64 Keep release version number also in builds, instead of x.y. Can help to identify the right version one is using and looks less ugly in all places. Fixes issue #1372. 2009-11-17 00:30:00 +00:00
Ansgar Becker
871ccab71c Views have to be exported at the very end so importing such a file does not fail if a view points to a later created table. See issue #281. 2009-11-17 00:15:38 +00:00
Ansgar Becker
1984d426d6 Reorganize code in table tools so the code paths get slightly simpler:
* Move code from ProcessTableNode() into Execute()
* Consistently use one procedure per maintenance and find mode like it's already for export mode
2009-11-16 23:49:51 +00:00
Ansgar Becker
d99f85c412 Fix error in logging current row number and calculating the progress percentage. 2009-11-16 19:40:38 +00:00
Ansgar Becker
65923f1f6f Fix fatal memory leak - selected table rows were never discarded while exporting SQL. 2009-11-16 19:33:46 +00:00
Ansgar Becker
bb5c3f40da Prevent query memo height being reduced to 0 pixels, which makes it non resizable for some reason. Fixes issue #1147. 2009-11-16 19:16:45 +00:00
Ansgar Becker
ef5fbe225a Rewrite export to SQL dialog and code. Integrate that into the table tools dialog, let it use the nice checkbox tree and make exporting lighting fast.
* Fixes issue #886 (broken CREATE TABLE)
* Fixes issue #608 (full backup)
* Fixes issue #281 (export views)
* Fixes issue #307 (header in directory mode)
2009-11-16 01:24:49 +00:00
Ansgar Becker
f2007759b4 Fix SQL logging: Also comments may be so large so the get cut off - in that case they were not masked with /* */ 2009-11-15 11:13:40 +00:00
Ansgar Becker
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
Ansgar Becker
e6eb2e529a Auto scroll to first checked db or table node in table tools dialog, so it's visible immediately. 2009-11-12 22:37:57 +00:00
Ansgar Becker
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
Ansgar Becker
5b6c94e8f7 Fix finding selected database in db tree - GetFirstSelected is obviously insufficient although it should do the same. However, fixes issue #1442 2009-11-12 21:01:55 +00:00
Ansgar Becker
bdf1bf42e6 Remove dependency from "Questions" status variable. Seems some servers return wrong values in it which lets the command statistics display wrong percentages. Fixes issue #1463 2009-11-12 20:37:56 +00:00
Ansgar Becker
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
Ansgar Becker
46330d8042 Revert r2738 - not the cause of issue #1439 2009-11-11 22:36:38 +00:00
Ansgar Becker
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
Ansgar Becker
66d80bdeab Avoid accessing GetParentForm if it's already destroyed - hopefully fixes issue #1462 2009-11-11 20:20:07 +00:00
Ansgar Becker
8f12ca9400 Again, try to fix issue #1450 2009-11-11 19:47:07 +00:00
Ansgar Becker
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
Ansgar Becker
f27306899f Avoid setting VT.OffsetXY between VT.Header.Columns.Begin/EndUpdate. Hopefully fixes issue #997. 2009-11-10 23:37:29 +00:00
Ansgar Becker
9092175cc9 Try to fix a "unknown error" when canceling the session manager. Hopefully fixes issue #1450. 2009-11-10 22:56:36 +00:00
Ansgar Becker
8aafc3980f Keep memo with revision logs enabled, even if local executable is up-to-date. Can be useful for reading the changelog at any point. Fixes issue #1452 2009-11-10 22:37:03 +00:00
Ansgar Becker
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
Ansgar Becker
88d328aabc Enable multi statements by default for db connection. Fixes issue #274 (again) 2009-11-09 21:58:55 +00:00
Ansgar Becker
88d7adffad Do not auto initialize all previously initialized (but unselected) database nodes in dbtree. Very useless and time consuming. Instead, collapse all db nodes at that point. Also, this removes one weird effect when switching from server A to server B, when B as initialized db nodes with same names as on A. Also, this should remove an AV mentioned in issue #1428. 2009-11-08 19:23:44 +00:00
Ansgar Becker
b320caef17 Remove dead code 2009-11-08 16:17:12 +00:00
Ansgar Becker
e1a9bb0281 Add support for sql_mode=ANSI_QUOTES in table editor. 2009-11-06 21:59:33 +00:00
Ansgar Becker
809edef3d4 Remove unused variable and fix compiler notice 2009-11-06 21:52:04 +00:00
Ansgar Becker
7f0bdf9e14 Fix duplicated message box asking if modified session parameters shall be saved when clicking "Open" button 2009-11-06 21:34:39 +00:00
Ansgar Becker
362a9fe1fe Ensure we display a message dialog when the user tries an UPDATE, DELETE or INSERT in datagrid and he is not allowed to do that. Could be there are more places like this, f.x. when saving table structure. 2009-11-06 00:04:26 +00:00