| Mailing List | | Home | | MySQL General - General MySQL discussion | | MaxDB - Everything about MaxDB, formerly known as SAP DB | | MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP | | Java Help - Mostly related to the MySQL Connector/J driver | | ODBC - ODBC with the MySQL Connector/ODBC driver | | Perl - Perl support for MySQL with DBI and DBD::mysql | | MySQL++ - Programming with the C++ API to MySQL |
|
|
  | |  | DB consistency checking | DB consistency checking 2004-03-17 - By James Hughes
Back I want to set up some automated table checking and the research I 've
done has left me scratching my head.
I 'm looking for a definitive answer to this thread:
http://marc.theaimsgroup.com/?l=mysql&m=106159147322752&w=2
With respect to MyISAM tables in 4.0, there seems to be two different
scenarios:
1) Daemon running with "--skip-external-locking "
a) I do NOT need to shut down the daemon
b) I do NOT need to flush the tables
c) CHECK TABLE tbl_name
--OR--
a) Shut down the daemon
b) mysqladmin flush-tables
c) myisamchk -m tbl_name
2) Daemon running without "--skip-external-locking "
a) I do NOT need to shut down the daemon
b) I do NOT need to flush the tables
c) CHECK TABLE tbl_name
--OR--
a) I do NOT need to shut down the daemon
b) mysqladmin flush-tables
c) myisamchk -m tbl_name
I 'm a little confused about the "CHECK TABLE " sql statement. In the
docs (
http://www.mysql.com/doc/en/CHECK_TABLE.html
) it says "On MyISAM
tables, it 's the same thing as running myisamchk --medium-check
tbl_name on the table. "
If that 's accurate then you couldn 't safely run it on a mysqld daemon
that 's running with "--skip-external-locking "! That would also imply
that you need to flush the tables first!
However in the thread above, Paul Dubois claims "You can also use CHECK
TABLE, REPAIR TABLE, which have no problem of interaction with the
server, and can be issued from remote clients. "
So either CHECK TABLE (without any options) isn 't the same thing as
"myisamchk --medium-check " or Paul is mistaken.
I should probably qualify this by saying that I 'm looking for a "Best
Practices " type answer rather than a technical discussion of all the
various exceptions to the rule.
Thanks for any insight!
-James Hughes
--
MySQL General Mailing List
For list archives:
http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=mysql
@(protected)
|
|
 |