Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2192 06/04/27 16:32:40 msvensson@shellback.(none) +7 -0
Add test to mysql-test-run.pl to see if the udf_example.so is availble. Set envioronment variable UDF_EXAMPLE_LIB if it is.
Then check in have_udf if that variable is set. Finally use tahe variable when loading the shared library.
mysql-test/r/have_udf_example.require
1.1 06/04/27 16:32:36 msvensson@shellback.(none) +2 -0
New BitKeeper file ``mysql-test/r/have_udf_example.require''
mysql-test/r/have_udf_example.require
1.0 06/04/27 16:32:36 msvensson@shellback.(none) +0 -0
BitKeeper file /home/msvensson/mysql/mysql-5.0-maint/mysql-test/r/have_udf_example.require
mysql-test/t/udf.test
1.4 06/04/27 16:32:35 msvensson@shellback.(none) +18 -10
Use variable UDF_EXAMPLE_LIB when looking for shared library to load
mysql-test/t/disabled.def
1.28 06/04/27 16:32:35 msvensson@shellback.(none) +0 -1
Remove udf.test from disabled tests
mysql-test/r/udf.result
1.4 06/04/27 16:32:35 msvensson@shellback.(none) +8 -8
Update result
mysql-test/mysql-test-run.pl
1.95 06/04/27 16:32:35 msvensson@shellback.(none) +4 -0
Add checks to find the udf_example.so library
mysql-test/lib/mtr_misc.pl
1.11 06/04/27 16:32:35 msvensson@shellback.(none) +16 -0
Add funcion "mtr_file_exist" to search for files
mysql-test/include/have_udf.inc
1.3 06/04/27 16:32:35 msvensson@shellback.(none) +8 -0
Add check if udf_example.so(or similar) is available
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/mysql-5.0-maint
--- 1.10/mysql-test/lib/mtr_misc.pl 2006-04-24 10:27:09 +02:00
+++ 1.11/mysql-test/lib/mtr_misc.pl 2006-04-27 16:32:35 +02:00
@@ -12,6 +12,7 @@
sub mtr_add_arg ($$@);
sub mtr_path_exists(@);
sub mtr_script_exists(@);
+sub mtr_file_exists(@);
sub mtr_exe_exists(@);
sub mtr_copy_dir($$);
sub mtr_same_opts($$);
@@ -83,6 +84,21 @@
foreach my $path ( @_ )
{
return $path if -x $path;
+ }
+ if ( @_ == 1 )
+ {
+ mtr_error("Could not find $_[0]");
+ }
+ else
+ {
+ mtr_error("Could not find any of " . join(" ", @_));
+ }
+}
+
+sub mtr_file_exists (@) {
+ foreach my $path ( @_ )
+ {
+ return $path if -e $path;
}
if ( @_ == 1 )
{
--- 1.94/mysql-test/mysql-test-run.pl 2006-04-24 13:33:28 +02:00
+++ 1.95/mysql-test/mysql-test-run.pl 2006-04-27 16:32:35 +02:00
@@ -188,6 +188,7 @@
our $exe_slave_mysqld;
our $exe_im;
our $exe_my_print_defaults;
+our $lib_udf_example;
our $opt_bench= 0;
our $opt_small_bench= 0;
@@ -1057,6 +1058,8 @@
mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables");
$path_ndb_tools_dir= mtr_path_exists("$glob_basedir/ndb/tools");
$exe_ndb_mgm= "$glob_basedir/ndb/src/mgmclient/ndb_mgm";
+ $lib_udf_example=
+ mtr_file_exists("$glob_basedir/sql/.libs/udf_example.so");
}
else
{
@@ -2936,6 +2939,7 @@
$ENV{'MYSQL_CLIENT_TEST'}= $cmdline_mysql_client_test;
$ENV{'CHARSETSDIR'}= $path_charsetsdir;
$ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults;
+ $ENV{'UDF_EXAMPLE_LIB'}= basename($lib_udf_example);
$ENV{'NDB_MGM'}= $exe_ndb_mgm;
$ENV{'NDB_BACKUP_DIR'}= $path_ndb_data_dir;
--- 1.27/mysql-test/t/disabled.def 2006-04-24 14:25:30 +02:00
+++ 1.28/mysql-test/t/disabled.def 2006-04-27 16:32:35 +02:00
@@ -12,4 +12,3 @@
sp-goto : GOTO is currently is disabled - will be fixed in the future
ndb_load : Bug#17233
-udf : Bug#18564
--- 1.2/mysql-test/include/have_udf.inc 2006-04-12 15:13:10 +02:00
+++ 1.3/mysql-test/include/have_udf.inc 2006-04-27 16:32:35 +02:00
@@ -6,3 +6,11 @@
disable_query_log;
show variables like "have_dynamic_loading";
enable_query_log;
+
+#
+# Check if the variable UDF_EXAMPLE_LIB is set
+#
+--require r/have_udf_example.require
+disable_query_log;
+eval select LENGTH("$UDF_EXAMPLE_LIB") > 0 as "have_udf_example_lib";
+enable_query_log;
--- 1.3/mysql-test/r/udf.result 2006-03-10 12:12:03 +01:00
+++ 1.4/mysql-test/r/udf.result 2006-04-27 16:32:35 +02:00
@@ -1,15 +1,15 @@
drop table if exists t1;
-CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so';
-CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so';
-CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME 'udf_example.so';
+CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
+CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
+CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
ERROR HY000: Can't find function 'myfunc_nonexist' in library
-CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so';
-CREATE FUNCTION sequence RETURNS INTEGER SONAME "udf_example.so";
-CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so';
+CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
+CREATE FUNCTION sequence RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
+CREATE FUNCTION lookup RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
CREATE FUNCTION reverse_lookup
-RETURNS STRING SONAME 'udf_example.so';
+RETURNS STRING SONAME "UDF_EXAMPLE_LIB";
CREATE AGGREGATE FUNCTION avgcost
-RETURNS REAL SONAME 'udf_example.so';
+RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
select myfunc_double();
ERROR HY000: myfunc_double must have at least one argument
select myfunc_double(1);
--- 1.3/mysql-test/t/udf.test 2006-03-10 12:12:03 +01:00
+++ 1.4/mysql-test/t/udf.test 2006-04-27 16:32:35 +02:00
@@ -14,18 +14,26 @@
# Create the example functions from udf_example
#
-CREATE FUNCTION metaphon RETURNS STRING SONAME 'udf_example.so';
-CREATE FUNCTION myfunc_double RETURNS REAL SONAME 'udf_example.so';
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
--error ER_CANT_FIND_DL_ENTRY
-CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME 'udf_example.so';
-CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME 'udf_example.so';
-CREATE FUNCTION sequence RETURNS INTEGER SONAME "udf_example.so";
-CREATE FUNCTION lookup RETURNS STRING SONAME 'udf_example.so';
-CREATE FUNCTION reverse_lookup
- RETURNS STRING SONAME 'udf_example.so';
-CREATE AGGREGATE FUNCTION avgcost
- RETURNS REAL SONAME 'udf_example.so';
+eval CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION lookup RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE FUNCTION reverse_lookup
+ RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
+--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
+eval CREATE AGGREGATE FUNCTION avgcost
+ RETURNS REAL SONAME "$UDF_EXAMPLE_LIB";
--error 0
select myfunc_double();
--- New file ---
+++ mysql-test/r/have_udf_example.require 06/04/27 16:32:36
have_udf_example_lib
1
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2192) | msvensson | 27 Apr |