From: Sergei Golubchik Date: June 14 2010 4:15pm Subject: Re: mtr patch to uniformly support all loadable plugins List-Archive: http://lists.mysql.com/internals/37942 Message-Id: <20100614161541.GA23052@janus.mylan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="mYCpIKhGyMATD0i+" --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Bjorn! On Jun 14, Bjorn Munch wrote: > Thank you very much, I will have a look at this. > > I'm getting a lot of failures trying to apply the patch to the tip of > the 5.1 development branch, what version has this been diff'ed > against? I've used mariadb-5.1 tree. Sorry, I didn't realize they're so different. I've attached a patch ported to mysql-5.1 pulled from launchpad few minutes ago (but I didn't test it much, I just started mtr, saw that plugins are symlinked, and that a couple of tests pass). Regards, Sergei --mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=aa removed: mysql-test/suite/rpl/t/rpl_plugin_load-master.opt mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt mysql-test/suite/rpl/t/rpl_udf-master.opt mysql-test/suite/rpl/t/rpl_udf-slave.opt mysql-test/t/fulltext_plugin-master.opt mysql-test/t/plugin-master.opt mysql-test/t/plugin_not_embedded-master.opt mysql-test/t/udf-master.opt modified: mysql-test/include/have_example_plugin.inc mysql-test/include/have_simple_parser.inc mysql-test/include/have_udf.inc mysql-test/include/rpl_udf.inc mysql-test/lib/My/File/Path.pm mysql-test/lib/mtr_cases.pm mysql-test/mysql-test-run.pl mysql-test/r/innodb_ignore_builtin.result mysql-test/t/bug46261-master.opt mysql-test/t/bug46261.test mysql-test/t/information_schema.test mysql-test/t/innodb_ignore_builtin.test mysql-test/t/plugin.test mysql-test/t/plugin_load-master.opt mysql-test/t/plugin_not_embedded.test mysql-test/t/udf.test === modified file 'mysql-test/include/have_example_plugin.inc' --- a/mysql-test/include/have_example_plugin.inc 2009-09-04 20:02:17 +0000 +++ b/mysql-test/include/have_example_plugin.inc 2010-06-14 15:27:59 +0000 @@ -5,9 +5,9 @@ --source include/have_dynamic_loading.inc # -# Check if the variable EXAMPLE_PLUGIN is set +# Check if the variable HA_EXAMPLE_SO is set # --require r/have_example_plugin.require disable_query_log; -eval select LENGTH('$EXAMPLE_PLUGIN') > 0 as 'have_example_plugin'; +eval select LENGTH('$HA_EXAMPLE_SO') > 0 as 'have_example_plugin'; enable_query_log; === modified file 'mysql-test/include/have_simple_parser.inc' --- a/mysql-test/include/have_simple_parser.inc 2009-09-04 20:02:17 +0000 +++ b/mysql-test/include/have_simple_parser.inc 2010-06-14 15:27:59 +0000 @@ -9,5 +9,5 @@ # --require r/have_simple_parser.require disable_query_log; -eval select LENGTH('$SIMPLE_PARSER') > 0 as 'have_simple_parser'; +eval select LENGTH('$MYPLUGLIB_SO') > 0 as 'have_simple_parser'; enable_query_log; === modified file 'mysql-test/include/have_udf.inc' --- a/mysql-test/include/have_udf.inc 2009-09-04 20:02:17 +0000 +++ b/mysql-test/include/have_udf.inc 2010-06-14 15:27:59 +0000 @@ -9,5 +9,5 @@ # --require r/have_udf_example.require disable_query_log; -eval select LENGTH('$UDF_EXAMPLE_LIB') > 0 as 'have_udf_example_lib'; +eval select LENGTH('$UDF_EXAMPLE_SO') > 0 as 'have_udf_example_lib'; enable_query_log; === modified file 'mysql-test/include/rpl_udf.inc' --- a/mysql-test/include/rpl_udf.inc 2007-08-29 21:36:08 +0000 +++ b/mysql-test/include/rpl_udf.inc 2010-06-14 15:27:59 +0000 @@ -27,13 +27,13 @@ --echo "*** Test 1) Test UDFs via loadable libraries *** --echo "Running on the master" --enable_info ---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 -eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB"; ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_SO"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB --error ER_CANT_FIND_DL_ENTRY -eval CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB"; +eval CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO"; --replace_column 3 UDF_LIB SELECT * FROM mysql.func ORDER BY name; --disable_info === modified file 'mysql-test/lib/My/File/Path.pm' --- a/mysql-test/lib/My/File/Path.pm 2009-04-01 14:23:10 +0000 +++ b/mysql-test/lib/My/File/Path.pm 2010-06-14 15:27:59 +0000 @@ -18,7 +18,7 @@ use Exporter; use base "Exporter"; -our @EXPORT= qw / rmtree mkpath copytree /; +our @EXPORT= qw /rmtree mkpath copytree/; use File::Find; use File::Copy; === modified file 'mysql-test/lib/mtr_cases.pm' --- a/mysql-test/lib/mtr_cases.pm 2010-04-19 09:44:05 +0000 +++ b/mysql-test/lib/mtr_cases.pm 2010-06-14 15:36:56 +0000 @@ -55,7 +55,7 @@ } use File::Basename; -use File::Spec::Functions qw / splitdir /; +use File::Spec::Functions qw /splitdir/; use IO::File(); use My::Config; use My::Platform; @@ -68,22 +68,9 @@ my $do_test_reg; my $skip_test_reg; -# Related to adding InnoDB plugin combinations -my $lib_innodb_plugin; - # If "Quick collect", set to 1 once a test to run has been found. my $some_test_found; -sub find_innodb_plugin { - $lib_innodb_plugin= - my_find_file($::basedir, - ["storage/innodb_plugin", "storage/innodb_plugin/.libs", - "lib/mysql/plugin", "lib/plugin"], - ["ha_innodb_plugin.dll", "ha_innodb_plugin.so", - "ha_innodb_plugin.sl"], - NOT_REQUIRED); -} - sub init_pattern { my ($from, $what)= @_; return undef unless defined $from; @@ -116,8 +103,6 @@ $do_test_reg= init_pattern($do_test, "--do-test"); $skip_test_reg= init_pattern($skip_test, "--skip-test"); - &find_innodb_plugin; - # If not reordering, we also shouldn't group by suites, unless # no test cases were named. # This also effects some logic in the loop following this. @@ -942,36 +927,6 @@ return $tinfo; } } - elsif ( $tinfo->{'innodb_plugin_test'} ) - { - # This is a test that needs the innodb plugin - if (!&find_innodb_plugin) - { - # innodb plugin is not supported, skip it - $tinfo->{'skip'}= 1; - $tinfo->{'comment'}= "No innodb plugin support"; - return $tinfo; - } - - my $sep= (IS_WINDOWS) ? ';' : ':'; - my $plugin_filename= basename($lib_innodb_plugin); - my $plugin_list= - "innodb=$plugin_filename$sep" . - "innodb_trx=$plugin_filename$sep" . - "innodb_locks=$plugin_filename$sep" . - "innodb_lock_waits=$plugin_filename$sep" . - "innodb_cmp=$plugin_filename$sep" . - "innodb_cmp_reset=$plugin_filename$sep" . - "innodb_cmpmem=$plugin_filename$sep" . - "innodb_cmpmem_reset=$plugin_filename"; - - foreach my $k ('master_opt', 'slave_opt') - { - push(@{$tinfo->{$k}}, '--ignore-builtin-innodb'); - push(@{$tinfo->{$k}}, '--plugin-dir=' . dirname($lib_innodb_plugin)); - push(@{$tinfo->{$k}}, "--plugin-load=$plugin_list"); - } - } else { push(@{$tinfo->{'master_opt'}}, "--loose-skip-innodb"); === modified file 'mysql-test/mysql-test-run.pl' --- a/mysql-test/mysql-test-run.pl 2010-02-17 15:28:02 +0000 +++ b/mysql-test/mysql-test-run.pl 2010-06-14 16:11:53 +0000 @@ -69,7 +69,7 @@ use File::Copy; use File::Find; use File::Temp qw/tempdir/; -use File::Spec::Functions qw/splitdir/; +use File::Spec::Functions qw/splitdir rel2abs/; use My::Platform; use My::SafeProcess; use My::ConfigFactory; @@ -106,6 +106,7 @@ our $default_vardir; our $opt_vardir; # Path to use for var/ dir +our $plugindir; my $path_vardir_trace; # unix formatted opt_vardir for trace files my $opt_tmpdir; # Path to use for tmp/ dir my $opt_tmpdir_pid; @@ -307,6 +308,26 @@ } } + print "vardir: $opt_vardir\n"; + initialize_servers(); + + mtr_report("Checking supported features..."); + if (using_extern()) + { + # Connect to the running mysqld and find out what it supports + collect_mysqld_features_from_running_server(); + } + else + { + # Run the mysqld to find out what features are available + collect_mysqld_features(); + } + check_ndbcluster_support(\%mysqld_variables); + check_ssl_support(\%mysqld_variables); + check_debug_support(\%mysqld_variables); + + executable_setup(); + mtr_report("Collecting tests..."); my $tests= collect_test_cases($opt_reorder, $opt_suites, \@opt_cases); @@ -324,9 +345,6 @@ unshift(@$tests, $tinfo); } - print "vardir: $opt_vardir\n"; - initialize_servers(); - ####################################################################### my $num_tests= @$tests; if ( $opt_parallel eq "auto" ) { @@ -975,6 +993,8 @@ $basedir= dirname($basedir); } + fix_vs_config_dir(); + # Look for the client binaries directory if ($path_client_bindir) { @@ -985,8 +1005,7 @@ { $path_client_bindir= mtr_path_exists("$basedir/client_release", "$basedir/client_debug", - vs_config_dirs('client', ''), - "$basedir/client", + "$basedir/client$opt_vs_config", "$basedir/bin"); } @@ -999,17 +1018,6 @@ my $path_share= dirname($path_language); $path_charsetsdir= mtr_path_exists("$path_share/charsets"); - if (using_extern()) - { - # Connect to the running mysqld and find out what it supports - collect_mysqld_features_from_running_server(); - } - else - { - # Run the mysqld to find out what features are available - collect_mysqld_features(); - } - if ( $opt_comment ) { mtr_report(); @@ -1226,7 +1234,7 @@ # Add the location for libmysqld.dll to the path. my $separator= ";"; my $lib_mysqld= - mtr_path_exists(vs_config_dirs('libmysqld','')); + mtr_path_exists("$basedir/libmysqld$opt_vs_config"); if ( IS_CYGWIN ) { $lib_mysqld= posix_path($lib_mysqld); @@ -1390,15 +1398,6 @@ mtr_report("Running valgrind with options \"", join(" ", @valgrind_args), "\""); } - - mtr_report("Checking supported features..."); - - check_ndbcluster_support(\%mysqld_variables); - check_ssl_support(\%mysqld_variables); - check_debug_support(\%mysqld_variables); - - executable_setup(); - } @@ -1464,14 +1463,6 @@ sub collect_mysqld_features { my $found_variable_list_start= 0; - my $use_tmpdir; - if ( defined $opt_tmpdir and -d $opt_tmpdir){ - # Create the tempdir in $opt_tmpdir - $use_tmpdir= $opt_tmpdir; - } - my $tmpdir= tempdir(CLEANUP => 0, # Directory removed by this function - DIR => $use_tmpdir); - # # Execute "mysqld --no-defaults --help --verbose" to get a # list of all features and settings @@ -1484,9 +1475,11 @@ my $args; mtr_init_args(\$args); mtr_add_arg($args, "--no-defaults"); - mtr_add_arg($args, "--datadir=%s", mixed_path($tmpdir)); + mtr_add_arg($args, "--basedir=%s/tmp", $basedir); + mtr_add_arg($args, "--datadir=%s/tmp", $opt_vardir); mtr_add_arg($args, "--language=%s", $path_language); mtr_add_arg($args, "--skip-grant-tables"); + mtr_add_arg($args, $_) for (@opt_extra_mysqld_opt); mtr_add_arg($args, "--verbose"); mtr_add_arg($args, "--help"); @@ -1553,7 +1546,6 @@ } } } - rmtree($tmpdir); mtr_error("Could not find version of MySQL") unless $mysql_version_id; mtr_error("Could not find variabes list") unless $found_variable_list_start; @@ -1670,8 +1662,7 @@ if ( $opt_embedded_server ) { $exe_mysqltest= - mtr_exe_exists(vs_config_dirs('libmysqld/examples','mysqltest_embedded'), - "$basedir/libmysqld/examples/mysqltest_embedded", + mtr_exe_exists("$basedir/libmysqld/examples$opt_vs_config/mysqltest_embedded", "$path_client_bindir/mysqltest_embedded"); } else @@ -1768,12 +1759,10 @@ # mysql_client_test executable may _not_ exist if ( $opt_embedded_server ) { $exe= mtr_exe_maybe_exists( - vs_config_dirs('libmysqld/examples','mysql_client_test_embedded'), - "$basedir/libmysqld/examples/mysql_client_test_embedded", + "$basedir/libmysqld/examples$opt_vs_config/mysql_client_test_embedded", "$basedir/bin/mysql_client_test_embedded"); } else { - $exe= mtr_exe_maybe_exists(vs_config_dirs('tests', 'mysql_client_test'), - "$basedir/tests/mysql_client_test", + $exe= mtr_exe_maybe_exists("$basedir/tests$opt_vs_config/mysql_client_test", "$basedir/bin/mysql_client_test"); } @@ -1831,61 +1820,6 @@ } # -------------------------------------------------------------------------- - # Add the path where mysqld will find udf_example.so - # -------------------------------------------------------------------------- - my $lib_udf_example= - mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'), - "$basedir/sql/.libs/udf_example.so",); - - if ( $lib_udf_example ) - { - push(@ld_library_paths, dirname($lib_udf_example)); - } - - $ENV{'UDF_EXAMPLE_LIB'}= - ($lib_udf_example ? basename($lib_udf_example) : ""); - $ENV{'UDF_EXAMPLE_LIB_OPT'}= "--plugin-dir=". - ($lib_udf_example ? dirname($lib_udf_example) : ""); - - # -------------------------------------------------------------------------- - # Add the path where mysqld will find ha_example.so - # -------------------------------------------------------------------------- - if ($mysql_version_id >= 50100) { - my $plugin_filename; - if (IS_WINDOWS) - { - $plugin_filename = "ha_example.dll"; - } - else - { - $plugin_filename = "ha_example.so"; - } - my $lib_example_plugin= - mtr_file_exists(vs_config_dirs('storage/example',$plugin_filename), - "$basedir/storage/example/.libs/".$plugin_filename, - "$basedir/lib/mysql/plugin/".$plugin_filename); - $ENV{'EXAMPLE_PLUGIN'}= - ($lib_example_plugin ? basename($lib_example_plugin) : ""); - $ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=". - ($lib_example_plugin ? dirname($lib_example_plugin) : ""); - - $ENV{'HA_EXAMPLE_SO'}="'".$plugin_filename."'"; - $ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=EXAMPLE=".$plugin_filename; - } - - # ---------------------------------------------------- - # Add the path where mysqld will find mypluglib.so - # ---------------------------------------------------- - my $lib_simple_parser= - mtr_file_exists(vs_config_dirs('plugin/fulltext', 'mypluglib.dll'), - "$basedir/plugin/fulltext/.libs/mypluglib.so",); - - $ENV{'SIMPLE_PARSER'}= - ($lib_simple_parser ? basename($lib_simple_parser) : ""); - $ENV{'SIMPLE_PARSER_OPT'}= "--plugin-dir=". - ($lib_simple_parser ? dirname($lib_simple_parser) : ""); - - # -------------------------------------------------------------------------- # Valgrind need to be run with debug libraries otherwise it's almost # impossible to add correct supressions, that means if "/usr/lib/debug" # is available, it should be added to @@ -2001,8 +1935,7 @@ # some versions, test using it should be skipped # ---------------------------------------------------- my $exe_bug25714= - mtr_exe_maybe_exists(vs_config_dirs('tests', 'bug25714'), - "$basedir/tests/bug25714"); + mtr_exe_maybe_exists("$basedir/tests$opt_vs_config/bug25714"); $ENV{'MYSQL_BUG25714'}= native_path($exe_bug25714); # ---------------------------------------------------- @@ -2018,32 +1951,26 @@ # my_print_defaults # ---------------------------------------------------- my $exe_my_print_defaults= - mtr_exe_exists(vs_config_dirs('extra', 'my_print_defaults'), - "$path_client_bindir/my_print_defaults", - "$basedir/extra/my_print_defaults"); + mtr_exe_exists("$path_client_bindir/my_print_defaults", + "$basedir/extra$opt_vs_config/my_print_defaults"); $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= native_path($exe_my_print_defaults); # ---------------------------------------------------- # Setup env so childs can execute myisampack and myisamchk # ---------------------------------------------------- $ENV{'MYISAMCHK'}= native_path(mtr_exe_exists( - vs_config_dirs('storage/myisam', 'myisamchk'), - vs_config_dirs('myisam', 'myisamchk'), "$path_client_bindir/myisamchk", - "$basedir/storage/myisam/myisamchk", + "$basedir/storage/myisam$opt_vs_config/myisamchk", "$basedir/myisam/myisamchk")); $ENV{'MYISAMPACK'}= native_path(mtr_exe_exists( - vs_config_dirs('storage/myisam', 'myisampack'), - vs_config_dirs('myisam', 'myisampack'), "$path_client_bindir/myisampack", - "$basedir/storage/myisam/myisampack", + "$basedir/storage/myisam$opt_vs_config/myisampack", "$basedir/myisam/myisampack")); # ---------------------------------------------------- # perror # ---------------------------------------------------- - my $exe_perror= mtr_exe_exists(vs_config_dirs('extra', 'perror'), - "$basedir/extra/perror", + my $exe_perror= mtr_exe_exists("$basedir/extra$opt_vs_config/perror", "$path_client_bindir/perror"); $ENV{'MY_PERROR'}= native_path($exe_perror); @@ -2142,7 +2069,11 @@ rmtree("$opt_tmpdir/"); } - +sub set_plugin_var($) { + local $_ = $_[0]; + s/\.\w+$//; + $ENV{"\U${_}_SO"} = $_[0]; +} # # Create var and the directories needed in var @@ -2207,6 +2138,44 @@ # and make them world readable copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022"); + # create a plugin dir and copy plugins into it + if ($source_dist) + { + $plugindir="$opt_vardir/plugins"; + unshift (@opt_extra_mysqld_opt, "--plugin-dir=$plugindir"); + mkpath($plugindir); + if (IS_WINDOWS) + { + for (<../storage/*$opt_vs_config/*.dll>, + <../plugin/*$opt_vs_config/*.dll>, + <../sql$opt_vs_config/*.dll>) + { + my $pname=basename($_); + copy rel2abs($_), "$plugindir/$pname"; + set_plugin_var($pname); + } + } + else + { + for (<../storage/*/.libs/*.so>,<../plugin/*/.libs/*.so>,<../sql/.libs/*.so>) + { + my $pname=basename($_); + symlink rel2abs($_), "$plugindir/$pname"; + set_plugin_var($pname); + } + } + } + else + { + # hm, what paths work for debs and for rpms ? + for (<$basedir/lib/mysql/plugin/*.so>, + <$basedir/lib/plugin/*.dll>) + { + my $pname=basename($_); + set_plugin_var($pname); + } + } + # Remove old log files foreach my $name (glob("r/*.progress r/*.log r/*.warnings")) { @@ -2297,29 +2266,36 @@ # -# Helper function to handle configuration-based subdirectories which Visual -# Studio uses for storing binaries. If opt_vs_config is set, this returns -# a path based on that setting; if not, it returns paths for the default -# /release/ and /debug/ subdirectories. -# -# $exe can be undefined, if the directory itself will be used -# -sub vs_config_dirs ($$) { - my ($path_part, $exe) = @_; - - $exe = "" if not defined $exe; - - # Don't look in these dirs when not on windows - return () unless IS_WINDOWS; - - if ($opt_vs_config) +# Helper function to find the correct value for the opt_vs_config +# if it was not set explicitly. +# +# the configuration with the most recent build dir in sql/ is selected. +# +# note: looking for all BuildLog.htm files everywhere in the tree with the +# help of File::Find would be possibly more precise, but it is also +# many times slower. Thus we are only looking at the server, client +# executables, and plugins - that is, something that can affect the test suite +# +sub fix_vs_config_dir () { + return $opt_vs_config="" unless IS_WINDOWS; + return $opt_vs_config="/$opt_vs_config" if $opt_vs_config; + + my $modified = 1e30; + $opt_vs_config=""; + + for my $dir (qw(client/*.dir libmysql/libmysql.dir sql/mysqld.dir + sql/udf_example.dir storage/*/*.dir plugin/*/*.dir)) { + for (<$basedir/$dir/*/BuildLog.htm>) { + if (-M $_ < $modified) { - return ("$basedir/$path_part/$opt_vs_config/$exe"); + $modified = -M _; + $opt_vs_config = basename(dirname($_)); + } + } } - return ("$basedir/$path_part/release/$exe", - "$basedir/$path_part/relwithdebinfo/$exe", - "$basedir/$path_part/debug/$exe"); + mtr_report("VS config: $opt_vs_config"); + $opt_vs_config="/$opt_vs_config" if $opt_vs_config; } === modified file 'mysql-test/r/innodb_ignore_builtin.result' --- a/mysql-test/r/innodb_ignore_builtin.result 2009-02-09 15:03:52 +0000 +++ b/mysql-test/r/innodb_ignore_builtin.result 2010-06-14 15:27:59 +0000 @@ -2,8 +2,5 @@ Variable_name Value ignore_builtin_innodb ON select PLUGIN_NAME from information_schema.plugins -where PLUGIN_NAME = "InnoDb"; +where PLUGIN_NAME = "InnoDb" and PLUGIN_LIBRARY IS NULL; PLUGIN_NAME -select ENGINE from information_schema.engines -where ENGINE = "InnoDB"; -ENGINE === removed file 'mysql-test/suite/rpl/t/rpl_plugin_load-master.opt' --- a/mysql-test/suite/rpl/t/rpl_plugin_load-master.opt 2008-08-19 15:35:56 +0000 +++ b/mysql-test/suite/rpl/t/rpl_plugin_load-master.opt 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -$EXAMPLE_PLUGIN_OPT === removed file 'mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt' --- a/mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt 2008-08-19 15:35:56 +0000 +++ b/mysql-test/suite/rpl/t/rpl_plugin_load-slave.opt 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -$EXAMPLE_PLUGIN_OPT === removed file 'mysql-test/suite/rpl/t/rpl_udf-master.opt' --- a/mysql-test/suite/rpl/t/rpl_udf-master.opt 2007-06-27 12:28:02 +0000 +++ b/mysql-test/suite/rpl/t/rpl_udf-master.opt 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -$UDF_EXAMPLE_LIB_OPT === removed file 'mysql-test/suite/rpl/t/rpl_udf-slave.opt' --- a/mysql-test/suite/rpl/t/rpl_udf-slave.opt 2007-06-27 12:28:02 +0000 +++ b/mysql-test/suite/rpl/t/rpl_udf-slave.opt 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -$UDF_EXAMPLE_LIB_OPT === modified file 'mysql-test/t/bug46261-master.opt' --- a/mysql-test/t/bug46261-master.opt 2010-04-22 13:52:00 +0000 +++ b/mysql-test/t/bug46261-master.opt 2010-06-14 15:28:30 +0000 @@ -1,1 +1,1 @@ ---skip-grant-tables $EXAMPLE_PLUGIN_OPT +--skip-grant-tables === modified file 'mysql-test/t/bug46261.test' --- a/mysql-test/t/bug46261.test 2010-04-22 13:52:00 +0000 +++ b/mysql-test/t/bug46261.test 2010-06-14 15:28:30 +0000 @@ -7,7 +7,7 @@ --replace_regex /\.dll/.so/ --error ER_OPTION_PREVENTS_STATEMENT -eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO; +eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO'; --replace_regex /\.dll/.so/ --error ER_OPTION_PREVENTS_STATEMENT === removed file 'mysql-test/t/fulltext_plugin-master.opt' --- a/mysql-test/t/fulltext_plugin-master.opt 2008-12-17 13:24:34 +0000 +++ b/mysql-test/t/fulltext_plugin-master.opt 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -$SIMPLE_PARSER_OPT === modified file 'mysql-test/t/information_schema.test' --- a/mysql-test/t/information_schema.test 2010-01-21 15:14:10 +0000 +++ b/mysql-test/t/information_schema.test 2010-06-14 15:33:06 +0000 @@ -527,6 +527,7 @@ grant select on test.* to mysqltest_4@localhost; connect (user10261,localhost,mysqltest_4,,); connection user10261; +--sorted_result SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS where COLUMN_NAME='TABLE_NAME'; connection default; === modified file 'mysql-test/t/innodb_ignore_builtin.test' --- a/mysql-test/t/innodb_ignore_builtin.test 2009-02-09 15:03:52 +0000 +++ b/mysql-test/t/innodb_ignore_builtin.test 2010-06-14 15:28:30 +0000 @@ -3,6 +3,4 @@ # show variables like 'ignore_builtin_innodb'; select PLUGIN_NAME from information_schema.plugins -where PLUGIN_NAME = "InnoDb"; -select ENGINE from information_schema.engines -where ENGINE = "InnoDB"; +where PLUGIN_NAME = "InnoDb" and PLUGIN_LIBRARY IS NULL; === removed file 'mysql-test/t/plugin-master.opt' --- a/mysql-test/t/plugin-master.opt 2007-05-18 11:23:46 +0000 +++ b/mysql-test/t/plugin-master.opt 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -$EXAMPLE_PLUGIN_OPT === modified file 'mysql-test/t/plugin.test' --- a/mysql-test/t/plugin.test 2009-10-08 08:39:15 +0000 +++ b/mysql-test/t/plugin.test 2010-06-14 15:28:43 +0000 @@ -5,15 +5,15 @@ DROP TABLE t1; --replace_regex /\.dll/.so/ -eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO; +eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO'; --replace_regex /\.dll/.so/ --error 1125 -eval INSTALL PLUGIN EXAMPLE SONAME $HA_EXAMPLE_SO; +eval INSTALL PLUGIN EXAMPLE SONAME '$HA_EXAMPLE_SO'; UNINSTALL PLUGIN example; --replace_regex /\.dll/.so/ -eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO; +eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO'; CREATE TABLE t1(a int) ENGINE=EXAMPLE; @@ -35,7 +35,7 @@ --echo # to impossible int val --echo # --replace_regex /\.dll/.so/ -eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO; +eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO'; SET GLOBAL example_enum_var= e1; SET GLOBAL example_enum_var= e2; @@ -50,7 +50,7 @@ # Bug #32757 hang with sql_mode set when setting some global variables # --replace_regex /\.dll/.so/ -eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO; +eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO'; select @@session.sql_mode into @old_sql_mode; === modified file 'mysql-test/t/plugin_load-master.opt' --- a/mysql-test/t/plugin_load-master.opt 2009-06-10 08:59:49 +0000 +++ b/mysql-test/t/plugin_load-master.opt 2010-06-14 15:28:43 +0000 @@ -1,3 +1,2 @@ -$EXAMPLE_PLUGIN_OPT -$EXAMPLE_PLUGIN_LOAD +--plugin-load=EXAMPLE=$HA_EXAMPLE_SO --loose-plugin-example-enum-var=e2 === removed file 'mysql-test/t/plugin_not_embedded-master.opt' --- a/mysql-test/t/plugin_not_embedded-master.opt 2010-03-09 12:16:17 +0000 +++ b/mysql-test/t/plugin_not_embedded-master.opt 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -$EXAMPLE_PLUGIN_OPT === modified file 'mysql-test/t/plugin_not_embedded.test' --- a/mysql-test/t/plugin_not_embedded.test 2010-03-14 11:16:59 +0000 +++ b/mysql-test/t/plugin_not_embedded.test 2010-06-14 15:28:43 +0000 @@ -8,7 +8,7 @@ GRANT INSERT ON mysql.plugin TO bug51770@localhost; connect(con1,localhost,bug51770,,); --replace_regex /\.dll/.so/ -eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO; +eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO'; --error ER_TABLEACCESS_DENIED_ERROR UNINSTALL PLUGIN example; connection default; === removed file 'mysql-test/t/udf-master.opt' --- a/mysql-test/t/udf-master.opt 2007-05-18 11:23:46 +0000 +++ b/mysql-test/t/udf-master.opt 1970-01-01 00:00:00 +0000 @@ -1,1 +0,0 @@ -$UDF_EXAMPLE_LIB_OPT === modified file 'mysql-test/t/udf.test' --- a/mysql-test/t/udf.test 2010-03-18 10:26:27 +0000 +++ b/mysql-test/t/udf.test 2010-06-14 15:28:43 +0000 @@ -14,26 +14,26 @@ # Create the example functions from udf_example # ---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_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_SO"; ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB --error ER_CANT_FIND_DL_ENTRY -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 myfunc_nonexist RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION lookup RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB eval CREATE FUNCTION reverse_lookup - RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB + RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB eval CREATE AGGREGATE FUNCTION avgcost - RETURNS REAL SONAME "$UDF_EXAMPLE_LIB"; + RETURNS REAL SONAME "$UDF_EXAMPLE_SO"; --error ER_CANT_INITIALIZE_UDF select myfunc_double(); @@ -210,14 +210,14 @@ return 0; # this currently passes, and eclipse the stored function ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB -eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; - -DROP FUNCTION metaphon; -DROP FUNCTION metaphon; - ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB -eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; + +DROP FUNCTION metaphon; +DROP FUNCTION metaphon; + +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; --error ER_UDF_EXISTS CREATE FUNCTION metaphon(a int) RETURNS int @@ -248,8 +248,8 @@ # the UDF # select * from mysql.func; ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB -eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; select IS_const(3); @@ -263,8 +263,8 @@ # # Bug#18761: constant expression as UDF parameters not passed in as constant # ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB -eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; select is_const(3) as const, @@ -303,14 +303,14 @@ # Bug #25382: Passing NULL to an UDF called from stored procedures # crashes server # ---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 -eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; + +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_SO"; + +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO"; delimiter //; create function f1(p1 varchar(255)) @@ -377,8 +377,8 @@ CREATE DATABASE mysqltest; USE mysqltest; DROP DATABASE mysqltest; ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB -eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO"; DROP FUNCTION metaphon; USE test; @@ -406,8 +406,8 @@ END | DELIMITER ;| ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB -eval CREATE FUNCTION check_const_len RETURNS string SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION check_const_len RETURNS string SONAME "$UDF_EXAMPLE_SO"; CALL check_const_len_sp("foo"); @@ -423,8 +423,8 @@ # Bug #30355: Incorrect ordering of UDF results # ---replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB -eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB"; +--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB +eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO"; CREATE TABLE t1 (a INT); CREATE TABLE t2 (a INT PRIMARY KEY); INSERT INTO t1 VALUES (4),(3),(2),(1); --mYCpIKhGyMATD0i+--