Bug #38427 "Data too long" in some configurations, tests "<ENGINE>_func_view" fail
Submitted: 29 Jul 2008 13:38 Modified: 17 Oct 2008 17:17
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1.26-rc,6.0.6 OS:Any
Assigned to: Matthias Leich CPU Architecture:Any

[29 Jul 2008 13:38] Joerg Bruehe
Description:
This test failure seems to be new in 5.1.26-rc (and up),
and it is specific to the "generic" community RPMs.

=====
funcs_1.innodb_func_view       [ fail ]

mysqltest: In included file "./suite/funcs_1/views/fv1.inc": At line 2: query 'EXECUTE ins_sel_with_result' fa
iled: 1406: Data too long for column 'my_select' at row 1

The result from queries just before the failure was:
< snip >
SET @my_select =
'SELECT LEFT(my_varbinary_1000, 2), my_varbinary_1000, id FROM t1_values';
SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_bigint), my_bigint, id FROM t1_values';
SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_decimal), my_decimal, id FROM t1_values';
SET @my_select =
'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', my_double), my_double, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_char_30),
my_char_30, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_varchar_1000),
my_varchar_1000, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_binary_30),
my_binary_30, id FROM t1_values';
SET @my_select = 'SELECT LENGTH(my_varbinary_1000),
my_varbinary_1000, id FROM t1_values';
SET @my_select =
'SELECT LOAD_FILE(''<MYSQLTEST_VARDIR>/std_data_ln/funcs_1/load_file.txt'')
           AS my_col,
        id FROM t1_values';

More results from queries before failure can be found in /PATH/mysql-test/var/log/innodb_func_view.log
=====

The same failure occurs in "memory_func_view" and "myisam_func_view".

How to repeat:
Build generic community RPMs.

Suggested fix:
The failure is specific to the generic community RPMs which are built from their own "spec" file, so it is likely this contains some configure option which is responsible for the effect.

As the test passes in all other builds, IMO the problem is with the configuration and not with the test.

I had asked around, but nobody could tell me of a configure option that might cause this effect.

Once this is determined, the fix would be the modification of this "spec" file.
[22 Aug 2008 16:26] Daniel Fischer
This problem is visible in pushbuild2 on *all* UNIX-oid configurations, so it is a bit annoying. It will generally happen on any setup depending on where in the vfs the test suite is executed.

The cause is quite simple; these test cases store queries along with their results in a table and the column for the query is declared along the lines of "my_select varchar(200)". The LOAD_FILE query contains the full path to the file that is being LOAD_FILEd and when the query including this path becomes longer than 200 characters, the test case fails.
[18 Sep 2008 15:18] Matthias Leich
Hi Daniel,

thank you for the analysis. You hit exact the problem.
I will increase the size of the column my_select.
[18 Sep 2008 15:21] 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/54314
[2 Oct 2008 11:47] 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/55065

2684 Matthias Leich	2008-10-02
      Fix for Bug#38427 "Data too long" in some configurations,
                        tests "<ENGINE>_func_view" fail
[2 Oct 2008 12:12] 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/55070

2746 Matthias Leich	2008-10-02 [merge]
      Merge 5.0 -> 5.1 of fix for Bug#38427
      "Data too long" in some configurations, tests "<ENGINE>_func_view" fail
[2 Oct 2008 13:34] 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/55078

2827 Matthias Leich	2008-10-02 [merge]
      Merge 5.1 -> 6.0 of fix for Bug#38427
      "Data too long" in some configurations, tests "<ENGINE>_func_view" fail
[2 Oct 2008 14:00] 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/55083

2694 Matthias Leich	2008-10-02 [merge]
      Merge of fixes for Bug#38427 and Bug#38762 into actual tree
      (no conflicts)
[4 Oct 2008 15:14] 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/55323

2697 Matthias Leich	2008-10-04 [merge]
      Merge of fixes for Bug#38427 and Bug#38762 into actual tree
      (no conflicts)
[6 Oct 2008 10:12] Matthias Leich
Pushed to
mysql-5.1-bugteam
mysql-6.0-bugteam
[7 Oct 2008 13:15] 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/55587

2688 Matthias Leich	2008-10-07
      Cherry picking of fixes for Bug#38762 and Bug#38427
        Bug#38762 main.federated_bug_25714 fails sporadically
        Bug#38427 "Data too long" in some configurations, tests "<ENGINE>_func_view" fail
[9 Oct 2008 17:27] Bugs System
Pushed into 5.0.72  (revid:matthias.leich@sun.com-20081004151343-55606npfydot6cv3) (version source revid:matthias.leich@sun.com-20081004151343-55606npfydot6cv3) (pib:4)
[9 Oct 2008 17:38] Bugs System
Pushed into 5.1.30  (revid:matthias.leich@sun.com-20081004151343-55606npfydot6cv3) (version source revid:mats@sun.com-20081008113713-2vxny72m5w1tywoi) (pib:4)
[15 Oct 2008 15:02] Paul Dubois
This is actually pushed to 5.1.29, not 5.1.30.
[15 Oct 2008 16:57] Paul Dubois
Test case changes. No changelog entry needed.

Setting report to NDI pending push into 6.0.x.
[17 Oct 2008 16:41] Bugs System
Pushed into 6.0.8-alpha  (revid:matthias.leich@sun.com-20081004151343-55606npfydot6cv3) (version source revid:matthias.leich@sun.com-20081004164917-ly18y5m21rz1l2dz) (pib:5)
[17 Oct 2008 17:17] Paul Dubois
No changelog entry needed.
[28 Oct 2008 21:02] Bugs System
Pushed into 5.1.29-ndb-6.2.17  (revid:matthias.leich@sun.com-20081004151343-55606npfydot6cv3) (version source revid:tomas.ulin@sun.com-20081028140209-u4emkk1xphi5tkfb) (pib:5)
[28 Oct 2008 22:20] Bugs System
Pushed into 5.1.29-ndb-6.3.19  (revid:matthias.leich@sun.com-20081004151343-55606npfydot6cv3) (version source revid:tomas.ulin@sun.com-20081028194045-0353yg8cvd2c7dd1) (pib:5)
[1 Nov 2008 9:45] Bugs System
Pushed into 5.1.29-ndb-6.4.0  (revid:matthias.leich@sun.com-20081004151343-55606npfydot6cv3) (version source revid:jonas@mysql.com-20081101082305-qx5a1bj0z7i8ueys) (pib:5)