From e233d96b449e3683de345030a2d8ff96a972ed0f Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sat, 4 Oct 2025 12:23:03 +0200 Subject: [PATCH] Issue #2266: move INVISIBLE clause for MySQL/MariaDB table columns after the virtual and generation clause --- source/dbconnection.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 2dcac17f..42e66d25 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -10959,10 +10959,6 @@ begin Result := Result + ' '; // Add space after each part end; - if InParts(cpInvisible) and Invisible and FConnection.Has(frInvisibleColumns) then begin - Result := Result + 'INVISIBLE '; - end; - if InParts(cpAllowNull) and (not IsVirtual) and (not FConnection.Parameters.IsAnyMSSQL) then begin if not AllowNull then Result := Result + 'NOT NULL ' @@ -11012,6 +11008,10 @@ begin Result := Result + 'AS ('+GenerationExpression+') ' + Virtuality + ' '; end; + if InParts(cpInvisible) and Invisible and FConnection.Has(frInvisibleColumns) then begin + Result := Result + 'INVISIBLE '; + end; + if InParts(cpComment) then begin if (Comment <> '') and FConnection.Parameters.IsAnyMySQL then Result := Result + 'COMMENT ' + FConnection.EscapeString(Comment) + ' ';