List:Internals« Previous MessageNext Message »
From:Magnus Svensson Date:March 21 2007 8:40am
Subject:Re: Running mysql-test on pluggable engines?
View as plain text  
Marko Mäkelä wrote:
> I had to patch mysql-test a little to make it test InnoDB configured
> as a dynamic plugin.  The attached patch is quick and dirty, but I
> hope it is a useful starting point for whoever is going to make
> mysql-test support dynamic plugins.
> 
> 	Marko
> 

Hi Marko,

I'll have a look to see how we should support this in mysql-test-run.pl

Best regards
Magnus

> 
> ------------------------------------------------------------------------
> 
> diff -rpu mysql-5.1-bk2/mysql-test/lib/mtr_cases.pl
> mysql-5.1-bk/mysql-test/lib/mtr_cases.pl
> --- mysql-5.1-bk2/mysql-test/lib/mtr_cases.pl	2007-01-18 17:33:29.000000000 +0200
> +++ mysql-5.1-bk/mysql-test/lib/mtr_cases.pl	2007-03-20 16:08:31.000000000 +0200
> @@ -566,7 +566,7 @@ sub collect_one_test_case($$$$$$$) {
>        }
>      }
>  
> -    if ( $tinfo->{'innodb_test'} )
> +    if ( 0 && $tinfo->{'innodb_test'} )
>      {
>        # This is a test that need innodb
>        if ( $::mysqld_variables{'innodb'} eq "FALSE" )
> diff -rpu mysql-5.1-bk2/mysql-test/mysql-test-run.pl
> mysql-5.1-bk/mysql-test/mysql-test-run.pl
> --- mysql-5.1-bk2/mysql-test/mysql-test-run.pl	2007-03-08 15:56:05.000000000 +0200
> +++ mysql-5.1-bk/mysql-test/mysql-test-run.pl	2007-03-20 16:09:04.000000000 +0200
> @@ -161,6 +161,7 @@ our $exe_my_print_defaults;
>  our $exe_perror;
>  our $lib_udf_example;
>  our $lib_example_plugin;
> +our $lib_innodb_plugin;
>  our $exe_libtool;
>  
>  our $opt_bench= 0;
> @@ -1555,6 +1556,11 @@ sub executable_setup () {
>        mtr_file_exists(vs_config_dirs('storage/example', 'ha_example.dll'),
>                        "$glob_basedir/storage/example/.libs/ha_example.so",);
>  
> +    # Look for the ha_innodb library
> +    $lib_innodb_plugin=
> +      mtr_file_exists(vs_config_dirs('storage/innobase', 'ha_innodb.dll'),
> +                      "$glob_basedir/storage/innobase/.libs/ha_innodb.so",);
> +
>    }
>  
>    # Look for mysqltest executable
> @@ -1722,6 +1728,14 @@ sub environment_setup () {
>    }
>  
>    # --------------------------------------------------------------------------
> +  # Add the path where mysqld will find ha_innodb.so
> +  # --------------------------------------------------------------------------
> +  if ( $lib_innodb_plugin )
> +  {
> +    push(@ld_library_paths, dirname($lib_innodb_plugin));
> +  }
> +
> +  # --------------------------------------------------------------------------
>    # 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
> @@ -2011,6 +2025,12 @@ sub environment_setup () {
>      ($lib_example_plugin ? basename($lib_example_plugin) : "");
>  
>    # ----------------------------------------------------
> +  # Add the path where mysqld will find ha_innodb.so
> +  # ----------------------------------------------------
> +  $ENV{'INNODB_PLUGIN'}=
> +    ($lib_innodb_plugin ? basename($lib_innodb_plugin) : "");
> +
> +  # ----------------------------------------------------
>    # We are nice and report a bit about our settings
>    # ----------------------------------------------------
>    if (!$opt_extern)
> @@ -2929,6 +2949,7 @@ sub install_db ($$) {
>    mtr_add_arg($args, "--skip-ndbcluster");
>    mtr_add_arg($args, "--tmpdir=.");
>    mtr_add_arg($args, "--core-file");
> +  mtr_add_arg($args, "--plugin_dir=%s", dirname($lib_innodb_plugin));
>  
>    if ( $opt_debug )
>    {
> @@ -2983,6 +3004,8 @@ sub install_db ($$) {
>    # building the source dist
>    mtr_appendfile_to_file("$path_sql_dir/fill_help_tables.sql",
>  			 $bootstrap_sql_file);
> +  mtr_tofile($bootstrap_sql_file,
> +	     "install plugin innodb soname 'ha_innodb.so';");
>  
>    # Log bootstrap command
>    my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
> @@ -3679,6 +3702,8 @@ sub mysqld_arguments ($$$$$) {
>      }
>    }
>  
> +  mtr_add_arg($args, "%s--plugin_dir=%s", $prefix,
> +	      dirname($lib_innodb_plugin));
>    # Check if "extra_opt" contains --skip-log-bin
>    my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt);
>  
> @@ -3735,9 +3760,6 @@ sub mysqld_arguments ($$$$$) {
>        # Turn on logging, will be sent to tables
>        mtr_add_arg($args, "%s--log=", $prefix);
>      }
> -
> -      mtr_add_arg($args, "%s--plugin_dir=%s", $prefix,
> -		  dirname($lib_example_plugin));
>    }
>  
>    if ( $type eq 'slave' )
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 


-- 
Magnus Svensson, Software Engineer
MySQL AB, www.mysql.com
Mobile: +46709164491
Thread
Running mysql-test on pluggable engines?Marko Mäkelä20 Mar
  • Re: Running mysql-test on pluggable engines?Magnus Svensson21 Mar
    • Re: Running mysql-test on pluggable engines?Marko Mäkelä21 Mar
      • Re: Running mysql-test on pluggable engines?Sergei Golubchik21 Mar
      • Re: Running mysql-test on pluggable engines?Magnus Svensson21 Mar