Bug #55983 MTR1 produces bootstrap SQL file with wrong syntax, server bootstrap fails
Submitted: 14 Aug 2010 22:51 Modified: 14 Nov 2010 2:52
Reporter: Elena Stepanova Email Updates:
Status: Closed Impact on me:
Category:Tools: MTR / mysql-test-run Severity:S3 (Non-critical)
Version:5.6.1-m4, 5.6.99-m5 OS:Any
Assigned to: Bernt Marius Johnsen CPU Architecture:Any

[14 Aug 2010 22:51] Elena Stepanova
While running in MTR-1 mode, MTR produces bootsrap SQL file starting with

"use mysql-- Copyright ..."

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

It is not new behavior for MTR-1, but I'm setting Version to 5.6.1 and 5.6.99 because they are affected: while earlier the syntax was accepted and handled, with the new implementation of server bootstrap it is not anymore, which makes server startup fail.

How to repeat:
export MTR_VERSION=1
perl ./mysql-test-run.pl --start-and-exit --mysqld=--innodb 1st

Suggested fix:
Add semicolon and line break:
mtr_tofile($bootstrap_sql_file, "use mysql;\n");
[17 Aug 2010 11:09] Bernt Marius Johnsen
For some reason, mysqld in boostrap mode now requires ; after the USE statement, while versions 5.5 and older do not.
[17 Aug 2010 11:18] Bernt Marius Johnsen

=== modified file 'mysql-test/lib/v1/mysql-test-run.pl'
--- mysql-test/lib/v1/mysql-test-run.pl 2010-08-05 13:10:22 +0000
+++ mysql-test/lib/v1/mysql-test-run.pl 2010-08-17 09:15:30 +0000
@@ -3153,7 +3153,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
[17 Aug 2010 11:57] Bernt Marius Johnsen
Pushed to trunk-bugfixing and next-mr-bugfixing
[17 Aug 2010 14:06] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:


3218 Bernt M. Johnsen	2010-08-17 [merge]
      Bug#55983 Added ; to use statement
[18 Aug 2010 8:00] John Embretsen
This bugfix seems to have fixed the remaining issue for Bug#55883 (RQG tests fail on Windows x86 debug_max). I'll try to keep the latter open until the fix is merged further and it has been verified that there are no other remaining issues.
[30 Aug 2010 8:31] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (version source revid:alik@sun.com-20100830082732-n2eyijnv86exc5ci) (merge vers: 5.6.1-m4) (pib:21)
[30 Aug 2010 8:35] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (version source revid:alik@sun.com-20100830082745-n6sh01wlwh3itasv) (pib:21)
[30 Aug 2010 14:51] Paul DuBois
Changes to test suite. No changelog entry needed.
[13 Nov 2010 16:11] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:vasil.dimov@oracle.com-20100629074804-359l9m9gniauxr94) (merge vers: 5.6.99-m4) (pib:21)