From: Date: June 24 2008 6:06pm Subject: bzr commit into mysql-5.0 branch (gshchepa:2643) Bug#35480 List-Archive: http://lists.mysql.com/commits/48400 X-Bug: 35480 Message-Id: <20080624160940.BF47140C2A6@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit #At file:///work/bzr/mysql-5.0-bugteam/ 2643 Gleb Shchepa 2008-06-24 back-port from 5.1. Bug#35480: BOM detection code crashes mysql CLI with zero-sized input MySQL client crashed if no input was passed to it. modified: client/mysql.cc === modified file 'client/mysql.cc' --- a/client/mysql.cc 2008-06-24 16:03:17 +0000 +++ b/client/mysql.cc 2008-06-24 16:05:56 +0000 @@ -1779,7 +1779,7 @@ static int read_and_execute(bool interac the very beginning of a text file when you save the file using "Unicode UTF-8" format. */ - if (!line_number && + if (line && !line_number && (uchar) line[0] == 0xEF && (uchar) line[1] == 0xBB && (uchar) line[2] == 0xBF)