Bug #5863 The edit command in mysqlc doesn't work with cygwin editors
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.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.