Hi.
I created an application that realize an insert in a table in MySQL 4.0. I realized the insert using method ExecSQL
of TZQuery zeosdbo and after that I disconnect from the database using TZConnection.Disconnect.
But executing the command myisamchk it warns about tables closed incorrectly
# myisamchk -s *.MYI
myisamchk: MyISAM file pruebaDesconexion.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
NOTES: I use Delphi 5 with zeosdbo 6.1.5 and libmysql40.dll.
Mysql: client is using or hasn't closed the table properly
Moderators: gto, cipto_kh, EgonHugeist
Ok.
I thought it was problem of the client library that doesn't close correctly the connection.
Executing a command FLUSH TABLE <table> after the insert the myisamchk doesn't give the warning. It would be a good practice executing the flush command after the inserts or it slow down much the application? I ask it because if goes the light the tables could be not closed correctly.
I thought it was problem of the client library that doesn't close correctly the connection.
Executing a command FLUSH TABLE <table> after the insert the myisamchk doesn't give the warning. It would be a good practice executing the flush command after the inserts or it slow down much the application? I ask it because if goes the light the tables could be not closed correctly.
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Well, in my opinion it would NOT be good practice.
Mysql would not keep working this way if it were. I don't remember exactly how they think about this issue. I'm sure it's in the manual. There you can also find a way to flush your tables automaticly if you really have to.
If you need to do the myisamcheck when the database is running, there are safer methods. Please read more about that topic. (the Holy Manual again )
If it stays unclear to you, jou should consult the mysql forums. They usually know more about this database specific issue.
Mysql would not keep working this way if it were. I don't remember exactly how they think about this issue. I'm sure it's in the manual. There you can also find a way to flush your tables automaticly if you really have to.
If you need to do the myisamcheck when the database is running, there are safer methods. Please read more about that topic. (the Holy Manual again )
If it stays unclear to you, jou should consult the mysql forums. They usually know more about this database specific issue.