Linux ip-172-26-2-223 5.4.0-1018-aws #18-Ubuntu SMP Wed Jun 24 01:15:00 UTC 2020 x86_64
Apache
: 172.26.2.223 | : 3.23.61.205
Cant Read [ /etc/named.conf ]
8.1.13
www
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
www /
server /
mysql /
mysql-test /
suite /
memcached /
t /
[ HOME SHELL ]
Name
Size
Permission
Action
memc212_2_cols-master.opt
130
B
-rw-r--r--
memc212_2_cols.test
5.86
KB
-rw-r--r--
memc213_2_intcols-master.opt
124
B
-rw-r--r--
memc213_2_intcols.test
12.48
KB
-rw-r--r--
memc214_5_cols-master.opt
124
B
-rw-r--r--
memc214_5_cols.test
5.03
KB
-rw-r--r--
memc215_50_cols-master.opt
124
B
-rw-r--r--
memc215_50_cols.test
8.96
KB
-rw-r--r--
memc216_5_utf8-master.opt
124
B
-rw-r--r--
memc216_5_utf8.test
7.18
KB
-rw-r--r--
memc217_add-master.opt
124
B
-rw-r--r--
memc217_add.test
3.18
KB
-rw-r--r--
memc218_decr-master.opt
124
B
-rw-r--r--
memc218_decr.test
2.55
KB
-rw-r--r--
memc219_delete-master.opt
124
B
-rw-r--r--
memc219_delete.test
4.02
KB
-rw-r--r--
memc220_fkey_1-master.opt
124
B
-rw-r--r--
memc220_fkey_1.test
5.65
KB
-rw-r--r--
memc221_get-master.opt
124
B
-rw-r--r--
memc221_get.test
2.84
KB
-rw-r--r--
memc222_incr-master.opt
124
B
-rw-r--r--
memc222_incr.test
2.49
KB
-rw-r--r--
memc223_index_1-master.opt
124
B
-rw-r--r--
memc223_index_1.test
5.83
KB
-rw-r--r--
memc224_index_2-master.opt
124
B
-rw-r--r--
memc224_index_2.test
7.22
KB
-rw-r--r--
memc225_index_3-master.opt
124
B
-rw-r--r--
memc225_index_3.test
7.5
KB
-rw-r--r--
memc226_index_4-master.opt
124
B
-rw-r--r--
memc226_index_4.test
6.39
KB
-rw-r--r--
memc227_lock-master.opt
124
B
-rw-r--r--
memc227_lock.test
5.96
KB
-rw-r--r--
memc228_mdl_1-master.opt
124
B
-rw-r--r--
memc228_mdl_1.test
5.66
KB
-rw-r--r--
memc229_mdl_2-master.opt
124
B
-rw-r--r--
memc229_mdl_2.test
5.5
KB
-rw-r--r--
memc230_mdl_3-master.opt
124
B
-rw-r--r--
memc230_mdl_3.test
5.57
KB
-rw-r--r--
memc231_mdl_4-master.opt
124
B
-rw-r--r--
memc231_mdl_4.test
5.35
KB
-rw-r--r--
memc232_NULL_cols-master.opt
124
B
-rw-r--r--
memc232_NULL_cols.test
4.12
KB
-rw-r--r--
memc233_option-master.opt
124
B
-rw-r--r--
memc233_option.test
2.4
KB
-rw-r--r--
memc234_r_batch_1-master.opt
165
B
-rw-r--r--
memc234_r_batch_1.test
2.47
KB
-rw-r--r--
memc235_r_batch_2-master.opt
164
B
-rw-r--r--
memc235_r_batch_2.test
2.3
KB
-rw-r--r--
memc236_r_batch_3-master.opt
164
B
-rw-r--r--
memc236_r_batch_3.test
2.3
KB
-rw-r--r--
memc237_sep_1-master.opt
124
B
-rw-r--r--
memc237_sep_1.test
3.11
KB
-rw-r--r--
memc238_sep_2-master.opt
124
B
-rw-r--r--
memc238_sep_2.test
3.04
KB
-rw-r--r--
memc239_sep_3-master.opt
124
B
-rw-r--r--
memc239_sep_3.test
3.06
KB
-rw-r--r--
memc240_sep_4-master.opt
124
B
-rw-r--r--
memc240_sep_4.test
3.48
KB
-rw-r--r--
memc241_replace-master.opt
124
B
-rw-r--r--
memc241_replace.test
3.06
KB
-rw-r--r--
memc242_set-master.opt
124
B
-rw-r--r--
memc242_set.test
2.73
KB
-rw-r--r--
memc243_view-master.opt
124
B
-rw-r--r--
memc243_view.test
5.35
KB
-rw-r--r--
memc244_w_batch_1-master.opt
164
B
-rw-r--r--
memc244_w_batch_1.test
4.95
KB
-rw-r--r--
memc245_w_batch_2-master.opt
165
B
-rw-r--r--
memc245_w_batch_2.test
4.86
KB
-rw-r--r--
memc246_w_batch_3-master.opt
164
B
-rw-r--r--
memc246_w_batch_3.test
4.86
KB
-rw-r--r--
memc247_cache_policy-master.op...
124
B
-rw-r--r--
memc247_cache_policy.test
20.1
KB
-rw-r--r--
memc248_fkey_2-master.opt
124
B
-rw-r--r--
memc248_fkey_2.test
5.18
KB
-rw-r--r--
memc250_container-master.opt
124
B
-rw-r--r--
memc250_container.test
15.58
KB
-rw-r--r--
memc251_w_batch_6-master.opt
216
B
-rw-r--r--
memc251_w_batch_6.test
5.39
KB
-rw-r--r--
memc255_change_containers_and_...
124
B
-rw-r--r--
memc255_change_containers_and_...
2.16
KB
-rw-r--r--
memc261_container_errs-master....
124
B
-rw-r--r--
memc261_container_errs.test
20.33
KB
-rw-r--r--
memc263_r_batch_4-master.opt
164
B
-rw-r--r--
memc263_r_batch_4.test
4.38
KB
-rw-r--r--
memc265_r_batch_5-master.opt
164
B
-rw-r--r--
memc265_r_batch_5.test
4.86
KB
-rw-r--r--
memc266_w_batch_4-master.opt
164
B
-rw-r--r--
memc266_w_batch_4.test
4.7
KB
-rw-r--r--
memc267_w_batch_5-master.opt
204
B
-rw-r--r--
memc267_w_batch_5.test
5.05
KB
-rw-r--r--
memc268_w_batch_7-master.opt
206
B
-rw-r--r--
memc268_w_batch_7.test
5.26
KB
-rw-r--r--
memc269_funcs_1-master.opt
124
B
-rw-r--r--
memc269_funcs_1.test
6.59
KB
-rw-r--r--
memc272_2_tables-master.opt
124
B
-rw-r--r--
memc272_2_tables.test
7.74
KB
-rw-r--r--
memc273_5_tables-master.opt
124
B
-rw-r--r--
memc273_5_tables.test
8.22
KB
-rw-r--r--
memc274_5_tables_uml-master.op...
124
B
-rw-r--r--
memc274_5_tables_uml.test
8.26
KB
-rw-r--r--
memc275_5_tables_index-master....
124
B
-rw-r--r--
memc275_5_tables_index.test
8.36
KB
-rw-r--r--
memc276_1_table-master.opt
124
B
-rw-r--r--
memc276_1_table.test
8.58
KB
-rw-r--r--
memc277_default_table-master.o...
124
B
-rw-r--r--
memc277_default_table.test
11.82
KB
-rw-r--r--
memc278_view-master.opt
124
B
-rw-r--r--
memc278_view.test
9.52
KB
-rw-r--r--
memc280_misc-master.opt
124
B
-rw-r--r--
memc280_misc.test
1.83
KB
-rw-r--r--
memc281_set_utf8-master.opt
124
B
-rw-r--r--
memc281_set_utf8.test
2.46
KB
-rw-r--r--
memc282_time_expire-master.opt
124
B
-rw-r--r--
memc282_time_expire.test
2.39
KB
-rw-r--r--
memc283_misc-master.opt
204
B
-rw-r--r--
memc283_misc.test
1.98
KB
-rw-r--r--
memc284_misc-master.opt
124
B
-rw-r--r--
memc284_misc.test
2.29
KB
-rw-r--r--
memc285_FTWRL-master.opt
191
B
-rw-r--r--
memc285_FTWRL.test
2.48
KB
-rw-r--r--
memc290_read_committed-master....
274
B
-rw-r--r--
memc290_read_committed.test
4.34
KB
-rw-r--r--
memc_297_crash-master.opt
189
B
-rw-r--r--
memc_297_crash.test
2.48
KB
-rw-r--r--
memc_api_disable_rowlock-maste...
119
B
-rw-r--r--
memc_api_disable_rowlock.test
2.47
KB
-rw-r--r--
memc_api_trx_level-master.opt
155
B
-rw-r--r--
memc_api_trx_level.test
1.64
KB
-rw-r--r--
memcached_alter_column-master....
124
B
-rw-r--r--
memcached_alter_column.test
2.29
KB
-rw-r--r--
memcached_virtual_block-master...
130
B
-rw-r--r--
memcached_virtual_block.test
2.45
KB
-rw-r--r--
rpl_memc270_1-master.opt
189
B
-rw-r--r--
rpl_memc270_1-slave.opt
20
B
-rw-r--r--
rpl_memc270_1.test
5.58
KB
-rw-r--r--
rpl_memc271_2-master.opt
191
B
-rw-r--r--
rpl_memc271_2-slave.opt
22
B
-rw-r--r--
rpl_memc271_2.test
5.65
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : memc247_cache_policy.test
source include/not_valgrind.inc; source include/have_memcached_plugin.inc; source include/not_windows.inc; source include/have_innodb.inc; --disable_query_log CALL mtr.add_suppression("daemon-memcached-w-batch-size': unsigned"); CALL mtr.add_suppression("Could not obtain server's UPN to be used as target service name"); CALL mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop"); --enable_query_log SET @tx_isolation= @@global.tx_isolation; SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; # Create the memcached tables --disable_query_log source include/memcache_config.inc; --enable_query_log INSERT INTO cache_policies VALUES("cache_policy", "cache_only", "innodb_only", "innodb_only", "innodb_only"); INSERT INTO config_options VALUES("separator", "|"); # describe table for memcache INSERT INTO containers VALUES ("desc_t1", "test", "t1", "c1", "c2", "c3", "c4", "c5", "PRIMARY"); USE test; CREATE TABLE t1 (c1 VARCHAR(32), c2 VARCHAR(1024), c3 INT, c4 BIGINT UNSIGNED, c5 INT, primary key(c1)) ENGINE = INNODB; INSERT INTO t1 VALUES ('D', 'Darmstadt', 0, 0, 0); INSERT INTO t1 VALUES ('B', 'Berlin', 0, 0, 0); INSERT INTO t1 VALUES ('C', 'Cottbus', 0, 0 ,0); INSERT INTO t1 VALUES ('H', 'Hamburg', 0, 0, 0); # Tables must exist before plugin can be started! INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; # ---------------------------------------------------------------- # Test the "cache_only" get # # get - cache_only # set - innodb_only # delete - innodb_only # ---------------------------------------------------------------- # The following select is writing all to memcache otherwisw memcache is empty. --sorted_result SELECT c1,c2 FROM t1; SELECT SLEEP(2); # Since "get" are cache_only, it is not going to fetch any rows perl; use DBI; use Cache::Memcached; print "----- Test get (cache_only) -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with D,B,H,C:\n"; $val = $memd->get("D"); if ($val) { print "$val\n"; } $val = $memd->get("B"); if ($val) { print "$val\n"; } $val = $memd->get("H"); if ($val) { print "$val\n"; } $val = $memd->get("C"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with B:\n"; $val = $memd->get("B"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with D,H:\n"; $val = $memd->get("D"); if ($val) { print "$val\n"; } $val = $memd->get("H"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # ---------------------------------------------------------------- # Test the "caching" get, which fetch data from disk if they are # not in cache # # get - caching # set - innodb_only # delete - innodb_only # ---------------------------------------------------------------- # Stop plugin before innodb_memcached configuration UNINSTALL PLUGIN daemon_memcached; use innodb_memcache; DELETE FROM cache_policies; INSERT INTO cache_policies VALUES("cache_policy", "caching", "innodb_only", "innodb_only", "innodb_only"); INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; # Since "get" is now "caching", it will fetch data from disk if not in cache perl; use DBI; use Cache::Memcached; print "----- Test get (caching) -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with D,B,H,C:\n"; $val = $memd->get("D"); if ($val) { print "$val\n"; } $val = $memd->get("B"); if ($val) { print "$val\n"; } $val = $memd->get("H"); if ($val) { print "$val\n"; } $val = $memd->get("C"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # ---------------------------------------------------------------- # Now let's make the "insert" operation also cache_only, so the # configuration is # # get - cache_only # set - cache_only # delete - innodb_only # ---------------------------------------------------------------- # Stop plugin before innodb_memcached configuration UNINSTALL PLUGIN daemon_memcached; use innodb_memcache; DELETE FROM cache_policies; INSERT INTO cache_policies VALUES("cache_policy", "cache_only", "cache_only", "innodb_only", "innodb_only"); INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; perl; use DBI; use Cache::Memcached; print "----- Test insert (cache_only) -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Add E|Essen:\n"; if ($memd->add("E","Essen")) { print "Ok.\n"; } else { print "Error: fail to add.\n"; } $memd->disconnect_all; EOF --sorted_result use test; SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with E:\n"; $val = $memd->get("E"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Set P|Paris:\n"; if ($memd->set("P","Paris", 60)) { print "Ok.\n"; } else { print "Error: fail to set.\n"; } print "Here the memcached results with P:\n"; $val = $memd->get("P"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # ---------------------------------------------------------------- # Now let's make the "insert" operation also "caching", so # get - caching # set - caching # delete - innodb_only # ---------------------------------------------------------------- # Stop plugin before innodb_memcached configuration UNINSTALL PLUGIN daemon_memcached; use innodb_memcache; DELETE FROM cache_policies; INSERT INTO cache_policies VALUES("cache_policy", "caching", "caching", "innodb_only", "innodb_only"); INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; SELECT SLEEP(2); perl; use DBI; use Cache::Memcached; print "----- Test insert (caching) -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Add G|Gossen:\n"; if ($memd->add("G","Gossen")) { print "Ok.\n"; } else { print "Error: fail to add.\n"; } $memd->disconnect_all; EOF --sorted_result use test; SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # delete will only delete the InnoDB record, cache record still exists perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Delete G|Gossen:\n"; if ($memd->delete("G")) { print "Ok.\n"; } else { print "Error: G|Gossen doesn't exist.\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # ---------------------------------------------------------------- # Configure the "delete" operation to "cache_only", so overall # configuration would be: # get - caching # set - caching # delete - cache_only # ---------------------------------------------------------------- # Stop plugin before innodb_memcached configuration UNINSTALL PLUGIN daemon_memcached; use innodb_memcache; DELETE FROM cache_policies; INSERT INTO cache_policies VALUES("cache_policy", "caching", "caching", "cache_only", "innodb_only"); INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; SELECT SLEEP(2); perl; use DBI; use Cache::Memcached; print "----- Test delete (cache_only) -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Delete G|Gossen:\n"; if ($memd->delete("G","Gossen")) { print "Ok.\n"; } else { print "Error: fail to delete.\n"; } $memd->disconnect_all; EOF --sorted_result use test; SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # delete will only delete the cache record, InnoDB record still exists perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Delete E|Essen:\n"; if ($memd->delete("E")) { print "Ok.\n"; } else { print "Error: E|Essen doesn't exist.\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with E:\n"; $val = $memd->get("E"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # ---------------------------------------------------------------- # Configure the "delete" operation to "caching", so the overall # configuration is: # # get - caching # set - caching # delete - caching # ---------------------------------------------------------------- # Stop plugin before innodb_memcached configuration UNINSTALL PLUGIN daemon_memcached; use innodb_memcache; DELETE FROM cache_policies; INSERT INTO cache_policies VALUES("cache_policy", "caching", "caching", "caching", "innodb_only"); INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; SELECT SLEEP(2); perl; use DBI; use Cache::Memcached; print "----- Test delete (caching) -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "add G|Gossen:\n"; if ($memd->add("G","Gossen")) { print "Ok.\n"; } else { print "Error: fail to add.\n"; } $memd->disconnect_all; EOF --sorted_result use test; SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # delete will only delete the InnoDB record, cache record still exists perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Delete G|Gossen:\n"; if ($memd->delete("G")) { print "Ok.\n"; } else { print "Error: G|Gossen doesn't exist.\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # ---------------------------------------------------------------- # Configure the "flush" operation to "cache_only", so the overall # configuration is: # # get - cache_only (for testing flush's cache_only) # set - caching # delete - caching # flush - cache_only # ---------------------------------------------------------------- # Stop plugin before innodb_memcached configuration UNINSTALL PLUGIN daemon_memcached; use innodb_memcache; DELETE FROM cache_policies; INSERT INTO cache_policies VALUES("cache_policy", "cache_only", "caching", "cache_only", "cache_only"); INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; SELECT SLEEP(2); perl; use DBI; use Cache::Memcached; print "----- Test flush (cache_only) -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "add G|Gossen:\n"; if ($memd->add("G","Gossen")) { print "Ok.\n"; } else { print "Error: fail to add.\n"; } $memd->disconnect_all; EOF --sorted_result use test; SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after flush_all:\n"; $memd->flush_all; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # Row should still in the database (only cache is flushed) --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # ---------------------------------------------------------------- # Configure the "flush" operation to "caching", so the overall # configuration is: # # get - caching (for testing flush's cache_only) # set - caching # delete - caching # flush - caching # ---------------------------------------------------------------- # Stop plugin before innodb_memcached configuration UNINSTALL PLUGIN daemon_memcached; use innodb_memcache; DELETE FROM cache_policies; INSERT INTO cache_policies VALUES("cache_policy", "caching", "caching", "caching", "caching"); INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; SELECT SLEEP(2); perl; use DBI; use Cache::Memcached; print "----- Test flush (cache_only) -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "add G|Gossen:\n"; if ($memd->add("G","Gossen")) { print "Ok.\n"; } else { print "Error: fail to add.\n"; } $memd->disconnect_all; EOF --sorted_result use test; SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after flush_all:\n"; $memd->flush_all; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # Rows should be deleted from the InnoDB table --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # ---------------------------------------------------------------- # Configure the operation to "disabled", so the overall # configuration is: # # get - disabled # set - disabled # delete - disabled # flush - disabled # ---------------------------------------------------------------- # Stop plugin before innodb_memcached configuration UNINSTALL PLUGIN daemon_memcached; use innodb_memcache; DELETE FROM cache_policies; INSERT INTO cache_policies VALUES("cache_policy", "caching", "disabled", "disabled", "disabled"); INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; # Add some rows --sorted_result use test; delete from t1; INSERT INTO t1 VALUES ('D', 'Darmstadt', 0, 0, 0); INSERT INTO t1 VALUES ('B', 'Berlin', 0, 0, 0); INSERT INTO t1 VALUES ('C', 'Cottbus', 0, 0 ,0); INSERT INTO t1 VALUES ('H', 'Hamburg', 0, 0, 0); SELECT SLEEP(2); perl; use DBI; use Cache::Memcached; print "----- Test all operations disabled -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "add G|Gossen:\n"; if ($memd->add("G","Gossen")) { print "Ok.\n"; } else { print "Error: fail to add.\n"; } $memd->disconnect_all; EOF --sorted_result use test; SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after flush_all:\n"; $memd->flush_all; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # Rows should be deleted from the InnoDB table --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # ---------------------------------------------------------------- # Negative test, insert "junk" value to cache_policies # # ---------------------------------------------------------------- # Stop plugin before innodb_memcached configuration UNINSTALL PLUGIN daemon_memcached; use innodb_memcache; DELETE FROM cache_policies; INSERT IGNORE INTO cache_policies VALUES("junk", "junk", "caching", "cache_only", "disabled"); INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; SELECT SLEEP(2); perl; use DBI; use Cache::Memcached; print "----- Test with wrong policy name -----\n"; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "add G|Gossen:\n"; if ($memd->add("G","Gossen")) { print "Ok.\n"; } else { print "Error: fail to add.\n"; } $memd->disconnect_all; EOF --sorted_result use test; SELECT c1,c2 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after flush_all (flush disabled):\n"; $memd->flush_all; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF # Rows should be deleted from the InnoDB table --sorted_result SELECT c1,c2 FROM test.t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11247" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with G:\n"; $val = $memd->get("G"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF USE test; DROP TABLE t1; UNINSTALL PLUGIN daemon_memcached; DROP DATABASE innodb_memcache; SET @@global.tx_isolation= @tx_isolation;
Close