From 721df2da37977948ee4031e6fd7216d48d3fde85 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Fri, 16 Aug 2013 04:37:00 +0000 Subject: [PATCH] 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 --- source/dbconnection.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index ebcfa784..ae235225 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -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;