Skip to content

Commit 22dde7f

Browse files
committed
fix: editing table data on mysql versions without generated column support
Refs #462
1 parent e7ea5aa commit 22dde7f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

source/const.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ const
9696
MsgUnhandledNetType: String = 'Unhandled connection type (%d)';
9797
MsgUnhandledControl: String = 'Unhandled control in %s';
9898
MsgDisconnect: String = 'Connection to %s closed at %s';
99-
TextInvalidColumn: String = '?';
99+
// This must be an empty string, otherwise TTableColumn's get GenerationExpression=XYZ on old servers
100+
TextInvalidColumn: String = '';
100101
FILEFILTER_SQLITEDB = '*.sqlite3;*.sqlite;*.db;*.s3db';
101102
FILEEXT_SQLITEDB = 'sqlite3';
102103
PROPOSAL_ITEM_HEIGHT = 18;

source/main.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11012,7 +11012,7 @@ procedure TMainForm.AnyGridEditing(Sender: TBaseVirtualTree; Node:
1101211012
if Assigned(ColInfo) then begin
1101311013
Allowed := ColInfo.GenerationExpression.IsEmpty;
1101411014
if not Allowed then
11015-
ErrorDialog(f_('Column %s is defined as generated. You cannot edit its content.', [Column.ToString]));
11015+
ErrorDialog(f_('Column %s is defined as generated per "%s". You cannot edit its content.', [Column.ToString, ColInfo.GenerationExpression]));
1101611016
end;
1101711017
end;
1101811018

0 commit comments

Comments
 (0)