Bug #39008 perl warning in mtr: 'use of uninitialized value in concatenation' in mtr:3995
Submitted: 25 Aug 2008 13:43 Modified: 30 Jan 2009 17:30
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:Tests Severity:S7 (Test Cases)
Version:5.1-rpl OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any
Tags: 51rpl, mtr, perl, uninitialized value

[25 Aug 2008 13:43] Sven Sandberg
Description:
Near the end of the following pushbuild failure, there are four perl warnings, indicating that the 'undef' value is being used in a concatenation.

Please ignore the actual test failure: that's BUG#39007.

rpl_ndb.rpl_ndb_circular_2ch             [ fail ]

CURRENT_TEST: rpl_ndb.rpl_ndb_circular_2ch
mysqltest: In included file "./include/wait_condition.inc": At line 53: Error running query 'SELECT COUNT(*)=40 FROM t1 WHERE c = 1': 2006 MySQL server has gone away

The result from queries just before the failure was:
< snip >
Variable_name	Value
server_id	1
SET auto_increment_offset = 1;
SET auto_increment_increment = 2;
SHOW VARIABLES LIKE "server_id";
Variable_name	Value
server_id	2
SET auto_increment_offset = 2;
SET auto_increment_increment = 2;
SHOW VARIABLES LIKE "server_id";
Variable_name	Value
server_id	2
SET auto_increment_offset = 2;
SET auto_increment_increment = 2;

*** Preparing data ***
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=ndb;

*** Basic testing  ***
Insert rows via all hosts

More results from queries before failure can be found in /dev/shm/var-n_mix-100/1/log/rpl_ndb_circular_2ch.log

 - saving '/dev/shm/var-n_mix-100/1/log/rpl_ndb.rpl_ndb_circular_2ch/' to '/dev/shm/var-n_mix-100/log/rpl_ndb.rpl_ndb_circular_2ch/'
 - found 'core.28327' (0/5)

Retrying test, attempt(2/3)...

Use of uninitialized value in concatenation (.) or string at ./mysql-test-run.pl line 3995.
Use of uninitialized value in concatenation (.) or string at ./mysql-test-run.pl line 3995.
Use of uninitialized value in concatenation (.) or string at ./mysql-test-run.pl line 3995.
Use of uninitialized value in concatenation (.) or string at ./mysql-test-run.pl line 3995.

How to repeat:
https://intranet.mysql.com/secure/pushbuild/showpush.pl?dir=bzr_mysql-5.1-rpl&order=39 sapsrv1/
[25 Aug 2008 17:46] Magnus Blåudd
Either log-bin or relay-log has no value in the my.cnf file used for the test. Scary thing is that it looks like we thus delete all files in the servers datadir.

mysql-test-run.pl>>

    my $datadir= $mysqld->value('datadir');

    # Don't delete anything if starting dirty
    if (!$opt_start_dirty)
    {
      my @options= ('log-bin', 'relay-log');

      foreach my $option_name ( @options )  {
	next unless $mysqld->option($option_name);

	my $value= $mysqld->value($option_name);

	foreach my $file ( glob("$datadir/$value*") ) <<< HERE
	{
	  #print "removing: $file\n";
	  mtr_debug("Removing '$file'");
	  unlink($file);
	}
      }

      # Remove old master.info and relay-log.info files
      # from the servers datadir
      unlink("$datadir/master.info");
      unlink("$datadir/relay-log.info");
    }
[25 Aug 2008 17:49] Magnus Blåudd
suite/rpl_ndb/t/rpl_ndb_circular_2ch.cnf>>

!include ../my.cnf

[mysqld.1.1]
server-id= 1
log-bin << HERE and several more places in the file.
log-slave-updates

<snip>
[5 Sep 2008 12:40] 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:

  http://lists.mysql.com/commits/53337

2670 Magnus Svensson	2008-09-05
      Bug#39008 perl warning in mtr: 'use of uninitialized value in concatenation' in mtr:3995
[7 Sep 2008 1:05] 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:

  http://lists.mysql.com/commits/53438

2688 He Zhenxing	2008-09-07 [merge]
      Auto merge
[10 Oct 2008 13:48] Magnus Blåudd
After review we found the following:

it should be "rmtree(datadir)" but also try to resolve "log-bin" and '"relay-log"
- if log-bin is empty, not do anything
- if logbin=<filename> don't do anything since it would be in datadir
- if logbin is a absolute path -> remove it.
[10 Oct 2008 14:19] 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:

  http://lists.mysql.com/commits/56049

2676 Magnus Svensson	2008-10-10
      BUG#39008 Additional fix after review, remove files that could potentially be set to path outside datadir
[30 Jan 2009 13:29] Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 15:09] Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version source revid:msvensson@mysql.com-20081010141904-5ym2tfkfmxc8sxn2) (merge vers: 5.1.30) (pib:6)
[30 Jan 2009 17:30] Paul DuBois
Test suite changes. No changelog entry needed.
[17 Feb 2009 14:56] Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:tomas.ulin@sun.com-20090217131017-6u8qz1edkjfiobef) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 16:44] Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:tomas.ulin@sun.com-20090217134419-5ha6xg4dpedrbmau) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 18:20] Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090217134216-5699eq74ws4oxa0j) (version source revid:tomas.ulin@sun.com-20090201210519-vehobc4sy3g9s38e) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)