Bug #39102 valgrind build does not compile in realpath, which make DATA/INDEX DIR fail
Submitted: 28 Aug 2008 18:10 Modified: 13 Nov 2008 4:46
Reporter: Mattias Jonsson
Status: Closed
Category:Server: Compiling Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Alexey Botchkov Target Version:5.1+
Tags: regression
Triage: Triaged: D3 (Medium)

[28 Aug 2008 18:10] Mattias Jonsson
Description:
After bug#32167 some test using DATA/INDEX DIRECTORY fails when open (e.g. alter, select,
show) if it is built with valgrind.

How to repeat:
use mysql-5.1-bugteam, compile with valgrind, run test partition_not_windows:
mysqltest: At line 40: query 'ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
(partition p1 VALUES LESS THAN (1) $data_directory $inx_directory
(SUBPARTITION subpart10, SUBPARTITION subpart11),
partition p2 VALUES LESS THAN (2) $data_directory $inx_directory
(SUBPARTITION subpart20, SUBPARTITION subpart21))' failed: 1030: Got error 140 from
storage engine

Suggested fix:
remove the #ifdef HAVE_purify in mysys/my_symlink.c

=== modified file 'mysys/my_symlink.c'
--- mysys/my_symlink.c	2008-08-26 09:31:17 +0000
+++ mysys/my_symlink.c	2008-08-28 16:05:25 +0000
@@ -127,7 +127,7 @@
 int my_realpath(char *to, const char *filename,
 		myf MyFlags __attribute__((unused)))
 {
-#if defined(HAVE_REALPATH) && !defined(HAVE_purify) && !defined(HAVE_BROKEN_REALPATH)
+#if defined(HAVE_REALPATH) && !defined(HAVE_BROKEN_REALPATH)
   int result=0;
   char buff[BUFF_LEN];
   char *ptr;

There might be more dependencies...
[28 Aug 2008 21:47] Sveta Smirnova
Thank you for the report.

Which option did you use to compile with valgrind?
[28 Aug 2008 21:58] Mattias Jonsson
I used the BUILD/compile-pentium-valgrind-max script.
[28 Aug 2008 22:42] Sveta Smirnova
Thank you for the report.

Verified as described.
[4 Oct 2008 12:54] 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/55316

2669 Sven Sandberg	2008-10-04
      BUG#39102: valgrind build does not compile in realpath, which make DATA/INDEX DIR
fail
      Disable the test case on valgrind.
[4 Oct 2008 13:03] 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/55317

2669 Sven Sandberg	2008-10-04
      BUG#39102: valgrind build does not compile in realpath, which make DATA/INDEX DIR
fail
      Disable the test case on valgrind. This is a backport to 5.1-rpl of
      something that already exists in 5.1 main.
[4 Oct 2008 13:04] 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/55318

2669 Sven Sandberg	2008-10-04
      BUG#39102: valgrind build does not compile in realpath, which make DATA/INDEX DIR
fail
      Disable the test case on valgrind. This is a backport to 5.1-rpl of
      something that already exists in 5.1 main.
[4 Oct 2008 13: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:

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

2668 Sven Sandberg	2008-10-04
      BUG#39102: valgrind build does not compile in realpath, which make DATA/INDEX DIR
fail
      Disable the test case on valgrind. This is a backport to 5.1-rpl of
      something that already exists in 5.1 main.
[4 Oct 2008 13:09] Sven Sandberg
No patch has been committed for this bug. The changeset above just disables the test case
in 5.1-rpl, so please ignore it.
[14 Oct 2008 12:03] Mattias Jonsson
bug#39987 is a duplicate of this, and have a proposed fix.
[27 Oct 2008 17:38] 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/57126

2684 Alexey Botchkov	2008-10-27
      Bug#39102 valgrind build does not compile in realpath, which make DATA/INDEX DIR
fail 
          #ifdef HAVE_purify removed
      
      per-file comments:
        mysql-test/t/partition_not_windows.test
      Bug#39102 valgrind build does not compile in realpath, which make DATA/INDEX DIR
fail 
          test reenabled
      
        mysys/my_symlink.c
      Bug#39102 valgrind build does not compile in realpath, which make DATA/INDEX DIR
fail 
        superfluous ifdef removed, comments fixed
[27 Oct 2008 17:43] Mattias Jonsson
OK to push by me.
[10 Nov 2008 11:52] Bugs System
Pushed into 6.0.8-alpha  (revid:holyfoot@mysql.com-20081027152511-2yulylexoiwuxu87)
(version source revid:mattias.jonsson@sun.com-20081029224653-5atmknjnm0697qkg) (pib:5)
[10 Nov 2008 12:36] Bugs System
Pushed into 5.1.30  (revid:holyfoot@mysql.com-20081027152511-2yulylexoiwuxu87) (version
source revid:holyfoot@mysql.com-20081027152511-2yulylexoiwuxu87) (pib:5)
[11 Nov 2008 17:07] Paul DuBois
The versions are actually 5.1.31, 6.0.9.
[13 Nov 2008 4:46] Paul DuBois
Noted in 5.1.31, 6.0.9 changelog.

When built with Valgrind, the server failed to access tables created
with the DATA DIRECTORY or INDEX DIRECTORY table option.
[19 Jan 12:23] Bugs System
Pushed into 5.1.31-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090119095303-uwwvxiibtr38djii)
(version source revid:tomas.ulin@sun.com-20090108105244-8opp3i85jw0uj5ib) (merge vers:
5.1.31-ndb-6.2.17) (pib:6)
[19 Jan 14:00] Bugs System
Pushed into 5.1.31-ndb-6.3.21 (revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl)
(version source revid:tomas.ulin@sun.com-20090119104956-guxz190n2kh31fxl) (merge vers:
5.1.31-ndb-6.3.21) (pib:6)
[19 Jan 17:06] Bugs System
Pushed into 5.1.31-ndb-6.4.1 (revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5)
(version source revid:tomas.ulin@sun.com-20090119144033-4aylstx5czzz88i5) (merge vers:
5.1.31-ndb-6.4.1) (pib:6)
[30 Jan 14:27] 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 16:07] Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version
source revid:mats@sun.com-20081006122144-1n1lx7olognxvcj2) (merge vers: 5.1.30) (pib:6)
[17 Feb 15:54] 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 17:41] 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 19:18] 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)