vscode-database-client
vscode-database-client copied to clipboard
[BUG] After the query is stopped, it is still executed on the server.
- OS:Ubuntu 20.04
- Database Type:MySQL 5.7
When you run SQL statements that take a long time to execute, one can cancel the execution by pressing the "power off" button
Although in the UI the execution of the statement was apparently stopped the execution is still alive in the database.
One can check it by executing:
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = '<your_username_here>' ORDER BY TIME DESC;
It would make sense that this poweroff button, could retrieve the ID of the statement that is being stopped and kill it, i.e. by executing KILL <ID> where the ID is got from the PROCESSLIST table.
Thanks for your feedback, but the client cannot cancel the executing SQL.
Thank you for your feedback!
On Thu, Sep 1, 2022, 16:32 Weijan Chen @.***> wrote:
Thanks for your feedback, I will fix it in the next version.
— Reply to this email directly, view it on GitHub https://github.com/cweijan/vscode-database-client/issues/674#issuecomment-1234445624, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIXCECOTZGZKGBJODELU7DDV4DD7PANCNFSM6AAAAAAQCHGI4A . You are receiving this because you authored the thread.Message ID: @.***>
@cweijan, I believe that client can do this. If the trash icon is clicked, under the woods it would execute:
- SELECT id FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = '<user_name>' AND INFO = '<sql_statement_to_close>';
- KILL id ; //got from previous statement
Yes, but needs to create a new connection to close when the stop button is clicked, I will try to implement it in the future.
I released the 5.9.3 version, and now it can correctly close the executing mysql connection.