Considering MySQL ver 5.7. Take the following example:
Begin Transaction Delete from payments where id = 1 Select from payments where id = 1 End Transaction
In such a scenario should I expect the select statement to return no rows, since I've just deleted that row? Or will it still return a row because the transaction has not yet been committed?
And if the select does not return a row, then can I assume that any cascade deletes on child tables are also safely deleted before I do my select?
(To answer the inevitable question of "why would you do this?" the answer is simply that I'm hoping to re-use the same script in multiple different scenarios, so I want to know if it's safe to do so or if I have to write separate scripts. In one scenario the delete will execute, in another it will not.)