Skip to content

Commit 6c9eb9a

Browse files
committed
Bug #32106576 REMOVE MEMCACHE
Remove memcache from NDB CMakeLists Remove code under support-files that refer to ndb_memcache Remove ndb memcache from mysql-test-run.pl Remove all storage/ndb/memcache Remove all ndb-memcahe test suite Remove memcache from LICENSE file Reviewed by: John Duncan <john.duncan@oracle.com>
1 parent 3e94bca commit 6c9eb9a

File tree

352 files changed

+5
-77370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

352 files changed

+5
-77370
lines changed

LICENSE

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,35 +2758,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27582758
======================================================================
27592759
======================================================================
27602760

2761-
Memcached.pm
2762-
2763-
Memcached.pm
2764-
Memcached.pm is licensed under the Perl license.
2765-
2766-
Oracle may use, redistribute and/or modify this code under the terms of
2767-
either:
2768-
2769-
a) the GNU General Public License as published by the Free Software
2770-
Foundation; either version 1, or (at your option) any later version, or
2771-
2772-
b) the "Artistic License" which comes with the Expect/pr code.
2773-
2774-
Oracle elects to use the GPLv2 for version of MySQL that are licensed under
2775-
the GPL.
2776-
2777-
Oracle elects to use the Artistic license for all other (commercial) versions
2778-
of MySQL.
2779-
2780-
A copy of the GPLv2 and the Artistic License (Perl) 1.0 must be included with
2781-
any distribution.
2782-
2783-
This component is licensed under the GNU GPL license, version 2.0.
2784-
2785-
This component is licensed under Artistic License (Perl) 1.0
2786-
2787-
======================================================================
2788-
======================================================================
2789-
27902761
mkpasswd.pl
27912762

27922763
mkpasswd.pl Perl module

mysql-test/mysql-test-run.pl

Lines changed: 5 additions & 179 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/perl
22
# -*- cperl -*-
33

4-
# Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
4+
# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
55
#
66
# This program is free software; you can redistribute it and/or modify
77
# it under the terms of the GNU General Public License, version 2.0,
@@ -2985,7 +2985,7 @@ ($)
29852985
mtr_report(" - enabling ndbcluster");
29862986
$ndbcluster_enabled= 1;
29872987
# Add MySQL Cluster test suites
2988-
$DEFAULT_SUITES.=",ndb,ndb_binlog,rpl_ndb,ndb_rpl,ndb_memcache";
2988+
$DEFAULT_SUITES.=",ndb,ndb_binlog,rpl_ndb,ndb_rpl";
29892989
return;
29902990
}
29912991

@@ -3234,163 +3234,6 @@ sub ndbd_start {
32343234
return;
32353235
}
32363236

3237-
# Start memcached with the special ndb_engine.so plugin
3238-
# making it use NDB as backend.
3239-
sub memcached_start {
3240-
my ($cluster, $memcached) = @_;
3241-
3242-
my $name = $memcached->name();
3243-
mtr_verbose("memcached_start '$name'");
3244-
3245-
# Clear env used by include/have_memcached.inc
3246-
$ENV{'NDB_MEMCACHED_STARTED'} = 0;
3247-
3248-
# Look for the ndb_engine.so memcache plugin
3249-
my $found_so = my_find_file($bindir,
3250-
["storage/ndb/memcache", # source or build
3251-
"lib", "lib64"], # install
3252-
"ndb_engine.so", NOT_REQUIRED);
3253-
if ($found_so eq "")
3254-
{
3255-
# The ndb_engine memcache plugin is not a mandatory
3256-
# component, silently skip to start memcached if it's not
3257-
# found
3258-
mtr_verbose("Could not find the ndb_engine memcache plugin");
3259-
return;
3260-
}
3261-
mtr_verbose("Found memcache plugin: '$found_so'");
3262-
3263-
# Look for the generated perl script which tells
3264-
# location of memcached etc.
3265-
my $found_perl_source = my_find_file($bindir,
3266-
["storage/ndb/memcache", # source
3267-
"mysql-test/lib", # install
3268-
"share/mysql-test/lib"], # install
3269-
"memcached_path.pl");
3270-
mtr_verbose("Found memcache script: '$found_perl_source'");
3271-
3272-
# Source the found perl script which tells
3273-
# location of memcached etc.
3274-
require "$found_perl_source";
3275-
3276-
if(! memcached_is_available())
3277-
{
3278-
mtr_error("Memcached not available.");
3279-
}
3280-
my $exe = "";
3281-
if(memcached_is_bundled())
3282-
{
3283-
# The bundled memcached has been built
3284-
# and made part of the package, find where
3285-
# it ended up and use it.
3286-
$exe = my_find_bin($bindir,
3287-
["libexec",
3288-
"sbin",
3289-
"bin",
3290-
"storage/ndb/memcache/extra/memcached"],
3291-
"memcached");
3292-
mtr_verbose("Found bundled memcached '$exe'");
3293-
}
3294-
else
3295-
{
3296-
# External memcached has been used to build ndb_engine.so
3297-
# The path to that memcached has been hardcoded in
3298-
# memcached_path.pl, use that path.
3299-
# This requires same machine as build or memcached
3300-
# also installed in same location as when it was built.
3301-
$exe = get_memcached_exe_path();
3302-
if ($exe eq "" or ! -x $exe)
3303-
{
3304-
mtr_error("Failed to find memcached binary '$exe'");
3305-
}
3306-
mtr_verbose("Using memcached binary '$exe'");
3307-
}
3308-
3309-
3310-
my $args;
3311-
mtr_init_args(\$args);
3312-
# TCP port number to listen on
3313-
mtr_add_arg($args, "-p %d", $memcached->value('port'));
3314-
# Max simultaneous connections
3315-
mtr_add_arg($args, "-c %d", $memcached->value('max_connections'));
3316-
# Load engine as storage engine, ie. /path/ndb_engine.so
3317-
mtr_add_arg($args, "-E");
3318-
mtr_add_arg($args, $found_so);
3319-
# Config options for loaded storage engine
3320-
{
3321-
my @opts;
3322-
push(@opts, "connectstring=" . $memcached->value('ndb_connectstring'));
3323-
push(@opts, $memcached->if_exist("options"));
3324-
mtr_add_arg($args, "-e");
3325-
mtr_add_arg($args, join(";", @opts));
3326-
}
3327-
3328-
if($opt_gdb)
3329-
{
3330-
gdb_arguments(\$args, \$exe, "memcached");
3331-
}
3332-
3333-
my $proc = My::SafeProcess->new
3334-
( name => $name,
3335-
path => $exe,
3336-
args => \$args,
3337-
output => "$opt_vardir/log/$name.out",
3338-
error => "$opt_vardir/log/$name.out",
3339-
append => 1,
3340-
verbose => $opt_verbose,
3341-
);
3342-
mtr_verbose("Started $proc");
3343-
3344-
$memcached->{proc} = $proc;
3345-
3346-
# Set env used by include/have_memcached.inc
3347-
$ENV{'NDB_MEMCACHED_STARTED'} = 1;
3348-
3349-
return;
3350-
}
3351-
3352-
3353-
sub memcached_load_metadata($) {
3354-
my $cluster= shift;
3355-
3356-
foreach my $mysqld (mysqlds())
3357-
{
3358-
if(-d $mysqld->value('datadir') . "/" . "ndbmemcache")
3359-
{
3360-
mtr_verbose("skipping memcache metadata (already stored)");
3361-
return;
3362-
}
3363-
}
3364-
3365-
my $sql_script= my_find_file($bindir,
3366-
["share/mysql/memcache-api", # RPM install
3367-
"share/memcache-api", # Other installs
3368-
"scripts" # Build tree
3369-
],
3370-
"ndb_memcache_metadata.sql", NOT_REQUIRED);
3371-
mtr_verbose("memcached_load_metadata: '$sql_script'");
3372-
if (-f $sql_script )
3373-
{
3374-
my $args;
3375-
mtr_init_args(\$args);
3376-
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
3377-
mtr_add_arg($args, "--defaults-group-suffix=%s", $cluster->suffix());
3378-
mtr_add_arg($args, "--connect-timeout=20");
3379-
if ( My::SafeProcess->run(
3380-
name => "ndbmemcache config loader",
3381-
path => $exe_mysql,
3382-
args => \$args,
3383-
input => $sql_script,
3384-
output => "$opt_vardir/log/memcache_config.log",
3385-
error => "$opt_vardir/log/memcache_config.log"
3386-
) != 0)
3387-
{
3388-
mtr_error("Could not load ndb_memcache_metadata.sql file");
3389-
}
3390-
}
3391-
}
3392-
3393-
33943237
sub ndbcluster_start ($) {
33953238
my $cluster= shift;
33963239

@@ -5833,7 +5676,7 @@ ($)
58335676
}
58345677

58355678
# Check if any remaining servers need restart
5836-
foreach my $server (ndb_mgmds(), ndbds(), memcacheds())
5679+
foreach my $server (ndb_mgmds(), ndbds())
58375680
{
58385681
if (server_need_restart($tinfo, $server, $master_restarted))
58395682
{
@@ -5855,8 +5698,7 @@ ($)
58555698
sub ndbds { return _like('cluster_config.ndbd.');}
58565699
sub ndb_mgmds { return _like('cluster_config.ndb_mgmd.'); }
58575700
sub clusters { return _like('mysql_cluster.'); }
5858-
sub memcacheds { return _like('memcached.'); }
5859-
sub all_servers { return ( mysqlds(), ndb_mgmds(), ndbds(), memcacheds() ); }
5701+
sub all_servers { return ( mysqlds(), ndb_mgmds(), ndbds() ); }
58605702

58615703
#
58625704
# Filter a list of servers and return only those that are part
@@ -5938,7 +5780,7 @@ ($$)
59385780

59395781
# cluster processes
59405782
My::SafeProcess::shutdown( $opt_shutdown_timeout,
5941-
started(ndbds(), ndb_mgmds(), memcacheds()) );
5783+
started(ndbds(), ndb_mgmds()) );
59425784
}
59435785
else
59445786
{
@@ -6132,22 +5974,6 @@ ($)
61325974
}
61335975
}
61345976

6135-
# Start memcached(s) for each cluster
6136-
foreach my $cluster ( clusters() )
6137-
{
6138-
next if !in_cluster($cluster, memcacheds());
6139-
6140-
# Load the memcache metadata into this cluster
6141-
memcached_load_metadata($cluster);
6142-
6143-
# Start memcached(s)
6144-
foreach my $memcached ( in_cluster($cluster, memcacheds()))
6145-
{
6146-
next if started($memcached);
6147-
memcached_start($cluster, $memcached);
6148-
}
6149-
}
6150-
61515977
return 0;
61525978
}
61535979

mysql-test/suite/ndb_memcache/include/datatypes_tables.inc

Lines changed: 0 additions & 80 deletions
This file was deleted.

mysql-test/suite/ndb_memcache/include/have_memcache.inc

Lines changed: 0 additions & 24 deletions
This file was deleted.

mysql-test/suite/ndb_memcache/include/memcached_wait_for_ready.inc

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)