Current Path : /home/usr.opt/mysql57/mysql-test/suite/ndb_memcache/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/ndb_memcache/t/reconf1.test |
# The include statement below is a temp one for tests that are yet to #be ported to run with InnoDB, #but needs to be kept for tests that would need MyISAM in future. --source include/force_myisam_default.inc # Basic test of online reconfiguration --source include/have_ndb.inc --source suite/ndb_memcache/include/have_memcache.inc --source suite/ndb_memcache/include/memcached_wait_for_ready.inc # # Now change the configuration # USE ndbmemcache; CREATE TABLE reconf_test_table like demo_table; UPDATE containers SET db_table = "reconf_test_table" WHERE db_table = "demo_table"; DROP TABLE demo_table; # Touch the timestamp column to trigger online reconfiguration: UPDATE memcache_server_roles set update_timestamp = NOW(); # # Now run a basic test # --perl use strict; use lib "lib/"; use My::Memcache; my $port = $ENV{NDB_MEMCACHED_1_PORT} or die "Need NDB_MEMCACHED_1_PORT"; my $mc = My::Memcache->new(); my $r = $mc->connect("localhost",$port); my $cf_gen = $mc->wait_for_reconf(); if($cf_gen > 0) { $r = $mc->set("test_key_1", 1515); } else { $mc->fail("UNEXPECTED cf_gen $cf_gen"); } EOF SELECT mkey, string_value from ndbmemcache.reconf_test_table; # # Now clean up the config changes for the next test and reconfigure again # RENAME TABLE reconf_test_table TO demo_table ; UPDATE containers SET db_table = "demo_table" WHERE db_table = "reconf_test_table"; UPDATE memcache_server_roles set update_timestamp = NOW(); --perl use strict; use lib "lib/"; use My::Memcache; my $port = $ENV{NDB_MEMCACHED_1_PORT} or die "Need NDB_MEMCACHED_1_PORT"; my $mc = My::Memcache->new(); my $r = $mc->connect("localhost",$port); my $cf_gen = $mc->wait_for_reconf(); EOF