Bug #47915 binlog_stm_unsafe_warning fails on windows with embedded
Submitted: 8 Oct 2009 9:42 Modified: 8 Oct 2009 9:48
Reporter: Magnus Blåudd Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1.39 OS:Windows
Assigned to: Magnus Blåudd CPU Architecture:Any

[8 Oct 2009 9:42] Magnus Blåudd
Description:
The embedded server on windows does not know where it's .err log are stored so the test fails when trying to open it.

How to repeat:
./mtr --embedded binlog_stm_unsafe_warning

Suggested fix:
== modified file 'mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test'
--- mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test	2009-07-31 13:00:35 +0000
+++ mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test	2009-10-08 09:38:06 +0000
@@ -94,15 +94,24 @@
 
 SET GLOBAL log_warnings = @old_log_warnings;
 
-let LOG_ERROR= `SELECT @@GLOBAL.log_error`;
+let $log_error= `SELECT @@GLOBAL.log_error`;
+if(!$log_error)
+{
+  # Embedded server on windows does not know it's .err file
+  # use a default value
+  let $log_error = $MYSQLTEST_VARDIR/log/mysqld.1.err;
+}
+# Assign env variable LOG_ERROR
+let LOG_ERROR=$log_error;
 
 --echo # Count the number of times the "Unsafe" message was printed
 --echo # to the error log.
 
 perl;
-  $log_error= $ENV{'LOG_ERROR'};
+  use strict;
+  my $log_error= $ENV{'LOG_ERROR'} || die "LOG_ERROR not set";
   open(FILE, "$log_error") or die("Unable to open $log_error: $!\n");
-  $count = () = grep(/Bug#46265/g,<FILE>);
+  my $count = () = grep(/Bug#46265/g,<FILE>);
   print "Occurrences: $count\n";
   close(FILE);
 EOF
[8 Oct 2009 9:48] Magnus Blåudd
Duplicate of BUG#47129