267 Commits

Author SHA1 Message Date
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
8c6ed30ffa Scale controls of object editors for large DPI mode in OnCreate, not in Init(). Fixes issue #1865. 2010-04-18 21:46:13 +00:00
46fd8f5e99 Handle geo spatial values like we handle binary data. Use hex editor, and fetch contents using BinColAsHex(). Fixes issue #1855. 2010-04-14 21:35:04 +00:00
f451d061eb Introduce 2 new columns in Host > Databases: "Last modification" and "Events". Plus:
* enhance db object lists for storing additional details like last modification and data size
* remove home brown Min() and Max() functions and use those from Math unit which are not restricted to Integers.
2010-04-11 12:03:07 +00:00
5f8300e994 Fix usage of wrong regular expression match number. Fixes issue #1834. 2010-04-08 23:39:26 +00:00
5131f2a4de Fix "List index out of bounds" in HandlePortableSettings() when Explode adds an empty item onto the end, since r3231. Fixes issue #1838. 2010-04-08 23:30:00 +00:00
5f9129bef2 Implement event editor for MySQL 5.1+ servers. Also, simplify some code around database objects and their editors. Fixes issue #1527 2010-04-08 23:16:40 +00:00
45ba97b13f Add button and global action for executing selected functions and/or procedures by click. Fixes issue #1818. This requires some parsing code to be moved to helpers unit so it's also available in ListTables' context menu. Also, to avoid new AVs, any db object editor now focuses the edited object in the tree, which is important for creating new ones which were neither existant nor focused. 2010-04-04 22:33:12 +00:00
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
79fc6c74d4 Modify logic in Explode(), so it returns an empty last segment when returning list has one or more items already. Fixes issue #1821. 2010-03-31 11:08:51 +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
42fae0ebd6 In portable mode, auto delete left behind registry keys from earlier instances which didn't do that themselves, because they were closed unclean or terminated by user. 2010-03-26 21:08:48 +00:00
254c156964 Use id of current process in registry key, not the thread id. 2010-03-25 22:26:19 +00:00
954b32b0df Display "HeidiSQL Portable" in window title 2010-03-25 22:13:18 +00:00
61e4ff0603 Add option to export SQL to clipboard. Fixes issue #1798 and issue #506. 2010-03-24 22:22:21 +00:00
1ef9ebf07b Fix wrong ALTER code when changing a column name more than one time. Fixes issue #1792. 2010-03-24 17:18:48 +00:00
ed5ec1e122 Rethink portable releases:
* Remove complicated and unreadable NSIS stuff. No need to have a installer for a developer application. ZIP file is fine.
* On startup, if a portable_settings.txt exists in the application folder, heidisql.exe will read its contents into a unique registry key.
* In MainForm.OnDestroy, settings are written to that file again, and the reg key gets deleted.
* Avoid using Microsoft's .reg file syntax, as you need admin privileges to store and restore such files, even when using the appropriate Windows API functions.
2010-03-22 21:10:38 +00:00
be645ac79b Unify code for refreshing Virtual Trees in a new helper method InvalidateVT. Fixes issue #1789 and issue #1790.
* Don't try to access a passed tree if it has been destroyed by some earlier event.
* Don't try to access registry in DoDisconnect after key has been closed.
* Now that DoDisconnect lives in FormDestroy it is save to call it slightly earlier, before registry has been closed. There should be no later paint events which will trigger random database queries.
2010-03-21 10:43:16 +00:00
067036c7ef Make regular expression safe against huge length/set attributes of column types. Fixes issue #1786. 2010-03-20 22:32:57 +00:00
860390e986 User manager: Add button to generate a random password. Fixes issue #1460. 2010-03-16 23:50:40 +00:00
9d18bd433e Don't touch X() SQL function from being uppercased and detected as keyword in pretty formatter, so that hex values like "0x0101" don't break. Fixes issue #1736. 2010-03-16 23:04:01 +00:00
71c687986f When dragging a table into a query editor while Shift is pressed, include its database name. Fixes issue #1749 . Fixes issue #1661. 2010-03-15 23:40:26 +00:00
fc31018600 Display key icons in data grid column headers 2010-03-14 12:22:05 +00:00
e417eef591 Datagrid: To reduce network traffic and loading time, reintroduce the old LEFT() strategy for potentially large columns. 2010-03-12 21:27:19 +00:00
7bb3cfdfb5 Ensure both overloaded SelectNode procs do the same with the desired node. 2010-03-08 23:23:37 +00:00
d35815de77 Code cosmetic: rename showstatus to ShowStatusMsg 2010-03-08 23:21:34 +00:00
553bcc54c7 Include HTML portion when copying SQL to clipboard, so rich text applications like MS Word get highlighted SQL. Fixes issue #1740. Todo: Find out why OpenOffice Writer does not accept these HTML fragments. 2010-03-06 08:46:37 +00:00
5e4238fa7f Minor: Just process initialized nodes in DeInitializeVTNodes(). Can produce AVs otherwise on startup, and makes superfluous loops on non initialized ones. 2010-03-03 23:49:23 +00:00
b8fd48a6cb After setting grids to multi line mode their vertical scrollbar was not updated. Fix that. Additionally, let FixVT() do what's required instead of doing that in OnInitNode respectively the "Apply" action on the preferences dialog. 2010-03-03 23:46:01 +00:00
458b4c3acf Introduce a more simple strategy in data tab grid for loading data:
* Load in OnBeforePaint, if the tree's tag is set to NOTLOADED
* Load 1,000 rows in one step, up to a maximum of 100,000 rows. Both values are customizable.
* Load next chunk when user presses PageDown on the last node, or, more explicitly, when user clicks "Next rows" button
* Should fix all AVs which seem to be a timing issue with loading data on demand.
* Fixes issue #1675, fixes issue #1580, fixes issue #1721, fixes issue #1734, fixes issue #972
2010-03-01 16:44:36 +00:00
3e4d47d1c9 Don't prompt more than one time if a table, trigger etc. should be saved, after user clicked "No" and focused a different db tree node. Fixes issue #1715. 2010-02-24 23:07:17 +00:00
25be03a4b0 Parse result of SHOW CREATE PROCEDURE, instead of querying information_schema.ROUTINES, which seems broken as escaped quotes appear non-escaped here, on a 5.1.22 server. Fixes issue #1713. 2010-02-23 21:25:48 +00:00
812cbc82b6 Apply a new style to the user manager dialog:
* Use 2 VirtualTree's instead of broken TComboBoxEx pulldown's
* Enlarge the user list so all items are visible at once
* Privilege objects now use a tree style, 1st level is the objects name, 2nd level is the privilege name ("select", "update" ...)
Fixes issue #1707
2010-02-20 17:12:54 +00:00
29bd958a9f Work around too few items in TComboBoxEx in higher DPI modes. Fixes issue #1707. 2010-02-19 07:10:01 +00:00
4e5468f709 GetParentForm() returns the parent form of a frame. So, list layouts were saved with potential naming conflicts in registry since table editor and friends are TFrame, not TForm. Solve that by implementing GetParentFormOrFrame() and add that control's name to all relevant registry names in SaveListSetup() and RestoreListSetup(). This resets everyone's favorite list layout once, using this new build, but that should not be a problem. 2010-02-17 09:20:26 +00:00
d10929dbe8 Fix broken ALTER TABLE code when dropping primary key. Fixes issue #1688. 2010-02-12 19:19:48 +00:00
9192543d8c Auto create pretty foreign key name "FK_thistable_reftable" if it was not customized yet. Fixes issue #1671. 2010-02-07 12:14:22 +00:00
788cbf565f End editing with home brown editors when the underlying tree scrolls, to avoid a misplaced cell editor. Fixes issue #1670. 2010-02-07 11:59:36 +00:00
fc6d4c2a48 Try to fix most DPI related glitches. Especially TFrames need a ScaleBy() call, which is done automatically on TForms. Fixes issue #1656. 2010-02-04 23:50:47 +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
5d7b25d7e9 Add preference option to restrict number of application instances to 1. If the executable is open and called a second time, it's brought to foreground. Plus, if a filename was passed, a new tab is opened. Should fix a part of what is described in issue #1332. 2010-01-24 00:14:23 +00:00
f7ed772b29 Code cosmetic: Remove dead code, and bring some variables into the right order 2010-01-24 00:03:51 +00:00