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

This commit is contained in:
Ansgar Becker
2015-11-20 16:43:22 +00:00
parent c890cf5172
commit 407bd83c84

View File

@ -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;