Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#10639 closed (duplicate)

" dbshell" on windows causes strange command line / mysql switching bug

Reported by: jumpfroggy Owned by: nobody
Component: Uncategorized Version: 1.0
Severity: Keywords: dbshell windows
Cc: virtue@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


This is hard to explain. I run this on a Windows XP machine:

C:\project> dbshell
C:\project>Welcome to the MySQL monitor.  Commands end with ; or \
Your MySQL connection id is 6902
Server version: 5.0.51a-community-nt-log MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

Basically what happens is that every other command goes to either the mysql.exe client or the original command line shell (cmd.exe) in alternating order. So if you keep pressing enter/return, you get this:


And if you do type in "show tables;" three times, you get this:

mysql> show tables;
'show' is not recognized as an internal or external command,
operable program or batch file.

C:\project>show tables;
(shows tables here)
26 rows in set (0.00 sec)

mysql> show tables;
'show' is not recognized as an internal or external command,
operable program or batch file.

The first response (show is not recognized) is from cmd.exe. The second result is from mysql.exe. The third result is again from cmd.exe.

I think that is executing the mysql.exe process concurrently with the opening command line, and the STDIN and STDOUT are being merged together. Since they both block for input, when you enter a command in one and press enter, the "focus" switches to the other process.

All of this works on unix, so it seems to be a Windows-only problem. Can anyone else confirm?

  • Django SVN rev 9014 (Apologies for running an older version of Django... production server is running 1.0, so I can't upgrade my dev machine at the moment).
  • Windows XP SP3
  • Python 2.5.2

Change History (3)

comment:1 Changed 9 years ago by jumpfroggy

Cc: virtue@… added

comment:2 Changed 9 years ago by Karen Tracey

Resolution: duplicate
Status: newclosed

I suspect this is due to the same root cause as #10357. You might try the latest patch there and see if it solves what you are seeing, it would be useful either way to get feedback on that patch in #10357.

comment:3 Changed 9 years ago by jumpfroggy

I'm trying the patch, looks like it's better but not fixed completely. I'll comment more in that thread. Thx.

Note: See TracTickets for help on using tickets.
Back to Top