Skip to content

Commit

Permalink
Overcome MySQL bug #41907 - SHOW EVENTS shows events in other schema.
Browse files Browse the repository at this point in the history
  • Loading branch information
ansgarbecker committed Apr 22, 2010
1 parent 8208177 commit 49dce8e
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions source/mysql_connection.pas
Expand Up @@ -1280,29 +1280,31 @@ function TMySQLConnection.GetDbObjects(db: String; Refresh: Boolean=False): TDBO
end;
if Assigned(Results) then begin
while not Results.Eof do begin
obj := TDBObject.Create;
Result.Add(obj);
obj.Name := Results.Col('Name');
obj.Database := db;
obj.Rows := -1;
Obj.Size := -1;
Obj.NodeType := lntEvent;
Obj.Created := 0;
Obj.Updated := 0;
Obj.Engine := '';
Obj.Comment := '';
Obj.Version := -1;
Obj.AutoInc := -1;
Obj.RowFormat := '';
Obj.AvgRowLen := -1;
Obj.MaxDataLen := -1;
Obj.IndexLen := -1;
Obj.DataLen := -1;
Obj.DataFree := -1;
Obj.LastChecked := 0;
Obj.Collation := '';
Obj.CheckSum := -1;
Obj.CreateOptions := '';
if Results.Col('Db') = db then begin
Obj := TDBObject.Create;
Result.Add(obj);
Obj.Name := Results.Col('Name');
Obj.Database := db;
Obj.Rows := -1;
Obj.Size := -1;
Obj.NodeType := lntEvent;
Obj.Created := 0;
Obj.Updated := 0;
Obj.Engine := '';
Obj.Comment := '';
Obj.Version := -1;
Obj.AutoInc := -1;
Obj.RowFormat := '';
Obj.AvgRowLen := -1;
Obj.MaxDataLen := -1;
Obj.IndexLen := -1;
Obj.DataLen := -1;
Obj.DataFree := -1;
Obj.LastChecked := 0;
Obj.Collation := '';
Obj.CheckSum := -1;
Obj.CreateOptions := '';
end;
Results.Next;
end;
FreeAndNil(Results);
Expand Down

0 comments on commit 49dce8e

Please sign in to comment.