mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Fix sloppy regular expression in TDBConnection.DetectUSEQuery which removes too much of trailing quotes in a database name. See http://www.heidisql.com/forum.php?t=22743
This commit is contained in:
@ -3070,7 +3070,7 @@ begin
|
||||
EscapeFunction := 'E'
|
||||
else
|
||||
EscapeFunction := '';
|
||||
rx.Expression := StringReplace(rx.Expression, '%s', EscapeFunction+'['+Quotes+']?([^'+Quotes+']+)['+Quotes+']*', [rfReplaceAll]);
|
||||
rx.Expression := StringReplace(rx.Expression, '%s', EscapeFunction+'['+Quotes+']?(.+)['+Quotes+']?', [rfReplaceAll]);
|
||||
if rx.Exec(SQL) then begin
|
||||
FDatabase := Trim(rx.Match[1]);
|
||||
FDatabase := DeQuoteIdent(FDatabase);
|
||||
|
Reference in New Issue
Block a user