Bug #19672 Test fails in "embedded" because of path name truncation to 64 chars
Submitted: 10 May 2006 11:14 Modified: 23 Jul 2006 3:46
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S3 (Non-critical)
Version:5.1.10-beta OS:Any (All)
Assigned to: Alexey Botchkov CPU Architecture:Any

[10 May 2006 11:14] Joerg Bruehe
Description:
The few builds where "embedded" did not crash immediately (bug#19650)
failed in "ps_1general":

-------------------------------------------------------
*** r/ps_1general.result
--- r/ps_1general.reject
***************
*** 539,545
  prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
  create table t5 (a int) ;
  execute stmt1 ;
! ERROR HY000: Can't find file: './test/t7' (errno: 2)
  create table t7 (a int) ;
  execute stmt1 ;
  execute stmt1 ;
--- 539,545
  prepare stmt1 from ' rename table t5 to t6, t7 to t8 ' ;
  create table t5 (a int) ;
  execute stmt1 ;
! ERROR HY000: Can't find file: '/var/tmp/mysqldev/hpux11/test/mysql-5.1.10-beta-hpux11.11-hppa2.' (errno: 2)
  create table t7 (a int) ;
  execute stmt1 ;
  execute stmt1 ;
-------------------------------------------------------

Similar on SCO (different path name).

AIUI, this happens because the error message writes only 64 characters of the path name, so the strings replacement in the test does not apply (string does not match).

Similar effect in test "innodb":
-------------------------------------------------------
*** r/innodb.result
--- r/innodb.reject
***************
*** 2912,2918
  create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
  create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;
  rename table t3 to t1;
! ERROR HY000: Error on rename of './test/t3' to './test/t1' (errno: 150)
  set foreign_key_checks=1;
  drop table t2,t3;
  create table t1(a int primary key) row_format=redundant engine=innodb;
--- 2912,2918
  create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=latin1;
  create table t3(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=utf8;
  rename table t3 to t1;
! ERROR HY000: Error on rename of '/home/mysqldev/opnsrv6c/test/mysql-5.1.10-beta-sco-osr6-i686/mys' to '/home/mysqldev/opn
srv6c/test/mysql-5.1.10-beta-sco-osr6-i686/mys' (errno: 150)
  set foreign_key_checks=1;
  drop table t2,t3;
  create table t1(a int primary key) row_format=redundant engine=innodb;
-------------------------------------------------------
(here: SCO; hpux11 is corresponding)

How to repeat:
Run the test suite on the "embedded" server.

Suggested fix:
With current path name lengths
and especially with the embedded server reporting the full path name,
a limit of 64 characters in the error message might be inappropriate ?

See the "rename table t1 to t2;" in test "trigger" 
which fails with an "Errcode: 13" message (as intended)
but still reports the full name.
[20 Jun 2006 11:48] 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/7916
[22 Jun 2006 15:20] Alexander Barkov
Ok to push
[23 Jul 2006 3:26] Paul DuBois
No changelog entry needed.