diff --git a/client/mysql.cc b/client/mysql.cc index 234180c3c75..2ef987492b7 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1821,7 +1821,7 @@ static int read_and_execute(bool interactive) 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)