Purposely Corrupting a table
Purposely Corrupting a table
am 19.10.2010 16:23:55 von Steven Staples
Ok, been googling all morning, and keep getting the same post (on
multiple different sites).
Is there a way, where i corrupt a table purposely? I've tried playing
with the .MYD file, and yeah, it "marks" it deleted under the check
routine, but the table is still readable/writable, just doesn't have
any info when selecting it...
is there another way to corrupt the table, where you can't even select
from it, or the responce back from a select is an error?
--
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: Purposely Corrupting a table
am 19.10.2010 16:49:22 von Krishna Chandra Prajapati
--0015174c33ce030a190492f9665a
Content-Type: text/plain; charset=ISO-8859-1
Hi,
Keep key_buffer_size very low and insert lots of data into table (myisam).
After some time the index file will crash.
Krishna
CGI.COM
On Tue, Oct 19, 2010 at 7:53 PM, Steve Staples wrote:
> Ok, been googling all morning, and keep getting the same post (on
> multiple different sites).
>
> Is there a way, where i corrupt a table purposely? I've tried playing
> with the .MYD file, and yeah, it "marks" it deleted under the check
> routine, but the table is still readable/writable, just doesn't have
> any info when selecting it...
>
> is there another way to corrupt the table, where you can't even select
> from it, or the responce back from a select is an error?
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=prajapatikc@gmail.com
>
>
--0015174c33ce030a190492f9665a--
Re: Purposely Corrupting a table
am 19.10.2010 18:41:31 von Hank
It's easy to corrupt the MYISAM index (MYI) file... I do something
like this in linux -- assuming your table is not tiny, and mysql isn't
running or you have a lock on the table:
dd if=3Dtable.MYI of=3Dtable2.MYI bs=3D2048 count=3D100
then copy table2.MYI over table.MYI and then "flush tables" and then unlock=
..
Your table will be unreadable until you rebuild the index with REPAIR
TABLE or myisamchk. The MYD file will remain intact.
If your MYI file is smaller than 200k, then just reduce the count=3D#.
-Hank
> On Tue, Oct 19, 2010 at 7:53 PM, Steve Staples wrote:
>
>> Ok, been googling all morning, and keep getting the same post (on
>> multiple different sites).
>>
>> Is there a way, where i corrupt a table purposely? =A0 I've tried playin=
g
>> with the .MYD file, and yeah, it "marks" it deleted under the check
>> routine, =A0but the table is still readable/writable, just doesn't have
>> any info when selecting it...
>>
>> is there another way to corrupt the table, where you can't even select
>> from it, or the responce back from a select is an error?
>>
>>
>>
--
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
Re: Purposely Corrupting a table
am 19.10.2010 18:45:30 von sureshkumarilu
--0016364d1f395025e80492fb0562
Content-Type: text/plain; charset=ISO-8859-1
I'll tell a much easier way to corrupt table. Open the data or index file,
remove some text data in the file and save.
It will show it a corrupt. ( Only for test setups ).
On Tue, Oct 19, 2010 at 10:11 PM, Hank wrote:
> It's easy to corrupt the MYISAM index (MYI) file... I do something
> like this in linux -- assuming your table is not tiny, and mysql isn't
> running or you have a lock on the table:
>
> dd if=table.MYI of=table2.MYI bs=2048 count=100
>
> then copy table2.MYI over table.MYI and then "flush tables" and then
> unlock.
>
> Your table will be unreadable until you rebuild the index with REPAIR
> TABLE or myisamchk. The MYD file will remain intact.
>
> If your MYI file is smaller than 200k, then just reduce the count=#.
>
> -Hank
>
>
>
> > On Tue, Oct 19, 2010 at 7:53 PM, Steve Staples
> wrote:
> >
> >> Ok, been googling all morning, and keep getting the same post (on
> >> multiple different sites).
> >>
> >> Is there a way, where i corrupt a table purposely? I've tried playing
> >> with the .MYD file, and yeah, it "marks" it deleted under the check
> >> routine, but the table is still readable/writable, just doesn't have
> >> any info when selecting it...
> >>
> >> is there another way to corrupt the table, where you can't even select
> >> from it, or the responce back from a select is an error?
> >>
> >>
> >>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=sureshkumarilu@gmail.com
>
>
--
Thanks
Suresh Kuna
MySQL DBA
--0016364d1f395025e80492fb0562--