fixed for mysql-test-run to
* fully support --mysqld=--plugin-load=xxxx * uniformly support all loadable plugins, no need to hard-code every new plugin in mtr * autodetect MTR_VS_CONFIG on windows
This commit is contained in:
parent
14e53d0668
commit
e96885de92
@ -5,9 +5,9 @@
|
|||||||
--source include/have_dynamic_loading.inc
|
--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
|
--require r/have_example_plugin.require
|
||||||
disable_query_log;
|
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;
|
enable_query_log;
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
#
|
#
|
||||||
--require r/have_simple_parser.require
|
--require r/have_simple_parser.require
|
||||||
disable_query_log;
|
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;
|
enable_query_log;
|
||||||
|
@ -9,5 +9,5 @@
|
|||||||
#
|
#
|
||||||
--require r/have_udf_example.require
|
--require r/have_udf_example.require
|
||||||
disable_query_log;
|
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;
|
enable_query_log;
|
||||||
|
@ -27,13 +27,13 @@ drop table if exists t1;
|
|||||||
--echo "*** Test 1) Test UDFs via loadable libraries ***
|
--echo "*** Test 1) Test UDFs via loadable libraries ***
|
||||||
--echo "Running on the master"
|
--echo "Running on the master"
|
||||||
--enable_info
|
--enable_info
|
||||||
--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_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
|
||||||
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION myfunc_int RETURNS INTEGER 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
|
--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
|
--replace_column 3 UDF_LIB
|
||||||
SELECT * FROM mysql.func ORDER BY name;
|
SELECT * FROM mysql.func ORDER BY name;
|
||||||
--disable_info
|
--disable_info
|
||||||
|
@ -18,7 +18,7 @@ use strict;
|
|||||||
|
|
||||||
use Exporter;
|
use Exporter;
|
||||||
use base "Exporter";
|
use base "Exporter";
|
||||||
our @EXPORT= qw / rmtree mkpath copytree /;
|
our @EXPORT= qw /rmtree mkpath copytree/;
|
||||||
|
|
||||||
use File::Find;
|
use File::Find;
|
||||||
use File::Copy;
|
use File::Copy;
|
||||||
|
@ -55,7 +55,7 @@ sub collect_option {
|
|||||||
}
|
}
|
||||||
|
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use File::Spec::Functions qw / splitdir /;
|
use File::Spec::Functions qw /splitdir/;
|
||||||
use IO::File();
|
use IO::File();
|
||||||
use My::Config;
|
use My::Config;
|
||||||
use My::Platform;
|
use My::Platform;
|
||||||
@ -68,22 +68,9 @@ require "mtr_misc.pl";
|
|||||||
my $do_test_reg;
|
my $do_test_reg;
|
||||||
my $skip_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.
|
# If "Quick collect", set to 1 once a test to run has been found.
|
||||||
my $some_test_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/mariadb/plugin", "lib/plugin"],
|
|
||||||
["ha_innodb_plugin.dll", "ha_innodb_plugin.so",
|
|
||||||
"ha_innodb_plugin.sl"],
|
|
||||||
NOT_REQUIRED);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub init_pattern {
|
sub init_pattern {
|
||||||
my ($from, $what)= @_;
|
my ($from, $what)= @_;
|
||||||
return undef unless defined $from;
|
return undef unless defined $from;
|
||||||
@ -116,8 +103,6 @@ sub collect_test_cases ($$$) {
|
|||||||
$do_test_reg= init_pattern($do_test, "--do-test");
|
$do_test_reg= init_pattern($do_test, "--do-test");
|
||||||
$skip_test_reg= init_pattern($skip_test, "--skip-test");
|
$skip_test_reg= init_pattern($skip_test, "--skip-test");
|
||||||
|
|
||||||
&find_innodb_plugin;
|
|
||||||
|
|
||||||
# If not reordering, we also shouldn't group by suites, unless
|
# If not reordering, we also shouldn't group by suites, unless
|
||||||
# no test cases were named.
|
# no test cases were named.
|
||||||
# This also effects some logic in the loop following this.
|
# This also effects some logic in the loop following this.
|
||||||
@ -966,36 +951,6 @@ sub collect_one_test_case {
|
|||||||
return $tinfo;
|
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
|
else
|
||||||
{
|
{
|
||||||
push(@{$tinfo->{'master_opt'}}, "--loose-skip-innodb");
|
push(@{$tinfo->{'master_opt'}}, "--loose-skip-innodb");
|
||||||
@ -1113,7 +1068,7 @@ sub collect_one_test_case {
|
|||||||
|
|
||||||
if ( $tinfo->{'example_plugin_test'} )
|
if ( $tinfo->{'example_plugin_test'} )
|
||||||
{
|
{
|
||||||
if ( !$ENV{'EXAMPLE_PLUGIN'} )
|
if ( !$ENV{'HA_EXAMPLE_SO'} )
|
||||||
{
|
{
|
||||||
$tinfo->{'skip'}= 1;
|
$tinfo->{'skip'}= 1;
|
||||||
$tinfo->{'comment'}= "Test requires the 'example' plugin";
|
$tinfo->{'comment'}= "Test requires the 'example' plugin";
|
||||||
@ -1165,7 +1120,7 @@ my @tags=
|
|||||||
|
|
||||||
["include/have_innodb.inc", "innodb_test", 1],
|
["include/have_innodb.inc", "innodb_test", 1],
|
||||||
["include/have_pbxt.inc", "pbxt_test", 1],
|
["include/have_pbxt.inc", "pbxt_test", 1],
|
||||||
["include/have_innodb_plugin.inc", "innodb_plugin_test", 1],
|
["include/have_innodb_plugin.inc", "innodb_test", 1],
|
||||||
["include/big_test.inc", "big_test", 1],
|
["include/big_test.inc", "big_test", 1],
|
||||||
["include/have_debug.inc", "need_debug", 1],
|
["include/have_debug.inc", "need_debug", 1],
|
||||||
["include/have_ndb.inc", "ndb_test", 1],
|
["include/have_ndb.inc", "ndb_test", 1],
|
||||||
|
@ -69,7 +69,7 @@ use File::Basename;
|
|||||||
use File::Copy;
|
use File::Copy;
|
||||||
use File::Find;
|
use File::Find;
|
||||||
use File::Temp qw/tempdir/;
|
use File::Temp qw/tempdir/;
|
||||||
use File::Spec::Functions qw/splitdir/;
|
use File::Spec::Functions qw/splitdir rel2abs/;
|
||||||
use My::Platform;
|
use My::Platform;
|
||||||
use My::SafeProcess;
|
use My::SafeProcess;
|
||||||
use My::ConfigFactory;
|
use My::ConfigFactory;
|
||||||
@ -106,6 +106,7 @@ our $path_testlog;
|
|||||||
|
|
||||||
our $default_vardir;
|
our $default_vardir;
|
||||||
our $opt_vardir; # Path to use for var/ dir
|
our $opt_vardir; # Path to use for var/ dir
|
||||||
|
our $plugindir;
|
||||||
my $path_vardir_trace; # unix formatted opt_vardir for trace files
|
my $path_vardir_trace; # unix formatted opt_vardir for trace files
|
||||||
my $opt_tmpdir; # Path to use for tmp/ dir
|
my $opt_tmpdir; # Path to use for tmp/ dir
|
||||||
my $opt_tmpdir_pid;
|
my $opt_tmpdir_pid;
|
||||||
@ -315,8 +316,25 @@ sub main {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Check for plugin availability so we know whether to skip tests or not.
|
print "vardir: $opt_vardir\n";
|
||||||
detect_plugins();
|
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...");
|
mtr_report("Collecting tests...");
|
||||||
my $tests= collect_test_cases($opt_reorder, $opt_suites, \@opt_cases);
|
my $tests= collect_test_cases($opt_reorder, $opt_suites, \@opt_cases);
|
||||||
@ -335,9 +353,6 @@ sub main {
|
|||||||
unshift(@$tests, $tinfo);
|
unshift(@$tests, $tinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
print "vardir: $opt_vardir\n";
|
|
||||||
initialize_servers();
|
|
||||||
|
|
||||||
#######################################################################
|
#######################################################################
|
||||||
my $num_tests= @$tests;
|
my $num_tests= @$tests;
|
||||||
if ( $opt_parallel eq "auto" ) {
|
if ( $opt_parallel eq "auto" ) {
|
||||||
@ -1031,6 +1046,8 @@ sub command_line_setup {
|
|||||||
$basedir= dirname($basedir);
|
$basedir= dirname($basedir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fix_vs_config_dir();
|
||||||
|
|
||||||
# Look for the client binaries directory
|
# Look for the client binaries directory
|
||||||
if ($path_client_bindir)
|
if ($path_client_bindir)
|
||||||
{
|
{
|
||||||
@ -1041,7 +1058,7 @@ sub command_line_setup {
|
|||||||
{
|
{
|
||||||
$path_client_bindir= mtr_path_exists("$basedir/client_release",
|
$path_client_bindir= mtr_path_exists("$basedir/client_release",
|
||||||
"$basedir/client_debug",
|
"$basedir/client_debug",
|
||||||
vs_config_dirs('client', ''),
|
"$basedir/client$opt_vs_config",
|
||||||
"$basedir/client",
|
"$basedir/client",
|
||||||
"$basedir/bin");
|
"$basedir/bin");
|
||||||
}
|
}
|
||||||
@ -1055,17 +1072,6 @@ sub command_line_setup {
|
|||||||
my $path_share= dirname($path_language);
|
my $path_share= dirname($path_language);
|
||||||
$path_charsetsdir= mtr_path_exists("$path_share/charsets");
|
$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 )
|
if ( $opt_comment )
|
||||||
{
|
{
|
||||||
mtr_report();
|
mtr_report();
|
||||||
@ -1288,7 +1294,7 @@ sub command_line_setup {
|
|||||||
# Add the location for libmysqld.dll to the path.
|
# Add the location for libmysqld.dll to the path.
|
||||||
my $separator= ";";
|
my $separator= ";";
|
||||||
my $lib_mysqld=
|
my $lib_mysqld=
|
||||||
mtr_path_exists(vs_config_dirs('libmysqld',''));
|
mtr_path_exists("$basedir/libmysqld$opt_vs_config");
|
||||||
if ( IS_CYGWIN )
|
if ( IS_CYGWIN )
|
||||||
{
|
{
|
||||||
$lib_mysqld= posix_path($lib_mysqld);
|
$lib_mysqld= posix_path($lib_mysqld);
|
||||||
@ -1478,15 +1484,6 @@ sub command_line_setup {
|
|||||||
{
|
{
|
||||||
push(@opt_extra_mysqld_opt, "--loose-skip-innodb-use-sys-malloc");
|
push(@opt_extra_mysqld_opt, "--loose-skip-innodb-use-sys-malloc");
|
||||||
}
|
}
|
||||||
|
|
||||||
mtr_report("Checking supported features...");
|
|
||||||
|
|
||||||
check_ndbcluster_support(\%mysqld_variables);
|
|
||||||
check_ssl_support(\%mysqld_variables);
|
|
||||||
check_debug_support(\%mysqld_variables);
|
|
||||||
|
|
||||||
executable_setup();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1552,13 +1549,6 @@ sub set_build_thread_ports($) {
|
|||||||
|
|
||||||
sub collect_mysqld_features {
|
sub collect_mysqld_features {
|
||||||
my $found_variable_list_start= 0;
|
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
|
# Execute "mysqld --no-defaults --help --verbose" to get a
|
||||||
@ -1572,9 +1562,11 @@ sub collect_mysqld_features {
|
|||||||
my $args;
|
my $args;
|
||||||
mtr_init_args(\$args);
|
mtr_init_args(\$args);
|
||||||
mtr_add_arg($args, "--no-defaults");
|
mtr_add_arg($args, "--no-defaults");
|
||||||
mtr_add_arg($args, "--datadir=%s", mixed_path($tmpdir));
|
mtr_add_arg($args, "--datadir=%s/tmp", $opt_vardir);
|
||||||
|
mtr_add_arg($args, "--basedir=%s", $basedir);
|
||||||
mtr_add_arg($args, "--language=%s", $path_language);
|
mtr_add_arg($args, "--language=%s", $path_language);
|
||||||
mtr_add_arg($args, "--skip-grant-tables");
|
mtr_add_arg($args, "--skip-grant-tables");
|
||||||
|
mtr_add_arg($args, $_) for (@opt_extra_mysqld_opt);
|
||||||
my $euid= $>;
|
my $euid= $>;
|
||||||
if (!IS_WINDOWS and $euid == 0) {
|
if (!IS_WINDOWS and $euid == 0) {
|
||||||
mtr_add_arg($args, "--user=root");
|
mtr_add_arg($args, "--user=root");
|
||||||
@ -1647,7 +1639,6 @@ sub collect_mysqld_features {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
rmtree($tmpdir);
|
|
||||||
mtr_error("Could not find version of MySQL") unless $mysql_version_id;
|
mtr_error("Could not find version of MySQL") unless $mysql_version_id;
|
||||||
mtr_error("Could not find variabes list") unless $found_variable_list_start;
|
mtr_error("Could not find variabes list") unless $found_variable_list_start;
|
||||||
|
|
||||||
@ -1764,8 +1755,7 @@ sub executable_setup () {
|
|||||||
if ( $opt_embedded_server )
|
if ( $opt_embedded_server )
|
||||||
{
|
{
|
||||||
$exe_mysqltest=
|
$exe_mysqltest=
|
||||||
mtr_exe_exists(vs_config_dirs('libmysqld/examples','mysqltest_embedded'),
|
mtr_exe_exists("$basedir/libmysqld/examples$opt_vs_config/mysqltest_embedded",
|
||||||
"$basedir/libmysqld/examples/mysqltest_embedded",
|
|
||||||
"$path_client_bindir/mysqltest_embedded");
|
"$path_client_bindir/mysqltest_embedded");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1874,12 +1864,10 @@ sub mysql_client_test_arguments(){
|
|||||||
# mysql_client_test executable may _not_ exist
|
# mysql_client_test executable may _not_ exist
|
||||||
if ( $opt_embedded_server ) {
|
if ( $opt_embedded_server ) {
|
||||||
$exe= mtr_exe_maybe_exists(
|
$exe= mtr_exe_maybe_exists(
|
||||||
vs_config_dirs('libmysqld/examples','mysql_client_test_embedded'),
|
"$basedir/libmysqld/examples$opt_vs_config/mysql_client_test_embedded",
|
||||||
"$basedir/libmysqld/examples/mysql_client_test_embedded",
|
|
||||||
"$basedir/bin/mysql_client_test_embedded");
|
"$basedir/bin/mysql_client_test_embedded");
|
||||||
} else {
|
} else {
|
||||||
$exe= mtr_exe_maybe_exists(vs_config_dirs('tests', 'mysql_client_test'),
|
$exe= mtr_exe_maybe_exists("$basedir/tests$opt_vs_config/mysql_client_test",
|
||||||
"$basedir/tests/mysql_client_test",
|
|
||||||
"$basedir/bin/mysql_client_test");
|
"$basedir/bin/mysql_client_test");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1928,38 +1916,6 @@ sub have_maria_support () {
|
|||||||
return defined $maria_var and $maria_var eq 'TRUE';
|
return defined $maria_var and $maria_var eq 'TRUE';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Detect plugin presense and set environment variables appropriately.
|
|
||||||
# This needs to be done early, so we can know whether to skip tests.
|
|
||||||
sub detect_plugins {
|
|
||||||
# --------------------------------------------------------------------------
|
|
||||||
# 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/mariadb/plugin/".$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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set environment to be used by childs of this process for
|
# Set environment to be used by childs of this process for
|
||||||
# things that are constant during the whole lifetime of mysql-test-run
|
# things that are constant during the whole lifetime of mysql-test-run
|
||||||
@ -1999,39 +1955,6 @@ sub environment_setup {
|
|||||||
push(@ld_library_paths, "$basedir/storage/ndb/src/.libs");
|
push(@ld_library_paths, "$basedir/storage/ndb/src/.libs");
|
||||||
}
|
}
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
|
||||||
# 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",
|
|
||||||
"$basedir/lib/mariadb/plugin/udf_example.so",
|
|
||||||
"$basedir/lib/mysql/plugin/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 mypluglib.so
|
|
||||||
# ----------------------------------------------------
|
|
||||||
my $lib_simple_parser=
|
|
||||||
mtr_file_exists(vs_config_dirs('plugin/fulltext', 'mypluglib.dll'),
|
|
||||||
"$basedir/plugin/fulltext/.libs/mypluglib.so",
|
|
||||||
"$basedir/lib/mariadb/plugin/mypluglib.so",
|
|
||||||
"$basedir/lib/mysql/plugin/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
|
# Valgrind need to be run with debug libraries otherwise it's almost
|
||||||
# impossible to add correct supressions, that means if "/usr/lib/debug"
|
# impossible to add correct supressions, that means if "/usr/lib/debug"
|
||||||
@ -2158,8 +2081,7 @@ sub environment_setup {
|
|||||||
# some versions, test using it should be skipped
|
# some versions, test using it should be skipped
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
my $exe_bug25714=
|
my $exe_bug25714=
|
||||||
mtr_exe_maybe_exists(vs_config_dirs('tests', 'bug25714'),
|
mtr_exe_maybe_exists("$basedir/tests$opt_vs_config/bug25714");
|
||||||
"$basedir/tests/bug25714");
|
|
||||||
$ENV{'MYSQL_BUG25714'}= native_path($exe_bug25714);
|
$ENV{'MYSQL_BUG25714'}= native_path($exe_bug25714);
|
||||||
|
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
@ -2176,9 +2098,8 @@ sub environment_setup {
|
|||||||
# my_print_defaults
|
# my_print_defaults
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
my $exe_my_print_defaults=
|
my $exe_my_print_defaults=
|
||||||
mtr_exe_exists(vs_config_dirs('extra', 'my_print_defaults'),
|
mtr_exe_exists("$basedir/extra$opt_vs_config/my_print_defaults",
|
||||||
"$path_client_bindir/my_print_defaults",
|
"$path_client_bindir/my_print_defaults");
|
||||||
"$basedir/extra/my_print_defaults");
|
|
||||||
$ENV{'MYSQL_MY_PRINT_DEFAULTS'}= native_path($exe_my_print_defaults);
|
$ENV{'MYSQL_MY_PRINT_DEFAULTS'}= native_path($exe_my_print_defaults);
|
||||||
|
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
@ -2201,8 +2122,7 @@ sub environment_setup {
|
|||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
# perror
|
# perror
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
my $exe_perror= mtr_exe_exists(vs_config_dirs('extra', 'perror'),
|
my $exe_perror= mtr_exe_exists("$basedir/extra$opt_vs_config/perror",
|
||||||
"$basedir/extra/perror",
|
|
||||||
"$path_client_bindir/perror");
|
"$path_client_bindir/perror");
|
||||||
$ENV{'MY_PERROR'}= native_path($exe_perror);
|
$ENV{'MY_PERROR'}= native_path($exe_perror);
|
||||||
|
|
||||||
@ -2300,7 +2220,11 @@ sub remove_stale_vardir () {
|
|||||||
rmtree("$opt_tmpdir/");
|
rmtree("$opt_tmpdir/");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub set_plugin_var($) {
|
||||||
|
local $_ = $_[0];
|
||||||
|
s/\.\w+$//;
|
||||||
|
$ENV{"\U${_}_SO"} = $_[0];
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create var and the directories needed in var
|
# Create var and the directories needed in var
|
||||||
@ -2365,6 +2289,44 @@ sub setup_vardir() {
|
|||||||
# and make them world readable
|
# and make them world readable
|
||||||
copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022");
|
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
|
# Remove old log files
|
||||||
foreach my $name (glob("r/*.progress r/*.log r/*.warnings"))
|
foreach my $name (glob("r/*.progress r/*.log r/*.warnings"))
|
||||||
{
|
{
|
||||||
@ -2455,29 +2417,36 @@ sub check_debug_support ($) {
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Helper function to handle configuration-based subdirectories which Visual
|
# Helper function to find the correct value for the opt_vs_config
|
||||||
# Studio uses for storing binaries. If opt_vs_config is set, this returns
|
# if it was not set explicitly.
|
||||||
# a path based on that setting; if not, it returns paths for the default
|
#
|
||||||
# /release/ and /debug/ subdirectories.
|
# the configuration with the most recent build dir in sql/ is selected.
|
||||||
#
|
#
|
||||||
# $exe can be undefined, if the directory itself will be used
|
# 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 vs_config_dirs ($$) {
|
sub fix_vs_config_dir () {
|
||||||
my ($path_part, $exe) = @_;
|
return $opt_vs_config="" unless IS_WINDOWS;
|
||||||
|
return $opt_vs_config="/$opt_vs_config" if $opt_vs_config;
|
||||||
|
|
||||||
$exe = "" if not defined $exe;
|
my $modified = 1e30;
|
||||||
|
$opt_vs_config="";
|
||||||
|
|
||||||
# Don't look in these dirs when not on windows
|
for my $dir (qw(client/*.dir libmysql/libmysql.dir sql/mysqld.dir
|
||||||
return () unless IS_WINDOWS;
|
sql/udf_example.dir storage/*/*.dir plugin/*/*.dir)) {
|
||||||
|
for (<$basedir/$dir/*/BuildLog.htm>) {
|
||||||
if ($opt_vs_config)
|
if (-M $_ < $modified)
|
||||||
{
|
{
|
||||||
return ("$basedir/$path_part/$opt_vs_config/$exe");
|
$modified = -M _;
|
||||||
|
$opt_vs_config = basename(dirname($_));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ("$basedir/$path_part/release/$exe",
|
mtr_report("VS config: $opt_vs_config");
|
||||||
"$basedir/$path_part/relwithdebinfo/$exe",
|
$opt_vs_config="/$opt_vs_config" if $opt_vs_config;
|
||||||
"$basedir/$path_part/debug/$exe");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -859,6 +859,9 @@ TABLE_NAME COLUMN_NAME PRIVILEGES
|
|||||||
COLUMNS TABLE_NAME select
|
COLUMNS TABLE_NAME select
|
||||||
COLUMN_PRIVILEGES TABLE_NAME select
|
COLUMN_PRIVILEGES TABLE_NAME select
|
||||||
FILES TABLE_NAME select
|
FILES TABLE_NAME select
|
||||||
|
INNODB_BUFFER_POOL_PAGES_INDEX table_name select
|
||||||
|
INNODB_INDEX_STATS table_name select
|
||||||
|
INNODB_TABLE_STATS table_name select
|
||||||
KEY_COLUMN_USAGE TABLE_NAME select
|
KEY_COLUMN_USAGE TABLE_NAME select
|
||||||
PARTITIONS TABLE_NAME select
|
PARTITIONS TABLE_NAME select
|
||||||
REFERENTIAL_CONSTRAINTS TABLE_NAME select
|
REFERENTIAL_CONSTRAINTS TABLE_NAME select
|
||||||
@ -867,9 +870,6 @@ TABLES TABLE_NAME select
|
|||||||
TABLE_CONSTRAINTS TABLE_NAME select
|
TABLE_CONSTRAINTS TABLE_NAME select
|
||||||
TABLE_PRIVILEGES TABLE_NAME select
|
TABLE_PRIVILEGES TABLE_NAME select
|
||||||
VIEWS TABLE_NAME select
|
VIEWS TABLE_NAME select
|
||||||
INNODB_BUFFER_POOL_PAGES_INDEX table_name select
|
|
||||||
INNODB_TABLE_STATS table_name select
|
|
||||||
INNODB_INDEX_STATS table_name select
|
|
||||||
delete from mysql.user where user='mysqltest_4';
|
delete from mysql.user where user='mysqltest_4';
|
||||||
delete from mysql.db where user='mysqltest_4';
|
delete from mysql.db where user='mysqltest_4';
|
||||||
flush privileges;
|
flush privileges;
|
||||||
|
@ -2,8 +2,5 @@ show variables like 'ignore_builtin_innodb';
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
ignore_builtin_innodb ON
|
ignore_builtin_innodb ON
|
||||||
select PLUGIN_NAME from information_schema.plugins
|
select PLUGIN_NAME from information_schema.plugins
|
||||||
where PLUGIN_NAME = "InnoDb";
|
where PLUGIN_NAME = "InnoDb" and PLUGIN_LIBRARY IS NULL;
|
||||||
PLUGIN_NAME
|
PLUGIN_NAME
|
||||||
select ENGINE from information_schema.engines
|
|
||||||
where ENGINE = "InnoDB";
|
|
||||||
ENGINE
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
$UDF_EXAMPLE_LIB_OPT
|
|
@ -14,26 +14,26 @@ drop table if exists t1;
|
|||||||
# Create the example functions from udf_example
|
# Create the example functions from udf_example
|
||||||
#
|
#
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
--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_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
|
--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_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION lookup RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION lookup RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION reverse_lookup
|
eval CREATE FUNCTION reverse_lookup
|
||||||
RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE AGGREGATE FUNCTION avgcost
|
eval CREATE AGGREGATE FUNCTION avgcost
|
||||||
RETURNS REAL SONAME "$UDF_EXAMPLE_LIB";
|
RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
--error ER_CANT_INITIALIZE_UDF
|
--error ER_CANT_INITIALIZE_UDF
|
||||||
select myfunc_double();
|
select myfunc_double();
|
||||||
@ -207,14 +207,14 @@ CREATE FUNCTION metaphon(a int) RETURNS int
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
# this currently passes, and eclipse the stored function
|
# this currently passes, and eclipse the stored function
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
DROP FUNCTION metaphon;
|
DROP FUNCTION metaphon;
|
||||||
DROP FUNCTION metaphon;
|
DROP FUNCTION metaphon;
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
--error ER_UDF_EXISTS
|
--error ER_UDF_EXISTS
|
||||||
CREATE FUNCTION metaphon(a int) RETURNS int
|
CREATE FUNCTION metaphon(a int) RETURNS int
|
||||||
@ -245,8 +245,8 @@ DROP FUNCTION avgcost;
|
|||||||
# the UDF
|
# the UDF
|
||||||
#
|
#
|
||||||
select * from mysql.func;
|
select * from mysql.func;
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
select IS_const(3);
|
select IS_const(3);
|
||||||
|
|
||||||
@ -260,8 +260,8 @@ select is_const(3);
|
|||||||
#
|
#
|
||||||
# Bug#18761: constant expression as UDF parameters not passed in as constant
|
# Bug#18761: constant expression as UDF parameters not passed in as constant
|
||||||
#
|
#
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
select
|
select
|
||||||
is_const(3) as const,
|
is_const(3) as const,
|
||||||
@ -300,14 +300,14 @@ drop function if exists is_const;
|
|||||||
# Bug #25382: Passing NULL to an UDF called from stored procedures
|
# Bug #25382: Passing NULL to an UDF called from stored procedures
|
||||||
# crashes server
|
# crashes server
|
||||||
#
|
#
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
--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_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
|
||||||
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
delimiter //;
|
delimiter //;
|
||||||
create function f1(p1 varchar(255))
|
create function f1(p1 varchar(255))
|
||||||
@ -345,8 +345,8 @@ drop function myfunc_int;
|
|||||||
# Bug #28921: Queries containing UDF functions are cached
|
# Bug #28921: Queries containing UDF functions are cached
|
||||||
#
|
#
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
create table t1 (a char);
|
create table t1 (a char);
|
||||||
|
|
||||||
set GLOBAL query_cache_size=1355776;
|
set GLOBAL query_cache_size=1355776;
|
||||||
@ -374,8 +374,8 @@ DROP DATABASE IF EXISTS mysqltest;
|
|||||||
CREATE DATABASE mysqltest;
|
CREATE DATABASE mysqltest;
|
||||||
USE mysqltest;
|
USE mysqltest;
|
||||||
DROP DATABASE mysqltest;
|
DROP DATABASE mysqltest;
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
DROP FUNCTION metaphon;
|
DROP FUNCTION metaphon;
|
||||||
USE test;
|
USE test;
|
||||||
|
|
||||||
@ -403,8 +403,8 @@ insert into const_len_bug values(str_const, result, "");
|
|||||||
END |
|
END |
|
||||||
DELIMITER ;|
|
DELIMITER ;|
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION check_const_len RETURNS string SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION check_const_len RETURNS string SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
CALL check_const_len_sp("foo");
|
CALL check_const_len_sp("foo");
|
||||||
|
|
||||||
@ -420,8 +420,8 @@ DROP TABLE const_len_bug;
|
|||||||
# Bug #30355: Incorrect ordering of UDF results
|
# Bug #30355: Incorrect ordering of UDF results
|
||||||
#
|
#
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
|
||||||
CREATE TABLE t1 (a INT);
|
CREATE TABLE t1 (a INT);
|
||||||
CREATE TABLE t2 (a INT PRIMARY KEY);
|
CREATE TABLE t2 (a INT PRIMARY KEY);
|
||||||
INSERT INTO t1 VALUES (4),(3),(2),(1);
|
INSERT INTO t1 VALUES (4),(3),(2),(1);
|
||||||
|
@ -1 +0,0 @@
|
|||||||
$EXAMPLE_PLUGIN_OPT
|
|
@ -1 +0,0 @@
|
|||||||
$EXAMPLE_PLUGIN_OPT
|
|
@ -1 +0,0 @@
|
|||||||
$UDF_EXAMPLE_LIB_OPT
|
|
@ -1 +0,0 @@
|
|||||||
$UDF_EXAMPLE_LIB_OPT
|
|
@ -1 +1 @@
|
|||||||
--skip-grant-tables $EXAMPLE_PLUGIN_OPT
|
--skip-grant-tables
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
--replace_regex /\.dll/.so/
|
--replace_regex /\.dll/.so/
|
||||||
--error ER_OPTION_PREVENTS_STATEMENT
|
--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/
|
--replace_regex /\.dll/.so/
|
||||||
--error ER_OPTION_PREVENTS_STATEMENT
|
--error ER_OPTION_PREVENTS_STATEMENT
|
||||||
|
@ -1 +0,0 @@
|
|||||||
$SIMPLE_PARSER_OPT
|
|
@ -531,6 +531,7 @@ drop table t1;
|
|||||||
grant select on test.* to mysqltest_4@localhost;
|
grant select on test.* to mysqltest_4@localhost;
|
||||||
connect (user10261,localhost,mysqltest_4,,);
|
connect (user10261,localhost,mysqltest_4,,);
|
||||||
connection user10261;
|
connection user10261;
|
||||||
|
--sorted_result
|
||||||
SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS
|
SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS
|
||||||
where COLUMN_NAME='TABLE_NAME';
|
where COLUMN_NAME='TABLE_NAME';
|
||||||
connection default;
|
connection default;
|
||||||
|
@ -3,6 +3,4 @@
|
|||||||
#
|
#
|
||||||
show variables like 'ignore_builtin_innodb';
|
show variables like 'ignore_builtin_innodb';
|
||||||
select PLUGIN_NAME from information_schema.plugins
|
select PLUGIN_NAME from information_schema.plugins
|
||||||
where PLUGIN_NAME = "InnoDb";
|
where PLUGIN_NAME = "InnoDb" and PLUGIN_LIBRARY IS NULL;
|
||||||
select ENGINE from information_schema.engines
|
|
||||||
where ENGINE = "InnoDB";
|
|
||||||
|
@ -44,7 +44,7 @@ mkdir $MYSQLTEST_VARDIR/tmp/mysqld_option_err;
|
|||||||
# See also Bug#32034.
|
# See also Bug#32034.
|
||||||
--echo Test that bad value for plugin enum option is rejected correctly.
|
--echo Test that bad value for plugin enum option is rejected correctly.
|
||||||
--error 7
|
--error 7
|
||||||
--exec $MYSQLD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables $EXAMPLE_PLUGIN_OPT --plugin-load=EXAMPLE=ha_example.so --plugin-example-enum-var=noexist >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
|
--exec $MYSQLD --skip-networking --datadir=$MYSQLTEST_VARDIR/tmp/mysqld_option_err --skip-grant-tables --plugin-dir=$MYSQLTEST_VARDIR/plugins --plugin-load=example=ha_example.so --plugin-example-enum-var=noexist >>$MYSQLTEST_VARDIR/tmp/mysqld_option_err/mysqltest.log 2>&1
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test that an wrong option with --help --verbose gives an error
|
# Test that an wrong option with --help --verbose gives an error
|
||||||
|
@ -1 +0,0 @@
|
|||||||
$EXAMPLE_PLUGIN_OPT
|
|
@ -5,15 +5,15 @@ CREATE TABLE t1(a int) ENGINE=EXAMPLE;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--replace_regex /\.dll/.so/
|
--replace_regex /\.dll/.so/
|
||||||
eval INSTALL PLUGIN example SONAME $HA_EXAMPLE_SO;
|
eval INSTALL PLUGIN example SONAME '$HA_EXAMPLE_SO';
|
||||||
--replace_regex /\.dll/.so/
|
--replace_regex /\.dll/.so/
|
||||||
--error 1125
|
--error 1125
|
||||||
eval INSTALL PLUGIN EXAMPLE SONAME $HA_EXAMPLE_SO;
|
eval INSTALL PLUGIN EXAMPLE SONAME '$HA_EXAMPLE_SO';
|
||||||
|
|
||||||
UNINSTALL PLUGIN example;
|
UNINSTALL PLUGIN example;
|
||||||
|
|
||||||
--replace_regex /\.dll/.so/
|
--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;
|
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ UNINSTALL PLUGIN non_exist;
|
|||||||
--echo # to impossible int val
|
--echo # to impossible int val
|
||||||
--echo #
|
--echo #
|
||||||
--replace_regex /\.dll/.so/
|
--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= e1;
|
||||||
SET GLOBAL example_enum_var= e2;
|
SET GLOBAL example_enum_var= e2;
|
||||||
@ -50,7 +50,7 @@ UNINSTALL PLUGIN example;
|
|||||||
# Bug #32757 hang with sql_mode set when setting some global variables
|
# Bug #32757 hang with sql_mode set when setting some global variables
|
||||||
#
|
#
|
||||||
--replace_regex /\.dll/.so/
|
--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;
|
select @@session.sql_mode into @old_sql_mode;
|
||||||
|
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
$EXAMPLE_PLUGIN_OPT
|
--plugin-load=EXAMPLE=$HA_EXAMPLE_SO
|
||||||
$EXAMPLE_PLUGIN_LOAD
|
|
||||||
--loose-plugin-example-enum-var=e2
|
--loose-plugin-example-enum-var=e2
|
||||||
|
@ -1 +0,0 @@
|
|||||||
$EXAMPLE_PLUGIN_OPT
|
|
@ -8,7 +8,7 @@
|
|||||||
GRANT INSERT ON mysql.plugin TO bug51770@localhost;
|
GRANT INSERT ON mysql.plugin TO bug51770@localhost;
|
||||||
connect(con1,localhost,bug51770,,);
|
connect(con1,localhost,bug51770,,);
|
||||||
--replace_regex /\.dll/.so/
|
--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
|
--error ER_TABLEACCESS_DENIED_ERROR
|
||||||
UNINSTALL PLUGIN example;
|
UNINSTALL PLUGIN example;
|
||||||
connection default;
|
connection default;
|
||||||
|
@ -1 +0,0 @@
|
|||||||
$UDF_EXAMPLE_LIB_OPT
|
|
@ -14,26 +14,26 @@ drop table if exists t1;
|
|||||||
# Create the example functions from udf_example
|
# Create the example functions from udf_example
|
||||||
#
|
#
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
--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_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
|
--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_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION lookup RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION lookup RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION reverse_lookup
|
eval CREATE FUNCTION reverse_lookup
|
||||||
RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE AGGREGATE FUNCTION avgcost
|
eval CREATE AGGREGATE FUNCTION avgcost
|
||||||
RETURNS REAL SONAME "$UDF_EXAMPLE_LIB";
|
RETURNS REAL SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
--error ER_CANT_INITIALIZE_UDF
|
--error ER_CANT_INITIALIZE_UDF
|
||||||
select myfunc_double();
|
select myfunc_double();
|
||||||
@ -210,14 +210,14 @@ CREATE FUNCTION metaphon(a int) RETURNS int
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
# this currently passes, and eclipse the stored function
|
# this currently passes, and eclipse the stored function
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
DROP FUNCTION metaphon;
|
DROP FUNCTION metaphon;
|
||||||
DROP FUNCTION metaphon;
|
DROP FUNCTION metaphon;
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
--error ER_UDF_EXISTS
|
--error ER_UDF_EXISTS
|
||||||
CREATE FUNCTION metaphon(a int) RETURNS int
|
CREATE FUNCTION metaphon(a int) RETURNS int
|
||||||
@ -248,8 +248,8 @@ DROP FUNCTION avgcost;
|
|||||||
# the UDF
|
# the UDF
|
||||||
#
|
#
|
||||||
select * from mysql.func;
|
select * from mysql.func;
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
select IS_const(3);
|
select IS_const(3);
|
||||||
|
|
||||||
@ -263,8 +263,8 @@ select is_const(3);
|
|||||||
#
|
#
|
||||||
# Bug#18761: constant expression as UDF parameters not passed in as constant
|
# Bug#18761: constant expression as UDF parameters not passed in as constant
|
||||||
#
|
#
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION is_const RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
select
|
select
|
||||||
is_const(3) as const,
|
is_const(3) as const,
|
||||||
@ -303,14 +303,14 @@ drop function if exists is_const;
|
|||||||
# Bug #25382: Passing NULL to an UDF called from stored procedures
|
# Bug #25382: Passing NULL to an UDF called from stored procedures
|
||||||
# crashes server
|
# crashes server
|
||||||
#
|
#
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
--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_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
|
||||||
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
delimiter //;
|
delimiter //;
|
||||||
create function f1(p1 varchar(255))
|
create function f1(p1 varchar(255))
|
||||||
@ -354,8 +354,8 @@ DROP DATABASE IF EXISTS mysqltest;
|
|||||||
CREATE DATABASE mysqltest;
|
CREATE DATABASE mysqltest;
|
||||||
USE mysqltest;
|
USE mysqltest;
|
||||||
DROP DATABASE mysqltest;
|
DROP DATABASE mysqltest;
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
DROP FUNCTION metaphon;
|
DROP FUNCTION metaphon;
|
||||||
USE test;
|
USE test;
|
||||||
|
|
||||||
@ -383,8 +383,8 @@ insert into const_len_bug values(str_const, result, "");
|
|||||||
END |
|
END |
|
||||||
DELIMITER ;|
|
DELIMITER ;|
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION check_const_len RETURNS string SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION check_const_len RETURNS string SONAME "$UDF_EXAMPLE_SO";
|
||||||
|
|
||||||
CALL check_const_len_sp("foo");
|
CALL check_const_len_sp("foo");
|
||||||
|
|
||||||
@ -400,8 +400,8 @@ DROP TABLE const_len_bug;
|
|||||||
# Bug #30355: Incorrect ordering of UDF results
|
# Bug #30355: Incorrect ordering of UDF results
|
||||||
#
|
#
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION sequence RETURNS INTEGER SONAME "$UDF_EXAMPLE_SO";
|
||||||
CREATE TABLE t1 (a INT);
|
CREATE TABLE t1 (a INT);
|
||||||
CREATE TABLE t2 (a INT PRIMARY KEY);
|
CREATE TABLE t2 (a INT PRIMARY KEY);
|
||||||
INSERT INTO t1 VALUES (4),(3),(2),(1);
|
INSERT INTO t1 VALUES (4),(3),(2),(1);
|
||||||
|
@ -1 +0,0 @@
|
|||||||
$UDF_EXAMPLE_LIB_OPT
|
|
@ -14,8 +14,8 @@ drop table if exists t1;
|
|||||||
# Bug #28921: Queries containing UDF functions are cached
|
# Bug #28921: Queries containing UDF functions are cached
|
||||||
#
|
#
|
||||||
|
|
||||||
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
|
--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
|
||||||
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_LIB";
|
eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
|
||||||
create table t1 (a char);
|
create table t1 (a char);
|
||||||
|
|
||||||
set GLOBAL query_cache_size=1355776;
|
set GLOBAL query_cache_size=1355776;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user