83 Commits

Author SHA1 Message Date
3b0f5be4bb Implement handling of maximum input length for the memo editor 2008-08-10 15:34:47 +00:00
aabd4bbf57 Add some more support for databases and tables with unicode characters. 2008-08-08 19:32:24 +00:00
bf24403596 * Crashed tables were mistaken for views. Fixes issue #650.
* Add separate node type for crashed tables, so that some sort of a graphic can be associated with those.
2008-08-07 23:17:28 +00:00
ad9ebc4161 Treat varchars in grids like text fields are treated: green color + memo editor 2008-08-07 23:07:03 +00:00
70370dca8c Always export files in UTF-8. 2008-08-07 19:44:40 +00:00
bfbf1ee2f1 Terminology update: a table consists of columns vs rows, and the intersection of a row and a column is called a field.
(Except for Delphi's TField and MySql's FIELD, obviously, which are harder to fix.)
2008-08-07 18:56:06 +00:00
b98c532c9e Fix bug #655: Export function failure with datatype double. Also applies for floats in WHERE clauses in grid editing. 2008-08-05 21:22:55 +00:00
732fadd17a Try to fix bug #620 "Export utf-8 table content broken" by using WideStrings in all relevant places. Couldn't find a way to fix TZConnection.GetEscapeString, so this replaces that call by WideStringReplace which should do the job as well (although I remember that was a performance problem on large memos).
Todo: TField.AsWideString seems to be broken for ftMemo fields with utf8 collation.
2008-08-04 20:39:33 +00:00
aa0bd953c6 Replace TNTDBGrids with VirtualTrees to enhance grid viewing and editing.
Affected issues: rfe #618, rfe #464, bug #324, bug #635 (maybe more)
Breaks: Unicode grid editing (due to yet unsolved bug #620), enum pulldowns, MEMO editing
Major changes:
  - editor tab at bottom completely removed, SQL log is always visible now.
  - memo, blob and enum editors don't have a replacement yet. This is left for later commits.
  - grid cells are colorized to signalize their datatypes
  - UPDATEs, DELETEs and INSERTs are composed by own code, no longer by Zeos internal mechanisms. Should make debugging easier.
  - UPDATEs + DELETEs on tables without unique key are blocked now.
  - editing in the query grid is always blocked. Would need some extensive parser to allow that.
2008-08-03 19:30:07 +00:00
68b4619b4c Code page 950 is Microsoft's implementation of the Big5 character set. Fixes issue #647. 2008-07-30 07:36:01 +00:00
db1dae81de Merge old code from IsValidDelimiter into Mainform.SetDelimiter so it creates the same validation error messages as before, also in parsesql() now. Formal adjustment: SetDelimiter raises an exception now for invalid values which has to be caught by parsesql() instead of just displaying a returned message string. 2008-07-08 22:16:04 +00:00
815aaaf3e7 Fix remembering delimiter string after detecting one with parsesql() 2008-07-07 05:38:37 +00:00
1d3bfe6219 Fix and simplify delimiter customizing, now that the dropdown was moved to the mainform and didn't fire the OnExit event any longer for some reason. The new mechanism just uses a button (surely including a new icon, sigh...) which asks via InputQuery for the new value. Delimmiter "validation" is only done when setting the value per button, not in parseSql() any longer - avoids being bug-per-bug compatible with MySQL's SQL parser at least in the non interactive mode.
(Hope that code is ok with Franciscos original implementation. At least the old validation IF's are adapted)
2008-07-06 20:22:16 +00:00
ab291881e1 Slightly enhance open SQL file mechanism:
- Open the file in "read and leave" mode, don't lock it for write operations. This fixes opening a file which is opened and write locked in another application
- Handle exceptions for ReadTextfile in QueryLoad which was malfunctioning yet, lead to an AV.
- Enhance inline documentation
2008-07-05 10:00:55 +00:00
84c3e0d260 Make various clipboard actions Unicode compliant:
- Copy (+ export to file) data as html, xml or csv
- Copy + paste actions in the grids
- Copy memo content
2008-06-26 12:37:34 +00:00
5c7631796f Add specific modes supposed to include various brokenness in mysqldump. Hopefully we won't have to discuss whether to account for a specific brokenness in mysqldump ever again. I almost couldn't be happier if MySQL actually fixed their bugs ;-). Fixes issue #537. 2008-06-25 05:46:19 +00:00
d137917930 Add code page 936 <-> gbk. 2008-06-25 04:23:00 +00:00
173aca5009 Make sstr() unicode compliant to fix bug #313 "Run SQL file dialog fails for German umlauts in file" 2008-06-24 20:22:00 +00:00
faf1c73da9 Fix compiler error, caused by accidently left testing line in last commit. 2008-06-22 17:48:55 +00:00
3a1d54da86 Fix bug #574 "UTF-8 textfiles without BOM are read as ANSI files". Split out character set detection to GetFileCharset and leave TStream creating in OpenTextFile(). 2008-06-22 17:45:11 +00:00
0dc750c1a7 Fix ReadTextfileChunk:
- Extend ChunkSize parameter to fit with Stream.Size
- Avoid exceeding file end if the passed ChunkSize is higher than the length of the left data
2008-06-19 19:38:39 +00:00
58230fea56 Rename ReadUnicodeFile to ReadTextfile and split it into 3 different procedures:
- OpenTextfile
- ReadTextfileChunk
- ReadTextfile
Enables us to use the unicode detection in places where we need to read a file chunkwise. (e.g. the runsqlfile unit)
TODO: Fix UTF-8 detection, misdetected as ANSI currently.
2008-06-19 19:08:54 +00:00
b2bf8a4828 Add helper "ReadUnicodeFile" 2008-06-17 22:27:13 +00:00
f7ad90cd40 Add helper "SaveUnicodeFile" 2008-06-17 19:16:11 +00:00
dced2df45e Make query execution unicode safe, mainly for a bunch of procedures and functions in Heidi itself plus various neighbours in Zeos. 2008-06-17 17:06:01 +00:00
03ca9c92f4 Kill all users of StrUtils. 2008-06-17 12:44:17 +00:00
be831f11b7 Convert parsesql to use wide strings and characters. 2008-06-17 11:56:37 +00:00
2ed4507666 Code cosmetic: Sanitize NODETYPE_BASETABLE constant from superflous "BASE" 2008-06-14 12:48:04 +00:00
a2f3c7fcbf Try to fix bug #317 "Interface won't restore" by calling ActivateMainform() at startup 2008-06-14 10:24:05 +00:00
d0a0a22443 Display sizegrip in the lower right corners of all resizable forms which have no TStatusbar. (For copyright notices see code in helpers.pas) 2008-05-12 17:55:06 +00:00
bba3d2afc1 Implement option to prefer SHOW TABLES over SHOW TABLES STATUS, as discussed on the mailing list. Fix relevant AVs and detection of VIEW/BASETABLE in GetDBObjectType (at least for 5.0.2+ servers). 2008-04-11 19:23:47 +00:00
56abd6f53d - Fix detection of views in a SHOW TABLE STATUS result. Don't rely on the "Comment" field containing the exact string "VIEW", as it can also contain an error message wrt a corrupted view.
- Show this potential message in the "Comment" column of ListTables
2008-03-23 19:31:04 +00:00
b815b91039 Fix bug #1865477 "Table maintenance does not show any response"
By removing the (superflous) context menu versions of "Optimize", "Check", "Analyze" and "Repair" table.
2008-03-18 19:54:20 +00:00
112ea167a5 Add basic support for views, without changing too much GUI logic:
- Give them their own icon in dbtree and ListTables
- Disable pure table actions (like "Alter table", "Optimize" etc.) in context menus when a view is selected
- Add new column in ListTables: "Type" which is filled either with "Base table" or "View"
- Introduce new property "NodeType" in TVTreeData record, used currently to store NODETYPE_VIEW or NODETYPE_TABLE. This new property is meant to be used for various purposes in other VirtualTrees in the future.
- Introduce Childwin.SelectedTableType, corresponding to Childwin.SelectedTable
- Make DropTable action fit for also dropping views (and surely a list with a mixture of views and tables)
- Don't fetch rowcount from views in DisplayRowCountStats to fix bug #1844952
2008-03-17 20:35:50 +00:00
c81dd21d69 Enhancement for all VirtualTrees: Remember previously selected nodes and restore them after any refresh. Using existing helpers:GetVTCaptions plus new helpers:SetVTSelection 2008-02-29 23:07:47 +00:00
d6d8f88417 Move unused stuff from rev 1209 and 1210 out of the release relevant files, to a place where they can be reactivated if required sometime in the future. The .res file can be restored by calling /extra/updater/makeresource.cmd . 2008-02-23 22:29:41 +00:00
9f23a9b313 Updatecheck: Find a batchfile-solution to replace the running exe with a downloaded build.
TODO: find some sleep command for the batch file, as we sometimes get "access denied" while trying to overwrite the just terminated exe. Seems like taskkill doesn't close all handles itself.
2008-02-23 00:54:02 +00:00
7788014258 Added methods that enable the update of running main application just giving the direction of newest main application file. 2008-02-21 03:01:10 +00:00
52c85ddabc Introduce APPDOMAIN constant (=http://www.heidisql.com/), for usage in various methods. 2008-02-08 21:11:08 +00:00
26f5d5ce88 - Get rid of lame helper notinlist(), use TStringList.IndexOf() instead.
- Get rid of TCreateTableForm.ButtonsChange(), merge code into TCreateTableForm.EditFieldnameChange()
2008-01-11 16:10:14 +00:00
1671ea2c19 Move all code for adjusting CREATE TABLE statements to a specific version from exportsql.pas to fixSQL(). Using SynEdit's nice regular expression object. Fixes bug #1843890 "Exportfile: YPE=MyISAM; (missing T)" 2007-12-17 23:12:35 +00:00
23c13d2531 Cleanup usage of background colors in grids and listviews:
* TNTGrid is not capable of displaying a sort arrow in column titles. So, signalize sort direction of columns in grids and listviews by lightgrey (= ascending) and mediumgrey (= descending)
* Remove special color for NULL cells in grids because it can conflict with the new sorting colors. Instead, place a grey (NULL) text in these cells. Less gaudy colors now.
* Also remove grey background in primary key columns for the benefit of sorting colors. PK cells have bold font anyway, should be noticable enough.
2007-12-01 22:37:21 +00:00
f6d4e637e3 Replace TSMDBGrid in Data + Query tabs by TTntDBGrid.
- Implement an alternative solution for handling sorted columns without usage of SMDBGrid's sortcolumns. Move relevant structures and functions from data_sorting.pas to childwin.pas and use them in both units.
- Upgrade some code parts to use WideStrings instead of Strings so they don't break with the new grid.
- Use Grid.OnDrawDataCell as an alternative to Grid.OnGetCellParams as the latter one is a feature of SMDBGrid
- Cosmetic: enhance screen real estate in viewdata()
2007-11-26 20:58:08 +00:00
cbc37695de Minor: Add/update documentation for MakeFloat 2007-10-23 19:00:54 +00:00
a4406b229f Fix a sorting bug in vstCompareNodes: Floats were always truncated to integers, then compared. So, sorting 0,1 and 0,2 placed these values somewhere between the 0 values.
- Introduce helper "MakeFloat" which does exactly the same as MakeInt except from truncating floats
- Use MakeFloat instead of MakeInt in vstCompareNodes to fix the above mentioned bug
2007-10-21 18:48:23 +00:00
17f9730b76 Fix bugs
#1814411 "Incorrect SQL when changing structure on a field"
#1814293 "Incorrect SQL when changing structure on a FLOAT field"
2007-10-16 19:34:25 +00:00
4286244eda Add meaningful messages to the SQL log when a delimiter is selected or declined. 2007-10-06 00:08:19 +00:00
db55bbcbe3 Code optimization: avoid a Length() call and a comparison in scanReverse(). 2007-10-05 23:08:19 +00:00
4c4c1aabfe Add an extra guard. 2007-10-05 22:26:55 +00:00
e3fb1070d9 Code optimization: remove a superfluous bit compare.
(Guess I'll be the one buying beer ;-).)
2007-10-05 22:11:09 +00:00