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
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
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)