3

If I run a SQL query in MySQL workbench and the connections time out after 30 seconds because it is taking a long time. Does my Query continue executing on the MySQL server even though I am disconnected?

For example, if I am doing an update and the update loops over a billion records. Does the MySQL server disconnect me first then it finishes the query after? Or does it disconnect me and terminate the query?

Mustafa
  • 1,738
  • 2
  • 24
  • 34
  • You can find this out for yourself. You have MySQL Workbench, just look at the "Administration" Tab and under the MANAGEMENT section look at "Client Connections" – RiggsFolly Jun 14 '22 at 10:55

2 Answers2

2

Yes, MySQL Workbench can disconnect and the query keeps running. This has been reported as a bug, but it's in the "Verified" state, which means it is not fixed: https://bugs.mysql.com/bug.php?id=78809

See also this related SO thread: MySQL Query running even after losing connection

If you have a long-running query that needs to do a bulk update, you may need to change the MySQL Session timeout options in the MySQL Workbench preferences. Alternatively, don't use MySQL Workbench for long-running jobs, use the mysql command line tool.

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
1

It does. As Mustafa mentioned, you can see the query still running if you look at "Administration tab" --> Management --> Client Connections.

Also good to remember that you can change the 30sec cap to longer, shorter or none.

savingDuck468
  • 347
  • 2
  • 6