| 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 |
|
| 13 |
# Create the memcached tables |
| 14 |
--disable_query_log |
| 15 |
source include/memcache_config.inc; |
| 16 |
--enable_query_log |
| 17 |
|
| 18 |
INSERT INTO cache_policies VALUES("cache_policy", "innodb_only", |
| 19 |
"innodb_only", "innodb_only", "innodb_only"); |
| 20 |
|
| 21 |
INSERT INTO config_options VALUES("separator", "|"); |
| 22 |
|
| 23 |
# describe table for memcache |
| 24 |
INSERT INTO containers VALUES ("desc_t1", "test", "t1", |
| 25 |
"c1", "c2", "c3", "c4", "c5", "PRIMARY"); |
| 26 |
|
| 27 |
USE test; |
| 28 |
|
| 29 |
--disable_warnings |
| 30 |
DROP TABLE IF EXISTS t1; |
| 31 |
--enable_warnings |
| 32 |
CREATE TABLE t1 (c1 VARCHAR(32), |
| 33 |
c2 VARCHAR(1024), |
| 34 |
c3 INT, c4 BIGINT UNSIGNED, c5 INT, primary key(c1)) |
| 35 |
ENGINE = INNODB; |
| 36 |
|
| 37 |
INSERT INTO t1 VALUES ('B', 'Berlin', 0, 0, 0); |
| 38 |
|
| 39 |
--let $memcached_address=127.0.0.1:11249 |
| 40 |
--source ../include/load_daemon_memcached_expecting_success.inc |
| 41 |
|
| 42 |
begin; |
| 43 |
INSERT INTO t1 VALUES ('H', 'Hamburg', 0, 0, 0); |
| 44 |
|
| 45 |
perl; |
| 46 |
use DBI; |
| 47 |
use Cache::Memcached; |
| 48 |
my $memd = new Cache::Memcached { |
| 49 |
'servers' => [ "127.0.0.1:11249" ], |
| 50 |
'connect_timeout' => 20, |
| 51 |
'select_timeout' => 20 |
| 52 |
}; |
| 53 |
print "Here are the memcached results with H:\n"; |
| 54 |
$val = $memd->get("H"); |
| 55 |
if ($val) { print "$val\n"; } |
| 56 |
$memd->disconnect_all; |
| 57 |
EOF |
| 58 |
commit; |
| 59 |
|
| 60 |
DROP TABLE t1; |
| 61 |
|
| 62 |
# Stop plugin before innodb_memcached configuration |
| 63 |
UNINSTALL PLUGIN daemon_memcached; |
| 64 |
DROP DATABASE innodb_memcache; |