77 Commits

Author SHA1 Message Date
8ac6fbd15c There is no 64 bit unsigned integer type in Delphi, but MySQL has it: bigint unsigned. Handle these as strings in the table editor. Fixes issue #1489. 2009-11-29 00:18:20 +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
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
e1a9bb0281 Add support for sql_mode=ANSI_QUOTES in table editor. 2009-11-06 21:59:33 +00:00
c560d5a37e Do not clone collation when adding a new column. Better use the table's default collation. Fixes issue #1429. 2009-11-03 19:38:28 +00:00
f3ff47313c TStringList.CommaText seems to interprete spaces also as comma. Messes foreign key columns if one of them has spaces. Fix that by using Explode() and ImplodeStr(). 2009-10-30 16:36:24 +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
37cae6cdb4 Discard cashed stuff for data tab when the table was altered. Fixes issue #1376. 2009-10-15 20:35:33 +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
a5da6f7255 Implement forgotten checksum option for existing tables. Fixes issue #1358. 2009-09-16 18:40:46 +00:00
2146332be6 Automatically refresh children of active database node after creating a new table or renaming one. Fixes issue #1248 and part 1 of issue #1352 2009-09-12 06:47:17 +00:00
7013441d1f Table editor: When adding a new column and the focused one is used as template, make sure we don't overtake the AUTO_INCREMENT default, as there can be only one auto-inc column in a table. 2009-09-05 09:59:10 +00:00
2f11cbca88 Table editor: When creating a new index by using the columns context menu "Create index", use the concatenated column names as index name, instead of "Index 123". 2009-09-05 09:50:02 +00:00
eb955ac3b3 D'oh - missing file for previous commit 2009-09-05 09:48:06 +00:00
a7eedd3823 Table editor, "Add column" action: Pointer to added TColumn object was mixed up with an existing column. ALTER code also needs to follow the order of tree nodes. Fixes issue #1340 . 2009-09-05 09:30:49 +00:00
a2c327fd26 Find a more self-explanatory name for ResetVTNodes() 2009-09-03 22:26:40 +00:00
be2ec499f8 Refactor internal handling of columns in table editor. Replaces the multi TStringList workaround with a more readable, object oriented approach. One minor visible effect is lightning fast initializing on very huge tables with several 100 columns. Apart from that this change should not affect any visible stuff. 2009-09-03 22:18:29 +00:00
9ff75351fd Don't eat leading whitespace, needed for separation to base ALTER query. Fixes issue #1333 2009-08-31 19:54:00 +00:00
9e731a78e1 Allow columns to have no default value at all. Important for TEXTs and BLOBs which cannot have one. Fixes issue #1261. 2009-08-30 18:31:31 +00:00
b1aaeaaaf4 Disable foreign key editor for table engines which don't support that. Display a red hint label so the user knows what to do to enable foreign keys. 2009-08-23 21:59:57 +00:00
679bbb428c Fix column clause detection of SHOW CREATE TABLE result, so foreign key clauses are not displayed as columns. 2009-08-23 18:49:27 +00:00
c058039c40 Allow reference table in foreign key tab to be from a different database. See comment #17 in issue #400 : http://code.google.com/p/heidisql/issues/detail?id=400#c17 2009-08-22 16:07:03 +00:00
8e57faf265 Start editing in columns list only on exact label click. Should avoid annoyance described in issue #1305 2009-08-19 05:57:29 +00:00
6517a04eff Implement creation and editing of foreign key constraints in a separate new tab on the table editor. Fixes issue #400. 2009-08-16 20:32:37 +00:00
ab60b78dba Only autostart grid editor if mouse hit was *exactly* on the cell text. Avoids annoyance in index editor. 2009-08-16 09:50:57 +00:00
4ff1acf408 Refactor session manager:
* Replace the pulldown by a list to get a better overview
* Display last connected and created date in details
* Prompt user on form closing if modifications should be saved
* Remove moreorless useless image
* Remove options "timeout" and "sort database"
TODO: Display some help text on the right side when no session at all is existant to help new users.
2009-08-09 23:57:52 +00:00
2e7022a945 Bold font for primary key columns in table editor. Icons for all key columns, similar to earlier versions of ListColumns on mainform. Feels very useful for a quick look when the index editor is mostly not active. 2009-07-29 20:50:41 +00:00
0e15201c71 Again, found a table with ON UPDATE CURRENT_TIMESTAMP clause which was not correctly detected. Fix case sensitiveness. 2009-07-27 22:38:07 +00:00
be834ab34a Fix detection logic in table editor for columns which allow NULL. Fixes issue #1270. 2009-07-27 22:15:57 +00:00
c15654aacb Do not eat last char of data type, using .+ in regular expression. Fixes issue #1260. 2009-07-27 20:10:05 +00:00
4d9d5a1ff7 Enable multi row selection in table editor's column list. Relevant functions adjusted:
* Add to index
* Create index
* Remove Column(s) (=> makes the "Clear columns" button superfluous)
2009-07-26 19:45:02 +00:00
d3b1cf80c9 End possible opened grid editor when tab focus changes, which unfortunately doesn't fire the OnExit event into the editor. Fixes issue #1273 2009-07-25 21:28:39 +00:00
e0761cedd9 Extend context menu of columns list in table editor with auto index creation/addition. Fixes issue #1269. 2009-07-25 19:35:09 +00:00
c7da465f11 Do not use blended datatype colors for displaying a NULL default value in the table editor, instead use clGray. Seems to steel attention when everything's too much colored. 2009-07-23 21:08:04 +00:00
97839a0409 Prefer our own inplace editor for editing column names, length and other properties in the table editor. Fixes issue #1253 2009-07-22 20:23:31 +00:00
a6e0bb6dc8 Fix issue #1270, Table editor detects DEFAULT 'xyz' as DEFAULT NULL if table has collation 2009-07-22 20:18:41 +00:00
0c3bc34802 Fix issue #1265 2009-07-22 05:50:07 +00:00
886f67cb62 Refactor grid editors unit: Implement a base class with all stuff which was implemented redundant previously and let all other editors descend from this class. Saves ~300 lines of code and makes implementing new editors easier.
Additionally this implements tabbing through edited fields for all grid editors. And it fixes issue #1266, issue #1267, issue #1253, issue #1178, issue #1155, issue #825 and issue #566 .
2009-07-20 23:07:28 +00:00
e2b252a906 Implement a new datatype selector for the table editor, including groups, datatype colors and help hints. Fixes issue #1214 and issue #1165 . 2009-07-07 23:31:16 +00:00
b12a115962 Add some intelligence to the table editor:
* Suggest length/set if required by newly selected data type
* Switch default value from NULL to empty string if "Allow NULL" was unchecked
2009-06-22 22:20:32 +00:00
3a5afde4d8 Table editor: Give default values a special color, leave text types black. 2009-06-22 21:57:04 +00:00
ce155c1a98 Fix issue #1236 Wrong DEFAULT value detection in table editor 2009-06-21 12:24:19 +00:00
0ab2599a17 Code cosmetic: Make CREATE and ALTER TABLE code more compact and readable by removing spaces between name/value pairs. 2009-06-18 19:45:14 +00:00
30f84c93a6 Use mainform's status panel and progressbar to display messages instead of a separate label on the table editor. 2009-06-18 19:33:51 +00:00
2f09c7760f A single quote in DEFAULT 'XYZ' and in COMMENT 'XYZ' gets escaped by single quote. Remove the escape char to fix duplicated single quotes in the end. 2009-06-18 19:12:56 +00:00
9db8a6c6ea Detect all column properties from a SHOW CREATE TABLE result, instead of SHOW FULL COLUMNS, so the missing ON UPDATE CURRENT_TIMESTAMP can be taken into account. The new parsing part in is probably slightly unstable yet, although tested on 4.0, 4.1 and 5.1 servers. Fixes issue #1133. 2009-06-18 19:02:07 +00:00
f6b4ac2a78 Add a workaround for a bug in SHOW FULL COLUMNS on 4.1 servers. Fixes issue #1224 2009-06-15 12:11:15 +00:00
d26d93aefa Sanitize MySQL structure unit:
* Remove old, unused code (TMysqlIndex, TMysqlField)
* Move relevant code from helpers to mysql_structures unit
* Rename various stuff to more compact names
* Use ordinal values instead of constants for datatypes and their categories
* Replace TGridColumn.IsXYZ boolean's by a new .DatatypeCat property
2009-06-14 19:45:48 +00:00
f86330032e Table editor: Fix empty index and collation clauses and friends, in ALTER and CREATE TABLE statements, mentioned in issue #1203 . So the user gets a more specific error message 2009-06-13 10:20:16 +00:00