Bug #2221 Buffer overrun in mysql client
Submitted: 27 Dec 2003 8:51 Modified: 6 Jan 2004 4:26
Reporter: Mick Weiss Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:4.1-alpha OS:Microsoft Windows (WinXP pro)
Assigned to: Sinisa Milivojevic

[27 Dec 2003 8:51] Mick Weiss
After downloading the web application Inventory (http://inventory.sourceforge.net), I executed the 
SQL that was included under the /SQL directory.

I got a popup error in ASCII art:

======= Microsoft Visual C++ Runtime Library ===========
( X )   Buffer overrun detected!

Program: ...am Files\mysql-4.1.0-alpha\mysql\bin\mysql.exe

A buffer overrun has been detected which has corrupted the program's internal state. The program 
cannot safely continue execution and must now be terminated.

                                      [ OK ]

How to repeat:
1) mysql -u username -p
2) cd to the /SQL directory where "Inventory" is installed (my case: Program Files > Apache > 
htdocs > inventory > SQL )
3) at the mysql client prompt I typed->>>>     \. database.init.mysql

I have also tried to use mysqlimport and I got the same results. 

I have found this bug to be re-producible 100% of the time.

If you have any questions please don't hesitate to e-mail me.

The SQL (database.init.mysql) can be found under CVS: http://cvs.sourceforge.net/viewcvs.py/
[27 Dec 2003 10:06] Godofredo Miguel Solorzano
Thank for the bug report. I tested against mysql client 4.1.2 and
I got a crash instead of buffer overrun message.

The below command works as expected:

C:\mysql\bin>mysql -uroot <  database_init_mysql
[27 Dec 2003 11:14] Sinisa Milivojevic
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

A fix will come in 4.1.2.

Thanks so MUCH for your bug report, again.
[28 Dec 2003 0:30] Mick Weiss
Thanks for the replies! I will build it from source. 

I was just wondering if it is Windows specific or OS indipendent?

I tested it only on WinXP and on MacOS 10.3 (Jaguar), only I could only test on the older 4.0.15:
> mysql  Ver 12.21 Distrib 4.0.15, for apple-darwin6.6 (powerpc)
which didn't give me any errors. So, I'm still not sure about 4.1.0-alpha 

Either way, thanks for the replies. Glad that it helped. I will test it out some more and post any 
more bug findings. 

Best Regards,

- Mick Weiss
[29 Dec 2003 4:10] Sinisa Milivojevic
No, it is not Windows specific and it is not pushed yet.

When pushed (which means that changes are in BK repository) then this bug
record will be closed.