Bug #18564 Test failure due to test not checking preconditions
Submitted: 28 Mar 2006 1:55 Modified: 12 May 2006 15:02
Reporter: Ian Greenhoe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: User-defined functions ( UDF ) Severity:S1 (Critical)
Version:5.0 bk OS:Linux (FC-4 AMD 64)
Assigned to: Magnus Blåudd CPU Architecture:Any

[28 Mar 2006 1:55] Ian Greenhoe
Description:
UDF test fails.

Comment in test reads:
# To run this tests the "sql/udf_example.cc" need to be compiled into
# udf_example.so and LD_LIBRARY_PATH should be setup to point out where
# the library are.

The test should check to see if sql/udf_example.so exists.  If the library is missing, the test should "skip" itself.

How to repeat:
rename or delete the sql/udf_example.so file (if it exists.)

Then run the udf test:
  mysql-test-run.pl --force udf
[28 Mar 2006 15:49] Valeriy Kravchuk
Thank you for a problem report. Sorry, but I was not able to repeat with 5.0-BK (ChangeSet@1.2104, 2006-03-28 11:46:35+02:00, mskold@mysql.com) running on SuSE 9.3 on i686:

openxs@suse:~/dbs/5.0/mysql-test> ./mysql-test-run --force udf
Installing Test Databases
Removing Stale Files
Installing Master Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=.. --datadir=mysql-test/var/master-data --skip-innodb --skip-ndbcluster --skip-bdb
Installing Slave Databases
running  ../libexec/mysqld --no-defaults --bootstrap --skip-grant-tables     --basedir=.. --datadir=mysql-test/var/slave-data --skip-innodb --skip-ndbcluster --skip-bdb
Manager disabled, skipping manager start.
Loading Standard Test Databases
Starting Tests

TEST                            RESULT
-------------------------------------------------------
udf                            [ skipped ]
-------------------------------------------------------

Ending Tests
Shutting-down MySQL daemon

Master shutdown finished
Slave shutdown finished
All 0 tests were successful.

So, isn't it a desired behaviour?
[12 Apr 2006 13:13] 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/4858
[19 Apr 2006 12:14] Magnus Blåudd
Pushed to 5.0.21 a patch that makes it possible to check if the server support dynamic loading("have_dynamic_loading") of shared libraries. Use that variable to determine if udf.test should be run.
[9 May 2006 7:36] Magnus Blåudd
The udf.test now looks at the envirnonment variable UDF_EXAMPLE_LIB to determine if we have compiled the udf_example.so
This variable is initialized by mysql-test-run.pl

See http://lists.mysql.com/commits/5647
[10 May 2006 19:33] Magnus Blåudd
Still disabled in 5.1 - to  be checked.