Debian Codegraph @

mysql-test/suite/memcached/t/memc255_change_containers_and_flush.test

raw
1 source include/not_valgrind.inc;
2 source include/have_memcached_plugin.inc;
3 source include/not_windows.inc;
4
5 --disable_query_log
6 CALL mtr.add_suppression("daemon-memcached-w-batch-size': unsigned");
7 CALL mtr.add_suppression("Could not obtain server's UPN to be used as target service name");
8 CALL mtr.add_suppression("Warning: MySQL is trying to drop");
9 --enable_query_log
10
11 --enable_connect_log
12 SET @transaction_isolation= @@global.transaction_isolation;
13 SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
14
15 # Create the memcached tables
16 --disable_query_log
17 source include/memcache_config.inc;
18 --enable_query_log
19
20 INSERT INTO cache_policies VALUES("cache_policy", "innodb_only",
21 "innodb_only", "innodb_only", "innodb_only");
22
23 INSERT INTO config_options VALUES("separator", "|");
24
25 # describe table for memcache
26 INSERT INTO containers VALUES ("desc_t1", "test", "t1",
27 "c1", "c2", "c3", "c4", "c5", "PRIMARY");
28
29 INSERT INTO containers VALUES ("desc_t2", "test", "t2",
30 "c1", "c2", "c3", "c4", "c5", "PRIMARY");
31 USE test;
32
33 --disable_warnings
34 DROP TABLE IF EXISTS t1;
35 --enable_warnings
36 CREATE TABLE t1 (c1 VARCHAR(32),
37 c2 VARCHAR(1024),
38 c3 INT, c4 BIGINT UNSIGNED, c5 INT, primary key(c1))
39 ENGINE = INNODB;
40 CREATE TABLE t2 LIKE t1;
41
42 INSERT INTO t1 VALUES ('D', 'Darmstadt', 0, 0, 0);
43 INSERT INTO t1 VALUES ('B', 'Berlin', 0, 0, 0);
44 INSERT INTO t1 VALUES ('C', 'Cottbus', 0, 0 ,0);
45 INSERT INTO t1 VALUES ('H', 'Hamburg', 0, 0, 0);
46
47 # Tables must exist before plugin can be started!
48 --let $memcached_address=127.0.0.1:11255
49 --source ../include/load_daemon_memcached_expecting_success.inc
50
51 perl;
52 use DBI;
53 use Cache::Memcached;
54
55 my $memd = new Cache::Memcached {
56 'servers' => [ "127.0.0.1:11255" ],
57 'connect_timeout' => 20,
58 'select_timeout' => 20,
59 };
60
61 $key = '@@desc_t1';
62 $val=$memd->get($key);
63 print "Get $key returned $val\n";
64 $key = '@@desc_t2';
65 $val=$memd->get($key);
66 print "Get $key returned $val\n";
67 $res = $memd->flush_all;
68 print "Flush all returned $res\n";
69 $memd->disconnect_all;
70
71 EOF
72
73
74 # Stop plugin before innodb_memcached configuration
75 UNINSTALL PLUGIN daemon_memcached;
76
77 DROP TABLE t1;
78 DROP TABLE t2;
79
80 DROP DATABASE innodb_memcache;
81
82 SET @@global.transaction_isolation= @transaction_isolation;