Bug #34626 MySQL Command Line Client Crash With Null Input
Submitted: 17 Feb 2008 15:36 Modified: 15 Jul 2008 22:19
Reporter: Shlomo Priymak Email Updates:
Status: Duplicate Impact on me:
Category:MySQL Server: Command-line Clients Severity:S1 (Critical)
Version:5.1.24/5.0 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Triage: D2 (Serious)

[17 Feb 2008 15:36] Shlomo Priymak
The mysql.exe command line client crashes when an empty file is piped to it.
This scenario worked well as described in 5.1.22-rc.

How to repeat:
Create an empty file (same as "touch" in linux)
   goto > c:\test.txt
Pipe empty file into mysql.exe
  "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql.exe" < c:\test.txt
  type c:\test.txt | "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql.exe"

Results in mysql.exe crash.
[17 Feb 2008 18:01] Godofredo Miguel Solorzano
Thank you for the bug report.

>	mysql.exe!read_and_execute(int interactive=0)  Line 1105 + 0x9	C++
 	mysql.exe!main(int argc=2, char * * argv=0x003645a0)  Line 500 + 0x12	C++
 	mysql.exe!mainCRTStartup()  Line 259 + 0x19	C
[21 Mar 2008 11:51] Valeriy Kravchuk
Bug #35480 is likely a duplicate of this one.
[4 Apr 2008 18:23] Shane Bester
not windows specific.  also happens with the 'source' command:

touch /tmp/empty.txt
mysql -uroot test -p
source /tmp/empty.txt
[23 Apr 2008 10:00] Domas Mituzas
there is a patch at Bug#35480
[14 Jul 2008 23:11] Jeffrey Pugh
Shouldn't this be marked as a duplicate of http://bugs.mysql.com/bug.php?id=35480 (and it is fixed there)
[15 Jul 2008 22:19] Trudy Pelzer
Duplicate of bug#35480.