Bug #37995 Error message truncation in test "innodb" in embedded mode
Submitted: 9 Jul 2008 15:42 Modified: 7 Aug 2009 0:28
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S3 (Non-critical)
Version:5.1.26-rc OS:Any
Assigned to: Alexey Botchkov CPU Architecture:Any

[9 Jul 2008 15:42] Joerg Bruehe
Description:
This is the re-introduction of bug#16635 and/or bug#19672
(both are "closed").
In the archived test failures, it starts appearing in version 5.1.24.

It occurs in some builds only,
and I suppose this is because the absolute path to the test tree is of varying length.

Some occurrences:

=====
--- /PATH/mysql-test/r/innodb.result
+++ /PATH/mysql-test/r/innodb.reject
@@ -2664,7 +2664,7 @@
 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)
+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;
@@ -3134,7 +3134,7 @@
 INSERT INTO t2 VALUES (1);
 ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
 ALTER TABLE t2 MODIFY a INT NOT NULL;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
+ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (e
 DELETE FROM t1;
 DROP TABLE t2,t1;
 CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)

mysqltest: Result content mismatch
=====

=====
--- /PATH/mysql-test/r/innodb.result
+++ /PATH/mysql-test/r/innodb.reject
@@ -2664,7 +2664,7 @@
 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)
+ERROR HY000: Error on rename of './test/t3' to './mast
 set foreign_key_checks=1;
 drop table t2,t3;
 create table t1(a int primary key) row_format=redundant engine=innodb;
@@ -3134,7 +3134,7 @@
 INSERT INTO t2 VALUES (1);
 ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL;
 ALTER TABLE t2 MODIFY a INT NOT NULL;
-ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
+ERROR HY000: Error on rename of '#sql-temporary' to '/home/mysqldev/tmp-200806302232-5.1.26-rc-10994/rpm/BUIL
D/mysql-5.1.26-rc/mysql-release-5.1.26-rc/mysql-test
 DELETE FROM t1;
 DROP TABLE t2,t1;
 CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY)

mysqltest: Result content mismatch
=====

The message format string is unchanged since 2006, so I have no explanation why it suddenly show up again.

The only idea is that our path names may have become longer ...

How to repeat:
Run a test of "embedded" in a directory with long absolute path.

Suggested fix:
Change the build tools to use shorter path names.
[9 Jul 2008 15:45] Joerg Bruehe
Bug severity depends on a guess of the customer situation:

If they need long absolute path names when running embedded,
we have to change server code to support longer expanded messages,
and a "real" fix becomes important.

If short names may be required, this is just an issue of internal tests
(my assumption here).
(This is also the base for the category "packaging".)
[22 Aug 2008 16:07] Daniel Fischer
Bug#38142 was marked as a duplicate of this bug.
[22 Aug 2008 16:09] Daniel Fischer
Also observed in pushbuild on Solaris and FreeBSD.

May I suggest that if InnoDB is not supposed to work in the embedded server, we should try not to test it? :-)
[18 Nov 2008 20:37] Joerg Bruehe
Regarding InnoDB in the embedded library:
In our release builds, we have never seen any specific problems in this combination; InnoDB acts similar in the embedded lib and in the separate server.

Fixing the category "packaging", which is wrong: This is about the length (and truncation) of error messages in the embedded library.
[19 Nov 2008 10:02] Joerg Bruehe
Fix wrong status - not "analyzing" but "verified".
[9 Dec 2008 13:25] 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/61059

2732 Alexey Botchkov	2008-12-09
      Bug#37995      Error message truncation in test "innodb" in embedded mode
              as embedded-server specifies the complete file path in the error message,
              the current buffer of 256 can be easily overrun, so the error message will
              be cut. That leads to failing tests as the error message doesn't coincide.
      
              Error buffer increased. It's not an ultimate solution, still fixes the issue
              on the foreseenable perspective. And i think it's good to do anyway as
              now the error message limit is 512 in the client, so cutting the message at
              256 looks weird.
      
      per-file comments:
        include/my_sys.h
      Bug#37995      Error message truncation in test "innodb" in embedded mode
              error message buffer increased
        sql/share/errmsg.txt
      Bug#37995      Error message truncation in test "innodb" in embedded mode
              filename in the error message can safely take up to 210 symbols.
[9 Feb 2009 22:34] Bugs System
Pushed into 5.1.32 (revid:davi.arnaut@sun.com-20090209214102-gj3sb3ujpnvpiy4c) (version source revid:davi.arnaut@sun.com-20090209214102-gj3sb3ujpnvpiy4c) (merge vers: 5.1.32) (pib:6)
[14 Feb 2009 13:01] Bugs System
Pushed into 6.0.10-alpha (revid:matthias.leich@sun.com-20090212211028-y72faag15q3z3szy) (version source revid:holyfoot@mysql.com-20090205062755-gzc5ef7rfd5xn0f5) (merge vers: 6.0.10-alpha) (pib:6)
[17 Feb 2009 14: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-20090216083408-rmvyaxjt6mk8sg1y) (merge vers: 5.1.32-ndb-6.3.23) (pib:6)
[17 Feb 2009 16:42] 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-20090216083646-m8st11oj1hhfuuh5) (merge vers: 5.1.32-ndb-6.4.3) (pib:6)
[17 Feb 2009 18: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-20090211111208-wf0acl7c1vl5653e) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)
[7 Aug 2009 0:28] Paul Dubois
Noted in 5.1.32, 6.0.10 changelogs.

The embedded server truncated some error messages.