Given a single MySql session, say that Query A performs a read of the table and Query B performs a write on the table that would affect what Query A would return.
If I submit Query A followed (perhaps a few ms later) by Query B, is the result deterministic? Is it possible for Query B to complete before Query A?
Or if the order is instead [Query B, Query A], is there a guarantee that the result from Query A will contain the changes done in Query B?
If you’re talking about a single session, then be aware that MySQL does not support multiple concurrent queries. You have to finish read query A before executing query B.
Some client interfaces make it seem like you can still fetch results from query A, even though you have moved on to execute query B. But this is possible because the client library has already fetched all the results from query A into application memory, and what you see in your code as subsequent fetches are really just iterating over the result in memory.
If you’re talking about multiple concurrent sessions, then @Ian Atkin’s answer comes into play. The storage engine and the transaction isolation level can affect the result.