| 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 |
INSERT INTO config_options VALUES("table_map_delimiter", "."); |
| 25 |
|
| 26 |
|
| 27 |
--echo # |
| 28 |
--echo #Bug 20391552 CRASH DURING MEMCACHE WORKLOAD |
| 29 |
--echo # |
| 30 |
|
| 31 |
|
| 32 |
# describe table for memcache |
| 33 |
INSERT INTO containers VALUES ("desc_t1", "test", "t1", |
| 34 |
"c1", "c2", "c3", "c4", "c5", "PRIMARY"); |
| 35 |
|
| 36 |
USE test; |
| 37 |
|
| 38 |
--disable_warnings |
| 39 |
DROP TABLE IF EXISTS t1; |
| 40 |
--enable_warnings |
| 41 |
|
| 42 |
CREATE TABLE t1 (c1 VARCHAR(32), |
| 43 |
c2 VARCHAR(1024), |
| 44 |
c3 INT, c4 BIGINT UNSIGNED, c5 INT, primary key(c1)) |
| 45 |
ENGINE = INNODB; |
| 46 |
|
| 47 |
# Tables must exist before plugin can be started! |
| 48 |
--let $memcached_address=127.0.0.1:11283 |
| 49 |
--source ../include/load_daemon_memcached_expecting_success.inc |
| 50 |
|
| 51 |
--sorted_result |
| 52 |
SELECT c1,c2 FROM t1; |
| 53 |
|
| 54 |
perl; |
| 55 |
use DBI; |
| 56 |
use Cache::Memcached; |
| 57 |
my $memd = new Cache::Memcached { |
| 58 |
'servers' => [ "127.0.0.1:11283" ], |
| 59 |
'connect_timeout' => 20, |
| 60 |
'select_timeout' => 20 |
| 61 |
}; |
| 62 |
$val = $memd->get("1"); |
| 63 |
if ($memd->add("E","Essen")) { |
| 64 |
print "Ok.\n"; |
| 65 |
} |
| 66 |
else { |
| 67 |
print "Error: E|Essen is still existing.\n"; |
| 68 |
} |
| 69 |
$memd->disconnect_all; |
| 70 |
EOF |
| 71 |
|
| 72 |
--sorted_result |
| 73 |
SELECT c1,c2 FROM t1; |
| 74 |
DROP TABLE t1; |
| 75 |
|
| 76 |
UNINSTALL PLUGIN daemon_memcached; |
| 77 |
DROP DATABASE innodb_memcache; |
| 78 |
|
| 79 |
SET @@global.transaction_isolation= @transaction_isolation; |