mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Try successive regular expression executions instead of only the first one on a "table clause" before giving up. Hacks around special case "INSERT INTO foo SELECT t. FROM foo f". Fixes issue #1311.
This commit is contained in:
@ -4173,12 +4173,16 @@ begin
|
||||
for i := 0 to Tables.Count - 1 do begin
|
||||
// If the just typed word equals the alias of this table or the
|
||||
// tablename itself, set tablename var and break loop
|
||||
if rx.Exec(Tables[i]) then begin
|
||||
if rx.Exec(Tables[i]) then while true do begin
|
||||
if PrevShortToken = WideDequotedStr(rx.Match[3],'`') then begin
|
||||
tablename := rx.Match[1];
|
||||
break;
|
||||
end;
|
||||
if not rx.ExecNext then
|
||||
break;
|
||||
end;
|
||||
if tablename <> '' then
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
rx.Free;
|
||||
|
Reference in New Issue
Block a user