mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 19:20:17 +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'
|
EscapeFunction := 'E'
|
||||||
else
|
else
|
||||||
EscapeFunction := '';
|
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
|
if rx.Exec(SQL) then begin
|
||||||
FDatabase := Trim(rx.Match[1]);
|
FDatabase := Trim(rx.Match[1]);
|
||||||
FDatabase := DeQuoteIdent(FDatabase);
|
FDatabase := DeQuoteIdent(FDatabase);
|
||||||
|
Reference in New Issue
Block a user