308 Commits

Author SHA1 Message Date
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
a40c10b4c4 Return value of FUNCTIONs can contain UNSIGNED keyword, which the regular expression based parser did not expect. Fixes issue #2177. 2010-09-16 19:24:20 +00:00
f86a72dd36 Attempt to fix some weird effects on tree node selection and refreshing logic. Unhides "Data" tab after creating a new table. Fixes issue #2148. Details:
* Do process OnFocusChanged also while tree db refreshes, just avoid calling actEditObjectExecute.
* Make SelectedTable a property, rename to SelectedDbObj
* Remove calls to debug(), prefer LogSQL with lcDebug parameter
2010-09-15 23:09:43 +00:00
39edbd4deb Fix VIEW code parser for name length of only 1 character. 2010-09-10 21:30:09 +00:00
4eb4a68f05 Adjust TDBObjectEditor so it works on its own instance of a TDBObject. Otherwise the object gets freed in ApplyModifications -> RefreshActiveTreeDB -> ClearDbObjects. Afterwards you got unpredictable results with the pointer to the old TDBObject, e.g. the wrong tree node was selected after that refresh. 2010-09-08 22:49:16 +00:00
6fa29605fd SHOW VIEW may be not allowed. Disable VIEW editor in that case, but do not run regular expression into a no-match AV. Fixes issue #2159. 2010-09-08 19:48:18 +00:00
566fe3c149 Fix wrong logic in detection of unformatted number strings, in CleanupNumber(). Fixes issue #2155. 2010-09-08 18:58:06 +00:00
f323420ef1 Enable TDBObject instances to return and cache their own CREATE code, and replace various manual SHOW CREATE xyz occurrences with this new function call. Additionally, modify ParseViewStructure so it takes the CREATE code instead of just the VIEWs name, so it works similar to ParseTableStructure and ParseRoutineStructure. Finally, take this CREATE code to detect all settings for a VIEW, instead of taking them from information_schema.VIEWS. Fixes issue #2131. 2010-09-07 20:58:48 +00:00
455792dc3b Unescape escape sequences in table comment when loading a table into the table editor. Fixes issue #2118. 2010-08-14 15:36:56 +00:00
88e7f7aa05 Implement query profiling in helpers box. Enhance usability of turning the listbox + tabset into a tree, with 5 root nodes instead of 5 tabs. Fixes issue #902. 2010-08-13 19:42:54 +00:00
8c34a9e15a Session manager: Add checkbox option for users who want to be prompted for username + password rather than saving that to registry. Prompt window itself is called from within TMySQLConnection.SetActive. 2010-07-19 20:06:09 +00:00
e3f7072df0 Fix query splitter: "DELIMITER xyz" must be followed by some space char, this is not optionally. Broken in r3432. Fixes issue #2092. 2010-07-16 17:17:49 +00:00
aad99190ae Table editor: Apply default length/set for new columns as long as user didn't touch it. Fixes issue #2084. 2010-07-14 10:52:34 +00:00
39843aabb7 Remove dead code 2010-07-13 16:55:20 +00:00
7cd1c7b0ab Add support for ZEROFILL flag in table editor. Introduces a new checkbox column in the columns list. Fixes issue #570. 2010-07-04 13:35:54 +00:00
49d0bb3193 Remove Mince() function to shorten a file path - setting a label's EllipsisPosition to epPathEllipsis does the same. 2010-07-02 23:26:47 +00:00
ac571734f6 Add menu item for inserting UNIX timestamp into grid cells. Fixes issue #2060. 2010-07-02 22:58:12 +00:00
63a69de637 Adjust offset stuff in SQL splitter routine, DELIMITER department. Fixes issue #2053. 2010-07-01 19:45:23 +00:00
4fb7f4cdc5 When copying HTML from grid rows, StreamToClipboard needs its 3rd parameter set to true to create the required clipboard header for rich text editors. Also, calculate values for StartHTML and EndHTML - seems required by Mozilla based applications like Thunderbird. Fixes unformatted HTML pasted into rich text editors. 2010-07-01 18:58:00 +00:00
780cf0f19f Add support for exporting grids as Wiki table markup 2010-06-30 23:21:28 +00:00
f47eb39316 Merge 5 GridToXYZ export routines into one, so there is less code to maintain and to make it easier to add further export formats. 2010-06-30 22:34:42 +00:00
5d96ec07fc If a file does not contain a BOM, do not advance the stream position for later readers. Fixes issue #2035. 2010-06-21 18:30:18 +00:00
d436df314a Use TOpenTextFileDialog instead of TOpenDialog for two places where we load SQL and text cell contents. That dialog has an additional "Encoding" dropdown, where the user can select the file's encoding, which can be required if the auto detection did not succeed. Fixes issue #2025. 2010-06-20 10:05:37 +00:00
bd3c391b39 Remove remaining wrong \r\n text from LaTeX output. 2010-06-18 18:17:21 +00:00
1d9ae863b2 Tweak LaTeX export: Fix case in all occurrences of "LaTex" - must be "LaTeX" and remove trailing "\r\n" in output. 2010-06-18 17:00:12 +00:00
163a8c13d6 Implement LaTeX output for "Copy as" actions. Code parts from brampton. Fixes issue #2020. 2010-06-18 16:32:20 +00:00
c15baee972 Fix recently broken support for views in "Copy table" dialog. 2010-06-16 22:30:03 +00:00
e16d1bcc59 Fix wrong "DROP [index name]" clause when turning a normal key into a primary key. Fixes issue #2011. 2010-06-16 18:55:33 +00:00
c0da6e5a21 Refactor "Copy table" dialog:
* Replace checkboxes, radio buttons and checklistbox by a VirtualTree using checkbox support
* Support selecting/deselecting single indexes
* Support foreign keys
* Place a SynMemo at the bottom in which the user can type an optional WHERE clause to filter incoming data. Fixes issue #2000.
* Move code for SQL generation into TTableColumn etc.
2010-06-14 00:21:33 +00:00
51158e7700 Fix detected end offset of DELIMITER query. 2010-06-09 22:48:12 +00:00
203c6f214d SQL splitter: At char #1 there may start a comment. Fixes issue #1980. 2010-06-01 17:33:52 +00:00
789567f58c Do not call UnformatNumber() on non-formatted numeric values in grid exports. Instead, format them when option "keep locale numbers" is activated. Broken since r3363. Fixed issue #1976. 2010-05-31 18:15:04 +00:00
5a2d632890 Use TMySQLQuery.Col(x) instead of Grid.Text[Node, x] in grid exports. Dramatically improves performance as Grid.Text calls Grid.OnGetText which has quite some overhead. 2010-05-29 00:39:45 +00:00
2e301d1095 Code cosmetic: Do not pass default parameter in one zillion callers of ShowStatusMsg() 2010-05-28 23:09:38 +00:00
18ec767e7a Closing string encloser must be same as opening one. Fixes issue reported in forum: http://www.heidisql.com/forum.php?t=5856 2010-05-27 20:34:47 +00:00
56ce17181f Move detection of best table name to helpers unit, away from several methods where we make use of it. Fixes issue #1967. 2010-05-27 18:11:51 +00:00
d14efcc922 Indicate SQL errors in progress bar, if Aero is activated. 2010-05-27 00:09:21 +00:00
f3a9265775 String enclosing char must not be counted when previous char was a backslash. Fixes issue #1964. 2010-05-26 23:19:54 +00:00
6694a3247f Allow digits and dot in word characters so ReformatSQL does not split known keywords from database, table or column names. Fixes issue #1944. 2010-05-22 07:01:11 +00:00
d846ff4326 Remove dead code, previously used by rewritten parseSQL(). 2010-05-22 06:47:40 +00:00
3bc8ec6612 In OpenTextFile(), when detecting the file's encoding, loop through 100K of text instead of only 16K, to make it slightly more stable against BOMless files containing only few UTF8 chars. Fixes issue #1860. 2010-05-22 06:45:54 +00:00
e38db938b7 Rewrite parseSQL routine into two new ones: GetSQLSplitMarkers() and SplitSQL(). Also, use these to turn "Run current line" query action into "Run current query". Fixes issue #821. 2010-05-20 18:30:55 +00:00
c733544585 Fix breakage of signed numbers in UnformatNumber(). 2010-05-18 22:21:20 +00:00
03394a8d96 Reformat SQL feature: Introduce a new list of keywords which followers shall not get separated into a new line. Just using the complete list of important keywords does not add a new line in front of WHERE and so on. Fixes issue #1942. 2010-05-15 08:50:59 +00:00
1319abe2c0 Number magic:
* Rewrite UnformatNumber() so it throws away characters other than digits, thousand or decimal separator. This is critical for adding WHERE clauses, where it was previously possible to update a whole table column accidentally: "UPDATE mytable SET numcol=123# WHERE id=567"
* Do not fetch last insert id when user passed a number to it. In that case LAST_INSERT_ID() would return 0
2010-05-10 22:04:21 +00:00
1838a0eaa7 Use original name of a foreign key in DROP FOREIGN KEY query when renaming. Fixes issue #1930. 2010-05-10 18:51:10 +00:00
361580a03c Don't throw exceptions when user tries to set disallowed delimiter, just pop up an error message. Fixes issue #1899. Also, bring some nearby stuff in ExecSQLClick() into the right order: Show hour glass, display number of current query in status bar, and optimize some minor stuff. 2010-05-08 23:20:11 +00:00
7ce555ff1a Straighten sort logic in lists and db tree:
* Let both header clicks and TDBObjectComparer consistently use the same compare callback function CompareAnyNode()
* When refreshing a list, VT.SortTree sorts nodes if toAutoSort is set. Then, selected nodes are mostly different ones than before refreshing. Also, what GetVTCaptions did was only looking after the first column caption which can exist besides duplicates. So, for now, do not restore selected nodes after refreshing a list, which is now more standard behavior.
Fixes issue #1911.
2010-05-06 22:46:35 +00:00
05b07eb8f2 Implement editing capabilities into TMySQLQuery, and make query results editable by using all the same events as in DataGrid. Most probably some bugs to fix now.
* Fixes issue #723
* Fixes issue #873
2010-05-05 21:39:15 +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