Bug #31243 Test "partition_basic_myisam" truncates path names
Submitted: 27 Sep 2007 14:40 Modified: 1 Nov 2007 12:49
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1.22 OS:Any
Assigned to: Matthias Leich CPU Architecture:Any

[27 Sep 2007 14:40] Joerg Bruehe
Description:
Found during the build of 5.1.22-rc.

The release builds use *very* long path names, and it seems some setting of the test (or some internal limit of the server) cannot deal with as many path names (of this length) as the test uses.

Just some starts of the difference files which show the path name (list) truncation:

-------------------------------------------------------
*** /PATH/mysql-test/suite/parts/r/partition_basic_myisam.result
--- /PATH/mysql-test/suite/parts/r/partition_basic_myisam.reject
***************
*** 5661,5666
--- 5661,5668
  INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
  SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
  # Start usability test (include/partition_check.inc)
+ Warnings:
+ Warning       1265    Data truncated for column 'file_list' at row 1
  create_command
  SHOW CREATE TABLE t1;
  Table Create Table
***************
*** 5705,5713
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI
!
  # check prerequisites-1 success:    1
  # check COUNT(*) success:    1
  # check MIN/MAX(f_int1) success:    1
--- 5707,5713
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI
! /home/mysqldev/tmp-200709240936-5.1.
  # check prerequisites-1 success:    1
  # check COUNT(*) success:    1
  # check MIN/MAX(f_int1) success:    1
***************
Here, it affects the original path name as used in the release builds ...

***************
*** 5661,5666
  INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
  SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
  # Start usability test (include/partition_check.inc)
  create_command
  SHOW CREATE TABLE t1;
  Table Create Table
--- 5661,5668
  INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
  SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
  # Start usability test (include/partition_check.inc)
+ Warnings:
+ Warning       1265    Data truncated for column 'file_list' at row 1
  create_command
  SHOW CREATE TABLE t1;
  Table Create Table
***************
*** 5705,5713
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI
!
  # check prerequisites-1 success:    1
  # check COUNT(*) success:    1
  # check MIN/MAX(f_int1) success:    1
--- 5707,5713
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1
  # check prerequisites-1 success:    1
  # check COUNT(*) success:    1
  # check MIN/MAX(f_int1) success:    1
***************
... and here, it is after "--replace-result" has been applied.

The problem may also show up earlier or later for the first time, probably because of different path names (longer/shorter) or different numbers of partitions (more/fewer):

***************
*** 4681,4686
--- 4681,4688
  INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
  SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
  # Start usability test (include/partition_check.inc)
+ Warnings:
+ Warning       1265    Data truncated for column 'file_list' at row 1
  create_command
  SHOW CREATE TABLE t1;
  Table Create Table
***************
*** 4723,4733
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI
!
  # check prerequisites-1 success:    1
  # check COUNT(*) success:    1
  # check MIN/MAX(f_int1) success:    1
--- 4725,4731
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI
! $MYSQLTEST_VARDIR/master-data/
  # check prerequisites-1 success:    1
  # check COUNT(*) success:    1
  # check MIN/MAX(f_int1) success:    1
***************

***************
*** 7144,7149
--- 7144,7151
  INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
  SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
  # Start usability test (include/partition_check.inc)
+ Warnings:
+ Warning       1265    Data truncated for column 'file_list' at row 1
  create_command
  SHOW CREATE TABLE t1;
  Table Create Table
***************
*** 7191,7200
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI
! $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI
!
  # check prerequisites-1 success:    1
  # check COUNT(*) success:    1
  # check MIN/MAX(f_int1) success:    1
--- 7193,7199
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI
  $MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI
! $MYSQLTEST_VARDIR
  # check prerequisites-1 success:    1
  # check COUNT(*) success:    1
  # check MIN/MAX(f_int1) success:    1
***************

In addition, for each run the output starts with many error messages like this:
Errors are (from /PATH/mysqltest-time) :
/home/mysqldev/tmp-200709240936-5.1.22-rc-24907/hpux11/test/mysql-5.1.22-rc-hpux11.11-hppa2.0w/mysql-test/var/master-data/t
est/t1* not found
.....

How to repeat:
Run the test suite in a build environment
or otherwise enforce long path names.

Suggested fix:
Check whether column "file_list" can be made wider,
or reduce the number of partitions.
[9 Oct 2007 18:11] Matthias Leich
Hi Joerg, thank you for fine analysis.
An increase of the length of column files_list solved the problem.
[9 Oct 2007 18:14] Matthias Leich
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/35218

ChangeSet@1.2574, 2007-10-09 19:51:57+02:00, mleich@four.local.lan +19 -0
Combined fix for
   Bug#31481 test suite parts: Many tests fail because of changed server
             error codes
   Bug#31243 Test "partition_basic_myisam" truncates path names
+ minor cleanup
[10 Oct 2007 21:30] Matthias Leich
No documentation needed.
[1 Nov 2007 10:15] Bugs System
Pushed into 6.0.4-alpha
[1 Nov 2007 10:16] Bugs System
Pushed into 5.1.23-rc