[Fix included] MTR1 produces bootstrap SQL file with wrong syntax, server bootstrap fails

Description

This used to be bug http://bugs.mysql.com/bug.php?id=55983 in MySQL

While running in MTR-1 mode, MTR produces bootsrap SQL file starting with

"use mysql-- Copyright ..."

(no semicolon and line break after 'use mysql')

While earlier the syntax was accepted and handled, with the new implementation of server bootstrap it is not anymore, which makes server startup fail.

It might be a problem for those who uses runall.pl RQG script (unlike runall-new.pl, it still uses MTR1 to start server)

How to repeat:

1 2 export MTR_VERSION=1 perl ./mysql-test-run.pl main.1st

Fix (for 10.0-serg revno 3452):

1 2 3 4 5 6 7 8 9 10 11 12 === modified file 'mysql-test/lib/v1/mysql-test-run.pl' --- mysql-test/lib/v1/mysql-test-run.pl 2012-01-13 14:50:02 +0000 +++ mysql-test/lib/v1/mysql-test-run.pl 2012-10-29 01:46:12 +0000 @@ -3223,7 +3223,7 @@ my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql"; # Use the mysql database for system tables - mtr_tofile($bootstrap_sql_file, "use mysql"); + mtr_tofile($bootstrap_sql_file, "use mysql;\n"); # Add the offical mysql system tables # for a production system

Environment

None

Status

Assignee

Sergei Golubchik

Reporter

Elena Stepanova

Labels

None

External issue ID

None

External issue ID

None

Fix versions

Affects versions

10.0.0

Priority

Minor
Configure