I have a script that does this.  It goes through every table in every
database (excluding specific database like information_schema, etc) and
issues the command:

select 1 from <db>.<tab> limit 1;

At first, I only checked for the error code for a crashed table, but found I
had some other tables that had problems, like a corrupt innodb, that weren't
marked as crashed, so I now just report any table that gets an error.

Jim

On Wed, Jan 13, 2010 at 12:07 PM, Matt Carlson <mcarl...@kmcis.com> wrote:

> Hello,
>
> This is going to be a very odd question.  I'm looking for a way to
> purposefully corrupt a table.  The reason behind this, is that I would like
> to write a php script that will go through all databases/tables in the
> environment, and find any tables that are marked as crashed/corrupt, so
> that
> I can shoot an e-mail to appropriate support personnel to repair the table
> in question.
>
> So two questions really, 1) Does anyone know a good way to cause this to
> happen, and 2) is there already something written that would assist in
> this?
>
>
> Thank you,
>
> Matt
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=jlyons4...@gmail.com
>
>


-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com

Reply via email to