How to purposely corrupt a table

How to purposely corrupt a table

am 13.01.2010 19:07:27 von Matt Carlson

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=gcdmg-mysql-2@m.gmane.org

Re: How to purposely corrupt a table

am 13.01.2010 19:14:23 von Jim Lyons

--001636c5b1e2786909047d0fbd43
Content-Type: text/plain; charset=ISO-8859-1

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 . 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 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=jlyons4435@gmail.com
>
>


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

--001636c5b1e2786909047d0fbd43--

Re: How to purposely corrupt a table

am 13.01.2010 19:22:05 von Carlos Williams

On Wed, Jan 13, 2010 at 1:14 PM, Jim Lyons wrote:
> I have a script that does this.  It goes through every table in ever=
y
> database (excluding specific database like information_schema, etc) and
> issues the command:
>
> select 1 from . limit 1;

Interesting. Would you mind sharing the script? Is it PHP?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg