>>>>> "sasha" == sasha <sasha@stripped> writes:
sasha> Kristian Hoffmann wrote:
>> I'm not sure how mysql handles it internally. You'd have to ask one of
>> the developers or RTFS. You could do the dump, store it in a directory or
>> incramentally back it up to any rw media, and then "delete from tbname".
>> That actually deletes the file the table is stored in and recreates it so
>> it is very fast. "delete from tbname where ..." takes much longer. Then
>> you have records that you can store on a shelf somewhere and a db that's
>> not enourmous.
>> Slightly off topic, there's another cool kernel patch available on
>> freshmeat that impliments transparent gzipping of files. The kernel
>> compress/decompresses the files on the fly so programs like mysqld don't
>> know the difference. If you have a fast server, this could be a cool and
>> simple way of keeping those enourmous databases in check.
sasha> I've taken a brief look at the sources of mysqldump -- it does not seem to lock
sasha> the tables while dumping - maybe we should add this as a special option. In any
sasha> case, if you have "transactions", and you do them properly by locking the
sasha> appropriate tables in your code, mysqldump will not be able to read the table
sasha> until the "transaction" is complete.
mysqldump --lock-tables or
will lock the tables specified on the command line.