Make regex in ParseViewStructure even more loose, this time due to dots in the view's name. See http://www.heidisql.com/forum.php?t=13191

This commit is contained in:
Ansgar Becker
2013-08-16 04:37:00 +00:00
parent 5520e84fc2
commit 721df2da37

View File

@@ -3553,14 +3553,14 @@ begin
'(ALGORITHM\s*=\s*(\w*)\s*)?'+
'(DEFINER\s*=\s*(\S+)\s+)?'+
'(SQL\s+SECURITY\s+\w+\s+)?'+
'VIEW\s+(([^\.]+)\.)?([^\.\(]+)\s+'+
'VIEW\s+[^\(]+\s+'+
'(\([^\)]+\)\s+)?'+
'AS\s+(.+)(\s+WITH\s+(\w+\s+)?CHECK\s+OPTION\s*)?$';
if rx.Exec(CreateCode) then begin
Algorithm := rx.Match[3];
Definer := DeQuoteIdent(rx.Match[5], '@');
CheckOption := Trim(rx.Match[13]);
SelectCode := rx.Match[11];
CheckOption := Trim(rx.Match[10]);
SelectCode := rx.Match[8];
end else
raise Exception.CreateFmt(_('Regular expression did not match the VIEW code in %s: %s'), ['ParseViewStructure()', CRLF+CRLF+CreateCode]);
rx.Free;