Commit Graph

5018 Commits

Author SHA1 Message Date
Ansgar Becker
9b1ba49939 Silence two compiler notices. 2010-05-29 00:23:24 +00:00
Ansgar Becker
7c83d1a01e mysql_data_seek() is required for cumulated results (datagrid) on the very first row of an added result, to avoid AVs when that result has its cursor at the end or somewhere in the middle. Fixes an AV when exporting grid data. 2010-05-29 00:21:38 +00:00
Ansgar Becker
d71f9c7295 Be sure to free the allocated TFileStream also in error cases, to avoid successive AVs when trying to write the same file. 2010-05-28 23:23:44 +00:00
Ansgar Becker
2e301d1095 Code cosmetic: Do not pass default parameter in one zillion callers of ShowStatusMsg() 2010-05-28 23:09:38 +00:00
Ansgar Becker
ac50ae75ce Display status message on long running sort operations in query grids. 2010-05-28 23:00:57 +00:00
Ansgar Becker
32c905524e Set result grid's parent control *before* hiding it. Fixes issue #1973. 2010-05-28 22:48:20 +00:00
Ansgar Becker
5351f8df23 New feature: When mouse hovers over status bar panel holding the server version, display various connection related details in a hint. 2010-05-28 19:41:17 +00:00
Ansgar Becker
3feebd877f Apply a better fitting icon to "Image view" action 2010-05-28 15:34:56 +00:00
Ansgar Becker
389d9a5a9c Invert background colors of selected/unselected result tabs, to enhance readability. 2010-05-28 14:04:02 +00:00
Ansgar Becker
d1db340f7b Wording: Display "Idle" instead of "Ready" in status bar 2010-05-28 13:45:54 +00:00
Ansgar Becker
8f1e3107fa Code cosmetic: Move default status message to the right procedure. 2010-05-28 13:44:58 +00:00
Ansgar Becker
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
Ansgar Becker
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
Ansgar Becker
823269e2ca Fix cosmetic bug in r3347: If very right status bar panel has empty text the hourglass icon was displayed. Instead, force its text in these situation to "Ready". 2010-05-27 07:36:37 +00:00
Ansgar Becker
d14efcc922 Indicate SQL errors in progress bar, if Aero is activated. 2010-05-27 00:09:21 +00:00
Ansgar Becker
e9063271f1 Draw various icons in status bar. 2010-05-26 23:58:30 +00:00
Ansgar Becker
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
Ansgar Becker
9984bf0236 Issue #1135: Implement tabs for multiple batch results in a query tab. Does not yet show multi results of stored procedures. Maximum number of tabs is customizable in Preferences > Data. 2010-05-26 23:11:08 +00:00
Ansgar Becker
53f3010689 Make QuotedDbAndTableName more universal, and let DatabaseName return current db on old servers early. 2010-05-22 07:03:03 +00:00
Ansgar Becker
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
Ansgar Becker
d846ff4326 Remove dead code, previously used by rewritten parseSQL(). 2010-05-22 06:47:40 +00:00
Ansgar Becker
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
Ansgar Becker
6468776ba0 Display size of SQL file while loading into query editor, so it's easier to decide whether to load or run the file. 2010-05-22 06:34:09 +00:00
Ansgar Becker
58b8f5451d "Run current query" ran previous query when cursor is placed behind the delimiter of it. Fixes issue #1956. 2010-05-22 06:19:53 +00:00
Ansgar Becker
779b08bdc8 Fix offset number current query while executing a query batch. 2010-05-21 06:02:50 +00:00
Ansgar Becker
336f991bc2 Display original length of snipped queries in SQL log. 2010-05-21 06:01:43 +00:00
Ansgar Becker
698f078773 When exporting tables with various ENUM columns, these can distort the max-rows-calculation, based on the table's avg_row_len. Instead, examine the current stream's size at the end of each exported data row. Fixes issue #1682 - this time more effectively. 2010-05-20 19:55:29 +00:00
Ansgar Becker
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
Ansgar Becker
c733544585 Fix breakage of signed numbers in UnformatNumber(). 2010-05-18 22:21:20 +00:00
Ansgar Becker
ec16b98755 Cosmetic: Add "approximately" notice behind InnoDB row count, so noone takes the value for real. Fixes issue #1945. 2010-05-18 18:40:15 +00:00
Ansgar Becker
a353aa3008 Introduce helper function TMySQLConnection.DecodeAPIString() which auto decodes incoming data as required by charset. Also, call this on Field.name when fetching column names in TMySQLQuery.Execute - fixes issue #1943. 2010-05-15 17:11:53 +00:00
Ansgar Becker
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
Ansgar Becker
14d39481f1 Again add some more missing keywords to internal list which is used in "Reformat SQL" action besides other places. 2010-05-14 23:04:33 +00:00
Ansgar Becker
f1ae13770d Bugfix: After click on password generator button, user was not marked as modified. 2010-05-14 22:37:53 +00:00
Ansgar Becker
ab210d5758 Add CASE and WHEN to list of keywords, so they are uppercased in "Reformat SQL" action. 2010-05-13 08:50:06 +00:00
Ansgar Becker
4e49324d03 Exports to database + server were missing SET FOREIGN_KEY_CHECKS header + footer. Moving critical Output() procedure from local to private scope, so we can call it in Execute(). Fixes issue #1915. 2010-05-12 19:14:45 +00:00
Ansgar Becker
1ab975b0d5 Move responsibility for well formed floats and integers from TMySQLQuery.SetCol() to caller, so new values don't get touched at all, and to avoid double-unformatted numbers in "Duplicate row" feature. Fixes issue #1936. 2010-05-12 18:33:21 +00:00
Ansgar Becker
dd40361d81 Always invalidate db objects in "Database" tab in some refresh action. Active database is probably even indeterminable within a refresh and so a check for same db name fails and AVs follow because of non initialized nodes in ListTables. Fixes issue #1909. 2010-05-11 22:31:47 +00:00
Ansgar Becker
d3711b5d62 Work around empty members of PMYSQL_FIELD on servers below 4.1 - org_name and db are empty on such servers, but Heidi needs both to compose safe and valid INSERT/UPDATE/DELETE queries. In order to at least allow grid editing, do some unsafe stuff for old servers: Never take db name into posted queries, neither use original fieldnames (instead, use the normal name). Should be ok as this is just to satisfy 2% of all Heidi users. Fixes issue #1934.
See also: http://dev.mysql.com/doc/refman/4.1/en/c-api-datatypes.html
2010-05-11 22:04:24 +00:00
Ansgar Becker
133de5850a Remove unused member 2010-05-10 23:35:09 +00:00
Ansgar Becker
1368508685 Do not display grid cells as modified if new value is effectively the same as the old one. Especially minimizes INSERTs for "Duplicate row" feature. 2010-05-10 23:34:36 +00:00
Ansgar Becker
6355102eb0 In editing mode, when cursor points to a virtual edited row, we need to call mysql_data_seek() in SetRecNo, even if FRecNo points the previous row. Do that by checking for nil. Fixes issue #1931. Fixes issue #1919. 2010-05-10 23:26:47 +00:00
Ansgar Becker
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
Ansgar Becker
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
Ansgar Becker
10ae384a81 Avoid attempt to access item index -1 of internal value list when nothing is selected in an enum editor. Fixes issue #1903. 2010-05-10 18:37:07 +00:00
Ansgar Becker
6c05e7f6c8 AnyGridEnsureFullRow does surely fail on non-result grids. Avoid AV when copying cell text. Fixes issue #1929. 2010-05-10 18:28:08 +00:00
Ansgar Becker
556b0f54a1 Silence compiler warning 2010-05-09 20:46:51 +00:00
Ansgar Becker
2d8633ffcf Enhance auto generation of foreign key names, after user selected the same reference table as in another key, a counter is appended (FK_tbl_rfr_2, FK_tbl_rfr_3, ...). Fixes issue #1894. 2010-05-09 10:04:42 +00:00
Ansgar Becker
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
Ansgar Becker
e258f7ccec mysql_free_result() frees memory but does not set pointer to nil. Do that by hand, so later checks for nil don't run into AVs. Probably fixes issue #1901. 2010-05-08 17:49:47 +00:00