Closed xg1990 closed 6 years ago
Solved It is because of the isolation of mysql (https://stackoverflow.com/questions/21974627/mysql-connector-not-showing-inserted-results)
Add db.query("SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED") can solve the problem
I was trying to use the following code to obtain records that are inserted within recent 30 seconds ( using the column
start_t
)The problems is that after 30 seconds, the
table.find
function get zero records. But I am sure there are new records in the database. And I have also tried to usetable.query
instead oftable.find
, the issue remains the same.One temporary solution is to create a new dataset connection using
dataset.connect
beforetable.find
And I am using the latest dataset: