Current Path : /home/usr.opt/mysql57/mysql-test/suite/memcached/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/memcached/t/memc276_1_table.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 --enable_connect_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", "innodb_only", "innodb_only", "innodb_only", "innodb_only"); INSERT INTO config_options VALUES("separator", "|"); INSERT INTO config_options VALUES("table_map_delimiter", "."); # describe table for memcache INSERT INTO containers VALUES ("desct11", "test", "t1", "c1", "c2,c21,c22,c23,c24,c25,c26,c27", "c3", "c4", "c5", "PRIMARY"); INSERT INTO containers VALUES ("desct12", "test", "t1", "c2", "c1, c2", "c3", "c4", "c5", "i12"); INSERT INTO containers VALUES ("desct13", "test", "t1", "c2", "c1,c21", "c3", "c4", "c5", "i12"); INSERT INTO containers VALUES ("desct14", "test", "t1", "c21", "c1,c23,c22", "c3", "c4", "c5", "i14"); INSERT INTO containers VALUES ("desct15", "test", "t1", "c23", "c1,c21,c22,c24", "c3", "c4", "c5", "i15"); INSERT INTO containers VALUES ("desct16", "test", "t1", "c25", "c23,c24,c27,c1", "c3", "c4", "c5", "i16"); INSERT INTO containers VALUES ("desct17", "test", "t1", "c26", "c2, c1", "c3", "c4", "c5", "i17"); USE test; --disable_warnings DROP TABLE IF EXISTS t1,t2; --enable_warnings CREATE TABLE t1 (c1 VARCHAR(32), c2 VARCHAR(512), c21 VARCHAR(767), c22 VARCHAR(512), c23 VARCHAR(128), c24 VARCHAR(24), c25 VARCHAR(512), c26 VARCHAR(128), c27 VARCHAR(128), c3 INT, c4 BIGINT UNSIGNED, c5 INT, primary key(c1)) ENGINE = INNODB; INSERT INTO t1 VALUES ('D','Duesseldorf','City','98765','Hafen','1','A','a','Z',0,0,0); INSERT INTO t1 VALUES ('O','Oldenburg','Mitte','87654','Deich','2','B','b','Y',0,0,0); INSERT INTO t1 VALUES ('K','Koeln','West','76543','Rhein','3','C','c','X',0,0,0); INSERT INTO t1 VALUES ('S','Stuttgart','Nord','65432','Fernsehturm','4','D','d','U',0,0,0); CREATE UNIQUE INDEX i12 ON t1(c2); CREATE UNIQUE INDEX i14 ON t1(c21); CREATE UNIQUE INDEX i15 ON t1(c23); CREATE UNIQUE INDEX i16 ON t1(c25); CREATE UNIQUE INDEX i17 ON t1(c26); # Tables must exist before plugin can be started! INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so'; # The following selects are writing all to memcache otherwise memcache is empty. --sorted_result SELECT c1,c2,c21,c22,c23,c24,c25,c26,c27 FROM t1; SELECT SLEEP(2); perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11276" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with D,O,K,S of default:\n"; $val = $memd->get("D"); if ($val) { print "$val\n"; } $val = $memd->get("O"); if ($val) { print "$val\n"; } $val = $memd->get("K"); if ($val) { print "$val\n"; } $val = $memd->get("S"); 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:11276" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results with c1 of desct11:\n"; $val = $memd->get('@@desct11.D'); if ($val) { print "$val\n"; } $val = $memd->get("\@\@desct11.O"); if ($val) { print "$val\n"; } $val = $memd->get('@@desct11.'.'K'); if ($val) { print "$val\n"; } $val = $memd->get('@@desct11.S'); if ($val) { print "$val\n"; } print "Here the memcached results with c2 of desct13:\n"; $val = $memd->get('@@desct13'); if ($val) { print "$val\n"; } $val = $memd->get('Duesseldorf'); if ($val) { print "$val\n"; } $val = $memd->get("Oldenburg"); if ($val) { print "$val\n"; } $val = $memd->get('Koeln'); if ($val) { print "$val\n"; } $val = $memd->get('Stuttgart'); if ($val) { print "$val\n"; } print "Here the memcached results with c2 of desct12:\n"; $val = $memd->get('@@desct12'); if ($val) { print "$val\n"; } $val = $memd->get('Duesseldorf'); if ($val) { print "$val\n"; } $val = $memd->get("Oldenburg"); if ($val) { print "$val\n"; } $val = $memd->get('@@desct12.Koeln'); if ($val) { print "$val\n"; } $val = $memd->get('Stuttgart'); if ($val) { print "$val\n"; } print "Here the memcached results with c2,c21,c22 of desct14:\n"; $val = $memd->get('@@desct14.City'); if ($val) { print "$val\n"; } $val = $memd->get("\@\@desct14.Mitte"); if ($val) { print "$val\n"; } $val = $memd->get('@@desct14.West'); if ($val) { print "$val\n"; } $val = $memd->get('@@desct14.Nord'); if ($val) { print "$val\n"; } print "Here the memcached results with c2,c21,c22,c23 of desct15:\n"; $val = $memd->get('@@desct15.Hafen'); if ($val) { print "$val\n"; } $val = $memd->get("\@\@desct15.Deich"); if ($val) { print "$val\n"; } $val = $memd->get('@@desct15.Rhein'); if ($val) { print "$val\n"; } $val = $memd->get('@@desct15.Fernsehturm'); if ($val) { print "$val\n"; } print "Here the memcached results with c23,c24,c25,c26 of desct16:\n"; $val = $memd->get('@@desct16.A'); if ($val) { print "$val\n"; } $val = $memd->get("\@\@desct16.C"); if ($val) { print "$val\n"; } $val = $memd->get('@@desct16.D'); if ($val) { print "$val\n"; } $val = $memd->get('@@desct16.B'); if ($val) { print "$val\n"; } print "Here the memcached results with c26 of desct17:\n"; $val = $memd->get('@@desct17.c'); if ($val) { print "$val\n"; } $val = $memd->get("\@\@desct17.b"); if ($val) { print "$val\n"; } $val = $memd->get('@@desct17.a'); if ($val) { print "$val\n"; } $val = $memd->get('@@desct17.d'); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2,c21,c22,c23,c24,c25,c26,c27 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11276" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after set in desct12:\n"; $val = $memd->get("\@\@desct12"); $val = $memd->set("Essen","E|Essen"); $val= $memd->get("Essen"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2,c21,c22,c23,c24,c25,c26,c27 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11276" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after set in desct13:\n"; $val = $memd->set("\@\@desct13.Essen","E|Neustadt"); $val = $memd->get("\@\@desct13.Essen"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2,c21,c22,c23,c24,c25,c26,c27 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11276" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after set in desct14:\n"; $val = $memd->set("\@\@desct14.Altstadt","E|Hafen|111111"); $val = $memd->get("\@\@desct14.Altstadt"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2,c21,c22,c23,c24,c25,c26,c27 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11276" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after set in desct15:\n"; $val = $memd->set('@@desct15.Mahl',"E|Mitte|111111|E"); $val = $memd->get("\@\@desct15.Mahl"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2,c21,c22,c23,c24,c25,c26,c27 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11276" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after set in desct16:\n"; $val = $memd->set('@@desct16.E',"Mahlzeit|111111|T|E"); $val = $memd->get("\@\@desct16.E"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2,c21,c22,c23,c24,c25,c26,c27 FROM t1; perl; use DBI; use Cache::Memcached; my $memd = new Cache::Memcached { 'servers' => [ "127.0.0.1:11276" ], 'connect_timeout' => 20, 'select_timeout' => 20 }; print "Here the memcached results after set in desct17:\n"; $val = $memd->set("\@\@desct17.e","Essen|E"); $val = $memd->get("\@\@desct17.e"); if ($val) { print "$val\n"; } $memd->disconnect_all; EOF --sorted_result SELECT c1,c2,c21,c22,c23,c24,c25,c26,c27 FROM t1; DROP TABLE t1; UNINSTALL PLUGIN daemon_memcached; DROP DATABASE innodb_memcache; SET @@global.tx_isolation= @tx_isolation;