Overcome MySQL bug #41907 - SHOW EVENTS shows events in other schema.

This commit is contained in:
Ansgar Becker
2010-04-22 16:24:28 +00:00
parent 8208177001
commit 49dce8e08b

View File

@ -1280,29 +1280,31 @@ begin
end; end;
if Assigned(Results) then begin if Assigned(Results) then begin
while not Results.Eof do begin while not Results.Eof do begin
obj := TDBObject.Create; if Results.Col('Db') = db then begin
Result.Add(obj); Obj := TDBObject.Create;
obj.Name := Results.Col('Name'); Result.Add(obj);
obj.Database := db; Obj.Name := Results.Col('Name');
obj.Rows := -1; Obj.Database := db;
Obj.Size := -1; Obj.Rows := -1;
Obj.NodeType := lntEvent; Obj.Size := -1;
Obj.Created := 0; Obj.NodeType := lntEvent;
Obj.Updated := 0; Obj.Created := 0;
Obj.Engine := ''; Obj.Updated := 0;
Obj.Comment := ''; Obj.Engine := '';
Obj.Version := -1; Obj.Comment := '';
Obj.AutoInc := -1; Obj.Version := -1;
Obj.RowFormat := ''; Obj.AutoInc := -1;
Obj.AvgRowLen := -1; Obj.RowFormat := '';
Obj.MaxDataLen := -1; Obj.AvgRowLen := -1;
Obj.IndexLen := -1; Obj.MaxDataLen := -1;
Obj.DataLen := -1; Obj.IndexLen := -1;
Obj.DataFree := -1; Obj.DataLen := -1;
Obj.LastChecked := 0; Obj.DataFree := -1;
Obj.Collation := ''; Obj.LastChecked := 0;
Obj.CheckSum := -1; Obj.Collation := '';
Obj.CreateOptions := ''; Obj.CheckSum := -1;
Obj.CreateOptions := '';
end;
Results.Next; Results.Next;
end; end;
FreeAndNil(Results); FreeAndNil(Results);