Disable generation of ib_logfile0,1...

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
rahucha
Posts: 24
Joined: Tue 18 Nov 2014 09:52

Disable generation of ib_logfile0,1...

Post by rahucha » Mon 02 Apr 2018 09:04

Hi,

I'm using MyDac with an embedded database and it automatically generates log files such as ib_logfile0, ib_logfile1, etc.

Is it possible to disable the generation of such files?

Thanks!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Disable generation of ib_logfile0,1...

Post by ViktorV » Mon 02 Apr 2018 10:21

To solve your task, you can try to use the OnLog event handler: https://devart.com/mydac/docs/Devart.My ... .OnLog.htm

rahucha
Posts: 24
Joined: Tue 18 Nov 2014 09:52

Re: Disable generation of ib_logfile0,1...

Post by rahucha » Mon 02 Apr 2018 14:56

Thanks! I'll try that.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Disable generation of ib_logfile0,1...

Post by ViktorV » Mon 02 Apr 2018 15:25

You can find more information about work with MySQL Embedded Server here: https://www.devart.com/mydac/docs/using ... server.htm

rahucha
Posts: 24
Joined: Tue 18 Nov 2014 09:52

Re: Disable generation of ib_logfile0,1...

Post by rahucha » Tue 03 Apr 2018 08:21

Hi Viktor,

I have tried the following but the LOG is still generated:

Code: Select all

procedure Database_OnLog(LogString: String);
begin
end;


procedure Database_Initialize(DatabasePath:String);
var
  ...
  LogFunction: ^TMyLogEvent;

begin
    FDatabaseEmbedded := TMyEmbConnection.Create(Sender);
    ...
    LogFunction := @Database_OnLog;
    FDatabaseEmbedded.OnLog := LogFunction^;

    FDatabaseEmbedded.Connected := True;

    ...
end;
I have put a breakpoint on "Database_OnLog" and it's never reached. Maybe I'm doing it incorrectly? I'm creating the embedded database connection in runtime.

Thanks

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Disable generation of ib_logfile0,1...

Post by ViktorV » Wed 04 Apr 2018 09:03

To solve your task, you can check Disable the InnoDB storage engine on the Params tab in the properties editor of the TMyEmbConnection component.

rahucha
Posts: 24
Joined: Tue 18 Nov 2014 09:52

Re: Disable generation of ib_logfile0,1...

Post by rahucha » Thu 05 Apr 2018 08:29

Thanks a lot! It works fine!

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Disable generation of ib_logfile0,1...

Post by ViktorV » Thu 05 Apr 2018 09:07

It is good to see that the issue has been solved.
Feel free to contact us if you have any further questions about our products.

Post Reply