ANIK ISLAM SHOJIB
ANIK ISLAM SHOJIB

Reputation: 3238

after `Query execution was interrupted` can not access table

I was running a simple query in MySQL, joining two tables and getting where it doesn't match. Both tables have 500k data. my query was something like

select count(*) from t1 join t2 t1.id <> t2.id

and after 300 seconds I got following error

Error Code: 1317. Query execution was interrupted

after that, I could not run a simple query on that table, like

select * from t1 limit 50

but all other tables were working and my system also got down for a while. Finally, I restarted my MySQL server then everything started working.

Any idea why my table got stuck??

TIA

Upvotes: 1

Views: 2378

Answers (1)

Jonathan Delean
Jonathan Delean

Reputation: 1084

Your table was locked, if a query crash for some reason, you have to kill your query to unlock you table (or restart your mysql server)

enter image description here

Upvotes: 2

Related Questions