288 Commits

Author SHA1 Message Date
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
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