Debian Codegraph @

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

raw
1 source include/have_memcached_plugin.inc;
2 source include/not_valgrind.inc;
3 source include/have_log_bin.inc;
4 source include/not_windows.inc;
5
6 --disable_query_log
7 CALL mtr.add_suppression("daemon-memcached-w-batch-size': unsigned");
8 CALL mtr.add_suppression("Could not obtain server's UPN to be used as target service name");
9 CALL mtr.add_suppression("Warning: MySQL is trying to drop");
10 --enable_query_log
11
12 --enable_connect_log
13 SET @transaction_isolation= @@global.transaction_isolation;
14 SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
15
16 # Create the memcached tables
17 --disable_query_log
18 source include/memcache_config.inc;
19 --enable_query_log
20
21 INSERT INTO cache_policies VALUES("cache_policy", "innodb_only",
22 "innodb_only", "innodb_only", "innodb_only");
23
24 INSERT INTO config_options VALUES("separator", "|");
25
26 # describe table for memcache
27 INSERT INTO containers VALUES ("desc_t1", "test", "t1",
28 "c1", "c2,c21", "c3", "c4", "c5", "PRIMARY");
29
30 USE test;
31
32 --disable_warnings
33 DROP TABLE IF EXISTS t1;
34 --enable_warnings
35 CREATE TABLE t1 (c1 VARCHAR(32),
36 c2 VARCHAR(1024),
37 c21 VARCHAR(1024),
38 c3 INT, c4 BIGINT UNSIGNED, c5 INT, primary key(c1))
39 ENGINE = INNODB;
40
41 INSERT INTO t1 VALUES ('D', 'Darmstadt', 'City', 0, 0, 0);
42 INSERT INTO t1 VALUES ('B', 'Berlin', 'Mitte', 0, 0, 0);
43 INSERT INTO t1 VALUES ('C', 'Cottbus', 'West', 0, 0 ,0);
44 INSERT INTO t1 VALUES ('H', 'Hamburg', 'Norderstedt', 0, 0, 0);
45
46 # Tables must exist before plugin can be started!
47 --let $memcached_address=127.0.0.1:11297
48 --source ../include/load_daemon_memcached_expecting_success.inc
49
50 --sorted_result
51 SELECT c1,c2,c21 FROM t1;
52
53 --echo Bug 25909540 UNINSTALL PLUGIN DAEMON_MEMCACHED MAKE MYSQLD CRASHED
54
55 # Though the issue is not observed on trunk, the test case is
56 # retained since it is a basic scenario.
57
58 #Note:- innodb_api_enable_binlog=1 should be enabled
59 perl;
60 use Cache::Memcached;
61
62 my $port = $ENV{'MASTER_MYPORT'};
63 my $client = $ENV{'MYSQL'};
64
65 print "\n Connect to the memcached server and do a get";
66 my $memd = new Cache::Memcached {
67 'servers' => [ "127.0.0.1:11297" ]
68 };
69
70 $val = $memd->get("D");
71
72 print "\n Uninstall the memcached plugin,with a memcached connection present";
73 print "\n and load the plugin again.\n";
74
75 my $test_sql = "UNINSTALL PLUGIN daemon_memcached;".
76 "INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so';";
77
78 $cmd="$client --host=127.0.0.1 -P $port -uroot -e\"$test_sql\"";
79 system($cmd);
80
81 $memd->disconnect_all;
82 EOF
83
84 DROP TABLE t1;
85
86 UNINSTALL PLUGIN daemon_memcached;
87 DROP DATABASE innodb_memcache;
88
89 SET @@global.transaction_isolation= @transaction_isolation;
90