Description:
The mysqlc command (w/ cygwin command line editing) seems to be confusing the cygwin and Windows nomenclature for the file system. If I try to edit a command using \e or edit, I get the following error
mysql> edit
/mysql/bin/mysqlc.exe: Can't create/write to file '/tmp/sql10053304.0' (Errcode: 2)
If I create a folder called C:\tmp then this doesn't fail anymore. However, my editor (cygwin vim) does not start up with any content, nor does providing content with my editor leave results in mysqlc when I return from the editor.
However, I am finding that files like /tmp/sql10053304.0 are being created in cygwin's /tmp directory (actually C:\cygwin\tmp on my system).
My guess is that mysqlc is dropping text in C:\tmp but the cygwin editor is looking in C:\cygwin\tmp.
How to repeat:
turbo 537$ mysqlc
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10 to server version: 4.0.21-max
Type 'help' for help.
mysql> edit
/mysql/bin/mysqlc.exe: Can't create/write to file '/tmp/sql10053304.0' (Errcode:
2)
mysql> quit
Bye
turbo 538$ mkdir /cygdrive/c/tmp
turbo 539$ mysqlc
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 11 to server version: 4.0.21-max
Type 'help' for help.
mysql> edit
...enter a command like 'show databases' in the editor...
mysql> quit
Bye
turbo 540$ ls /cygdrive/c/tmp
turbo 541$ ls /tmp/sql*
/tmp/sql10053304.0 /tmp/sql10053304.1
Suggested fix:
Allow a config or command line option for mysqlc so that it uses cygwin's file nomenclature so that cygwin editing programs can be used.