Opened 2 years ago
Closed 2 years ago
#33715 closed Cleanup/optimization (fixed)
Prevent MySQL dbshell from exiting on Ctrl-C
Reported by: | Andrew Roberts | Owned by: | Hasan Ramezani |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently, pressing Ctrl-C in a MySQL dbshell will exit the program with a KeyboardInterrupt exception. In the mysql command line client, Ctrl-C will cancel the current command or clear the current command buffer if a command is not running. This is a similar issue to one that affected the PostgreSQL dbshell - see: #27954.
To fix this, we can override the SIGINT handler in the same way as for the PostgreSQL client. Or perhaps we can move this functionality from the django.db.backends.postgresql.client to the django.db.backends.base.client module, so that all db backends can benefit from Ctrl-C working as per the underlying db command line client.
Change History (3)
comment:1 by , 2 years ago
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | 4.0 → dev |
comment:2 by , 2 years ago
Has patch: | set |
---|---|
Owner: | changed from | to
Status: | new → assigned |
PR