Select after an Uncommited Update in Python-MySQLdb
tl;dr Yes, sample will contain the rows that were just updated. 

Please note that you're not in a transaction context. So every query is an implicit transaction in this specific case.

Assuming you did have a begin somewhere sample would still see the rows because it's the same connection and the same transaction. 

If you started the transaction and opened a separate connection or you had a concurrent process/request it would only see the rows without commit if your mysql is running with READ-UNCOMMITTED transaction level.

You can check the global settings by: 

mysql&gt; show global variables like 'tx_isolation';


It can also be set for individual connection:

mysql&gt; set tx_isolation='READ-UNCOMMITTED';


I hope this answers your question.