You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG#38040736 Dropping a Routine leads to a shell crash losing the http server
When dropping a function using the context menu in the VSCode Extension, the
following commands will be triggered in the backend:
- "gui.sqlEditor.execute", "args": {"sql": "drop function `sakila`.`test_function`"}
- "gui.db.get_routines_metadata", "args": {"schema_name": "sakila"}
Commands normally are handled in separate threads by adding tasks that get processed
in a separate thread, by locking the session until each task is completed.
The issue is caused because the get_routines_metadata task performs SQL execution
before adding such task. In the above scenario, the task for the drop operation
is added and starts executing and then the get_routines_metadata task attempts to
use the session, causing a race condition.
The problem got solved by properly locking the session for its use in
get_routines_metadata.
Change-Id: I794c5a2e5b90bd596e8f9b39eada77e9a29cad98
0 commit comments