Opened 17 months ago
Closed 16 months 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 Changed 16 months ago by
Triage Stage: | Unreviewed → Accepted |
---|---|
Version: | 4.0 → dev |
comment:2 Changed 16 months ago by
Has patch: | set |
---|---|
Owner: | changed from nobody to Hasan Ramezani |
Status: | new → assigned |
PR