Bug #34626 MySQL Command Line Client Crash With Null Input
Submitted: 17 Feb 2008 16:36 Modified: 16 Jul 2008 0:19
Reporter: Shlomo Priymak
Status: Duplicate
Category:Client Severity:S1 (Critical)
Version:5.1.24/5.0 OS:Any
Assigned to: Bugs System Target Version:5.1+
Triage: D2 (Serious)

[17 Feb 2008 16:36] Shlomo Priymak
Description:
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
Or
  type c:\test.txt | "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql.exe"

Results in mysql.exe crash.
[17 Feb 2008 19:01] 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
 	kernel32.dll!7c816fd7()
[21 Mar 2008 12:51] Valeriy Kravchuk
Bug #35480 is likely a duplicate of this one.
[4 Apr 2008 20: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 12:00] Domas Mituzas
there is a patch at Bug#35480
[15 Jul 2008 1: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)
[16 Jul 2008 0:19] Trudy Pelzer
Duplicate of bug#35480.