From 407bd83c841304756b3ecc4bbbb047a53eff90b8 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Fri, 20 Nov 2015 16:43:22 +0000 Subject: [PATCH] Add virtual column syntax for MySQL, which seems to differ slightly from the MariaDB implementation. See http://www.heidisql.com/forum.php?t=19405#p19901 --- source/dbconnection.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 2fc73241..8dd116e2 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -4834,10 +4834,10 @@ begin end; // Virtual columns - rxCol.Expression := '^AS \((.+)\)\s+(VIRTUAL|PERSISTENT)\s*'; + rxCol.Expression := '^(GENERATED ALWAYS)? AS \((.+)\)\s+(VIRTUAL|PERSISTENT|STORED)\s*'; if rxCol.Exec(ColSpec) then begin - Col.Expression := rxCol.Match[1]; - Col.Virtuality := rxCol.Match[2]; + Col.Expression := rxCol.Match[2]; + Col.Virtuality := rxCol.Match[3]; Delete(ColSpec, 1, rxCol.MatchLen[0]); end;