Bug #35335 funcs_1: Some tests fail within load_file during pushbuild runs
Submitted: 17 Mar 2008 13:23 Modified: 1 May 2008 19:11
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.0 OS:Any
Assigned to: Matthias Leich CPU Architecture:Any
Triage: D3 (Medium)

[17 Mar 2008 13:23] Matthias Leich
Description:
Snip from protocol:
Logging: ./mysql-test-run.pl
          --tmpdir=/dev/shm/pbtmp-funcs_1-100
          --vardir=/dev/shm/var-funcs_1-100
          --timer --force --suite=funcs_1
....
TEST                RESULT         TIME (ms)
--------------------------------------------
charset_collation_1 [ pass ]          3
...
--- .../suite/funcs_1/r/innodb_func_view.result ...
+++ .../suite/funcs_1/r/innodb_func_view.reject	...
@@ -827,16 +827,11 @@
 SELECT LOAD_FILE('../log/current_test'), id FROM t1_values
 WHERE select_id = 150 OR select_id IS NULL;
 LOAD_FILE('../log/current_test')	id
-CURRENT_TEST: innodb_func_view
-	1
-CURRENT_TEST: innodb_func_view
-	2
-CURRENT_TEST: innodb_func_view
-	3
-CURRENT_TEST: innodb_func_view
-	4
-CURRENT_TEST: innodb_func_view
-	5
+NULL	1
+NULL	2
+NULL	3
+NULL	4
+NULL	5

This difference shows that the server did
not load the content of the file
'../log/current_test' is not loaded.
This effect is caused by the secure file
privileges + the assignment of tmpdir and vardir
within the call of mysql-test-run.pl.

All <engine>_func_view variants +
is_basics_mixed fail because of these problems.

How to repeat:
Just run the tests in the following variant:
./mysql-test-run.pl \
   --tmpdir=/dev/shm/pbtmp-funcs_1-100 \
   --vardir=/dev/shm/var-funcs_1-100 \
   --timer --force --suite=funcs_1
or have a look on the URL where the results
of pushbuilds for mysql-5.0-build are presented.

Suggested fix:
Modify the tests or their environment so that
the tests work like expected.
[17 Mar 2008 14:13] Matthias Leich
IMHO this bug within the tests is
- for customers (<> "internal customers" like pushbuild)
  D4 = Minor failure
  W4 = Acceptable workaround (do not assign vardir and tmpdir)
  I5 = Negligible impact
- for pushbuild
  D2 = Serious failure
  W2 = Workaround is not acceptable
  I1 = Critical Impact because every pushbuild run of the
       corresponding tests fails
Therefore I set the bug triage to some mixup of the
values above.
[19 Mar 2008 15:09] 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/44231

ChangeSet@1.2587, 2008-03-19 16:08:06+01:00, mleich@five.local.lan +99 -0
  Fix for 
     Bug#35335 funcs_1: Some tests fail within load_file during
                        pushbuild runs
     Solution: 1. Move files with input data used in load_file, 
                  load data etc. 
                  from suite/funcs_1/<whatever>
                  to std_data
               2. Use for testsuite funcs_1 the server option
                  --secure-file-priv=<MYSQLTEST_VARDIR>
               3. Outfiles have to be stored under MYSQLTEST_VARDIR 
  + some improvements which hopefully reduce expenses of future
    testsuite maintenance
    - backport of fixes/improvements made in 5.1 to 5.0
      The differences between scripts in 5.0 and 5.1 cause
      much additional and annoying work during any upmerge.
    - replace error numbers with names
    - improved comments
    - improved formatting
    - Unify storage engine names so that result files for
      storage engine variants do not differ (some tests)
    - remove a script no more used (tests are done in other scripts)
[19 Mar 2008 15:56] 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/44236

ChangeSet@1.2587, 2008-03-19 16:54:26+01:00, mleich@five.local.lan +99 -0
  Fix for 
     Bug#35335 funcs_1: Some tests fail within load_file during
                        pushbuild runs
     Solution: 1. Move files with input data used in load_file, 
                  load data etc. 
                  from suite/funcs_1/<whatever>
                  to std_data
               2. Use for testsuite funcs_1 the server option
                  --secure-file-priv=<MYSQLTEST_VARDIR>
               3. Outfiles have to be stored under MYSQLTEST_VARDIR 
  + changes according to WL#4304 Cleanup in funcs_1 tests
    - backport of fixes/improvements made in 5.1 to 5.0
      The differences between scripts in 5.0 and 5.1 cause
      much additional and annoying work during any upmerge.
    - replace error numbers with names
    - improved comments
    - improved formatting
    - Unify storage engine names so that result files for
      storage engine variants do not differ (some tests)
    - remove a script no more used (tests are done in other scripts)
[21 Mar 2008 18:22] Patrick Crews
Ok to push.

Tested on 5.0.  Verified changes fix the bug and mysql-test suite continues to run properly without the initial bug parameters.  funcs_1 changes work fine.
[31 Mar 2008 17:49] 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/44700

ChangeSet@1.2598, 2008-03-31 19:48:02+02:00, mleich@five.local.lan +116 -0
  Fix for 
     Bug#35335 funcs_1: Some tests fail within load_file during
                        pushbuild runs
     Solution: 1. Move files with input data used in load_file, 
                  load data etc. 
                  from suite/funcs_1/<whatever>
                  to std_data
               2. Use for testsuite funcs_1 the server option
                  --secure-file-priv=<MYSQLTEST_VARDIR>
               3. Outfiles have to be stored under MYSQLTEST_VARDIR 
  + changes according to WL#4304 Cleanup in funcs_1 tests
    - backport of fixes/improvements made in 5.1 to 5.0
      The differences between scripts in 5.0 and 5.1 cause
      much additional and annoying work during any upmerge.
    - replace error numbers with names
    - improved comments
    - improved formatting
    - Unify storage engine names so that result files for
      storage engine variants do not differ (some tests)
    - remove a script no more used (tests are done in other scripts)
[1 Apr 2008 11:19] 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/44726

ChangeSet@1.2584, 2008-04-01 13:18:31+02:00, mleich@five.local.lan +71 -0
  Post merge fix for
[1 Apr 2008 21:10] 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/44761

ChangeSet@1.2615, 2008-04-01 23:01:02+02:00, mleich@five.local.lan +38 -0
  Post merge fix for
[1 May 2008 10:05] Bugs System
Pushed into 5.1.25-rc
[1 May 2008 10:07] Bugs System
Pushed into 6.0.6-alpha
[1 May 2008 19:11] Paul Dubois
Test suite changes. No changelog entry needed.
[1 May 2008 19:14] Bugs System
Pushed into 5.0.62
[13 May 2008 14:51] Bugs System
Pushed into 5.0.62
[13 May 2008 15:28] Bugs System
Pushed into 5.1.25-rc
[13 May 2008 15:46] Bugs System
Pushed into 6.0.6-alpha
[28 Jul 2008 13:51] Bugs System
Pushed into 5.0.62  (revid:sp1r-gkodinov/kgeorge@magare.gmz-20080514103209-22666) (pib:2)
(Retry automatic marking, to ensure nothing is missed. cm01)
[28 Jul 2008 16:57] Bugs System
Pushed into 5.1.25-rc  (revid:sp1r-pcrews@pcrews-mac-local.local-20080515160233-33422) (version source revid:sp1r-pcrews@pcrews-mac-local.local-20080515160233-33422) (pib:3)