203 Commits

Author SHA1 Message Date
ee1fb08158 SQL Process: handling of DELIMITER to mimic mysql CLI (minor fix) 2007-09-25 02:13:03 +00:00
a8809f4975 SQL Process: handling of DELIMITER to mimic mysql CLI 2007-09-25 02:05:38 +00:00
ceccf7dc68 Hide left gutter of SynMemoSQLLog. We neither display line numbers nor bookmarks there. 2007-09-24 23:17:48 +00:00
b7e88148fc Set ActiveLineColor of SynMemoQuery to light yellow, just like in common editor applications. Should make writing queries slightly comfortable. 2007-09-24 23:12:24 +00:00
adfac67b1a Nuke now superflous, redundant table features since we have them all gathered in "Advanced properties" dialog:
- Change table engine via popupmenu in ListTables
- Edit comment via same popupmenu + an own dialog

Not keeping the same feature in different corners of the application looks more straight forward. Users will have exactly one point where they can modify all table related properties. Should simplify it in the end, although some users will have to get used to it.
2007-09-24 22:00:43 +00:00
69572e38a7 Create once and then cache tbl_properties_form when it's needed. Avoids querying COLLATIONS and ENGINES each time the form gets displayed. 2007-09-24 20:04:46 +00:00
6a36dbf83f Minor fix for rev 944: Don't add auto_increment to ALTER statement if it was empty (was silently converted to "0"). 2007-09-24 20:02:39 +00:00
b9155a63ef Minor: Give a menuitem a prettier name. 2007-09-24 19:57:41 +00:00
d69d81a4b1 Renovate "Advanced properties" dialog:
- Drop pagecontrol to access more than one selected table. Didn't seem helpful for any case, looked ugly and was a click hell to use.
- Implement changeable editors for table name, comment, engine, charset, collation and auto_increment value.
- Backward compatibility kept: A 3.23.58 server leads to disabling editors for engine, charset and collation while keeping the others working.

A table's charset and collation can now be provided at creation time and at altering time. Just as it's implemented for databases. Fullfills now most of the wishes in RFE #1693393.
2007-09-24 19:56:16 +00:00
6ae3e42bcd Fix bug in GetFirstWord: Last character was cut if length of input textlength matched the word length. 2007-09-23 22:38:08 +00:00
4b2af25072 Fix bug: MenuChangeTypeClick called MenuRefreshClick, which called RefreshActiveDbTableList + ShowDBProperties, but not LoadDatabaseProperties.
So, after changing the engine of a table the table status dataset was refreshed but never displayed, until having switched to a different db. So, MenuRefreshClick was loading but not displaying the table status.
2007-09-23 22:36:25 +00:00
76a37d3552 Implement selection of character set and collation in "create table" dialog. 2007-09-23 12:24:26 +00:00
04e272e2c6 Display a SQL dynamic preview for the CREATE DATABASE statement using a SynMemo. 2007-09-18 22:44:17 +00:00
5d00783b02 Safety fixes:
- Only generate COLLATE in CREATE DATABASE if CHARACTER SET was not empty.
- Surround CHARACTER SET + COLLATE in version conditional comment.
2007-09-18 22:19:01 +00:00
917ede28d7 Implement new feature: "Alter database", reachable in rightclick menu from within dbtree. Supports renaming a database and changing existing charset + collation. 2007-09-18 22:10:55 +00:00
a0fb2f7f1b Creation of databases should follow the servers charset by default, not the charset of the currently used database. 2007-09-18 16:13:59 +00:00
7c05ba1f75 Recycle CreateDatabase-form after first usage / don't FreeAndNil' it. Avoids 3 SQL-queries for each calling time after the first one. 2007-09-18 16:10:29 +00:00
e1d76db62d Suppress exception message about not finding the ActiveDatabase node in dbtree when
a) option "Remember last used database" is active
b) the last used db was dropped externally or
   the session was just opened with "OnlyDBs" in place and the last db is not contained in this list.
2007-09-17 23:23:29 +00:00
1dbc19b16d Add contributor Mike Lischke for VirtualTreeView 2007-09-17 23:12:43 +00:00
1e08e582e8 Partly fullfill feature wish #1693393 "Selection of charset and engine at creation"
By turning the CREATE DATABASE dialog from an InputQuery into a real form with 2 additional pulldowns:
- character set
- collation

See also: http://www.heidisql.com/forum/viewtopic.php?p=1322#1322
2007-09-17 23:11:39 +00:00
6adaf3bd6a Bugfix: Range error in getEnumValues() for any string without '(' in it, eg popping up the field editor for a 'datetime' field. 2007-09-17 21:08:49 +00:00
fab28c1068 Bugfix: Update control state in optimize table window when switching databases (see code). 2007-09-17 19:25:35 +00:00
4449a6c055 * Bugfix: regression from r903: Fix the last couple of cases where ExecUseQuery was being used to no effect.
* Make export table locks local to current connection work.
 * Bugfix: In non-file mode, export commands go directly to server without being parsed; thus they must not have semicolons at end of sentence.  A regression here causes issue #1747558 and issue #1795486, which this commit fixes again.

(Briefly considered adding a cleanSql() which just runs result := parseSql(sql)[0], which would do the same in fewer lines of code, albeit with the small overhead of having the semicolon both added and afterwards removed again..)
2007-09-17 19:10:38 +00:00
fe893ed517 Bugfix: regression from r903: optimize tables was malfunctioning. 2007-09-17 18:13:23 +00:00
b04631b21e Bugfix: regression from r903: user manager was non-functional. 2007-09-17 16:41:21 +00:00
5cf0d55e9e Make sure current database in dbtree has a fresh tablelist before selecting a newly created table. 2007-09-14 19:17:47 +00:00
e6009d6bc2 Follow up to rev 917: Take care of just created databases on servers with lower_case_table_names = 0. Same goes for creating tables. 2007-09-14 19:09:40 +00:00
1b9b4fb6df Fix bug #1794536 "Export cause SQL Error on MySQL in ANSI - Mode" 2007-09-14 08:55:24 +00:00
11e7f9d82d Replace obsolete function "CompareText" by similar working "AnsiCompareText".
See also: http://www.delphibasics.co.uk/RTL.asp?Name=CompareText
2007-09-13 23:17:51 +00:00
c535625db0 Fix errorhandling when creating databases:
- Let ExecUpdateQuery raise the errordialog if creating a database failed. Tells the user the exact reason for why it has failed, not just a vague guess "Maybe that was not a valid name"
- Avoid a superflous exception when creating a database with upper case characters in it and the server lowercases all dbnames silently. Gracefully compare case-insensitive when searching the new created db in dbtree.
2007-09-13 20:30:42 +00:00
cb3aa812b6 Add menuitem "Lookup field datatype in SQL help" to popupDatagrid. Makes help system more visible. 2007-09-12 08:46:39 +00:00
fe93a520e9 Fix CallSQLHelp to use the correct SynMemo when pressing F1 in SQLlog 2007-09-12 08:33:00 +00:00
912c46b20c Add menuitem "Lookup [keyword] in SQL help" to popupQuery. Many users likely don't know that they can press F1 in SynMemoQuery/SynMemoFilter to do the same, so here's the more visible solution. 2007-09-12 08:31:01 +00:00
e5ccc0716f Bugfix: Regression from r903: Selecting a database then expanding it would cause it to be deselected. 2007-09-11 20:47:43 +00:00
b056d43e4b Fix a range error and various other bugs in vstFreeNode(). 2007-09-11 20:40:41 +00:00
7ef5d4c34b Follow-up to r903: A few more optimizations and fixes. Thanks for the review! 2007-09-11 18:50:45 +00:00
0fc363f988 Bugfix: Load database properties (tables) when switching directly to a new table in another database via the tree. 2007-09-11 18:06:57 +00:00
9409c798ab Remove ActualDatabase and ActualTable variables, plus various minor optimizations that ensued from said change. Fixes a problem where when:
- viewing data in a table
 - switching to query tab
 - pressing master refresh
some of the tabs would disappear.
2007-09-11 15:58:47 +00:00
c8da2bf945 Bugfix: Do not reset the enable state to something incorrect of buttons that already has been given correct state. A regression, not sure from which revision. 2007-09-11 09:55:41 +00:00
c8979cd114 Bugfix: A "for Cardinal(i) := 0 to -1" loop in Delphi will run for 2^32 iterations rather than 0 iterations - when a list given to AddUniqueItemsToList() is empty, avoid starting this for loop and thereby avoid a range error when clicking the '+' sign next to an empty database. 2007-09-11 09:27:17 +00:00
25d6112666 Fix autobuild process which couldn't find compilers.inc. D10 + 11 IDE find it anyway because they have the path set in searchpaths. 2007-09-07 07:41:59 +00:00
c44040387c Fullfill feature wish #1754228 : Sort usernames in User-Manager 2007-09-06 14:46:44 +00:00
970d267a23 Implement feature wish #1779324 : Support for field COMMENT in ListColumns and field editor. 2007-09-06 14:39:11 +00:00
2d20176554 Convert last TSortListView to standard TListView, so we can nuke TSortListView completely from our components list.
The ListView in tbl_properties won't support sorting by columnclicking any longer, but that was useless with such a small amount of items anyway.

Further finetuning of list:
- Disable column-click
- Avoid animation on columns + items creation
- Autosize columns correctly
- Refactor WITH .. DO statements
2007-09-05 09:03:08 +00:00
6d72ead5dd Refactor logic in preferences dialog:
- Consistency:
  - Move all global preferences vars from mainform to childwin.
  - Get rid of unused legacy vars NativeFieldTypes + LanguageOffset
- Readability:
  - Add documentation
  - Prefix preferences vars with "pref"
  - Get rid of WITH .. DO statements
2007-09-03 15:44:18 +00:00
b3b0225f8b Code clean up in ReadWindowOptions:
- Get rid of confusing WITH .. DO statement
- Make code more compact and readable (reverts parts of the dodgy revision 620)
2007-09-03 14:39:53 +00:00
cfc49dc186 Fix broken rev 878: Restore preference "Remember WHERE filters" on startup was using the registry folder of the session although it's a global preference. 2007-09-03 14:23:56 +00:00
d095fdb7cb Revamp "Advanced table properties" dialog:
- Synchronize height of all listviews after moving the splitter on one page.
- Drop maximum dimensions of form.
- Store/restore form and list dimensions via registry
- Documentation
- Simplify code
- Add useful popupmenu with items "Copy" + "Select all" to SynMemos which display the CREATE statements
- Rely on modalresult of form, drop OnClick handler of Close-button
- Format sum of table sizes using FormatByteNumber instead of always using KB as the unit of choice.
- Add a statusbar to the form to signalize that the form can be resized.
2007-09-03 13:59:29 +00:00
16c0ac36b3 MySQL 4.0.1 and above allow moving a columns position within an ALTER TABLE statement. Use that to overcome various risks of the manual mechanism for older servers. 2007-09-03 09:38:20 +00:00
21a7d22af9 TimerProcesslist should not exclusively refresh ListProcesses. Instead it look useful that the other two subtabs ListVariables + ListCommandstats have this auto-refresh feature too. 2007-09-03 09:17:08 +00:00