Hi all,
When I test the Delete multi table function in MySQL,
DELETE [LOW_PRIORITY] [QUICK] [IGNORE] table_name[.*] [,
table_name[.*] ...]
FROM table-references
[WHERE where_definition]
I accidentally delete all data in one table. All data in that table
are gone when I try to select them out in Control Center. But when I
go into the /mysql/data/mydatabase/, I see a MYD, MYI, frm for that
table. And it seems that data is still inside the MYD, althought it's
not formatted correctly. So my first qusetion is whether we can
recovery data from an accidentally delete action, using MYD or some
other log files.
My second question is about the multi table deletion in MYSQL
For example : "DELETE t1,t2 FROM t1,t2 WHERE t1.id=5 AND t2.id=5"
It only runs successfully when all table (i.e. t1 AND t2) have row(s)
whose id is equal to 5. In other words, it would NOT delete rows with
id = 5 in t1 when t2 has NO record with id = 5, both tables must at
least have one record with id =5. So is it the case for multi table
deletion in MySQL or I have done somethings wrong?
Thank you very much for your help :)
Regards,
Vic