| 1 |
# Bug#20205934 - ENABLE VALGRIND FOR MEMCACHED TESTS |
| 2 |
source include/not_valgrind.inc; |
| 3 |
source include/have_memcached_plugin.inc; |
| 4 |
# Memcached SDI APIs are enabled only for debug version |
| 5 |
source include/have_debug.inc; |
| 6 |
|
| 7 |
--disable_query_log |
| 8 |
CALL mtr.add_suppression("daemon-memcached-w-batch-size': unsigned"); |
| 9 |
CALL mtr.add_suppression("Could not obtain server's UPN to be used as target service name"); |
| 10 |
CALL mtr.add_suppression("Warning: MySQL is trying to drop"); |
| 11 |
# We wiped out entire SDI created by Server. This is to avoid server |
| 12 |
# SDI interference with memcached inserted SDI. So server complains |
| 13 |
# on missing SDI |
| 14 |
CALL mtr.add_suppression("\\[Warning\\] .*MY-\\d+.* sdi_delete*"); |
| 15 |
# Create the memcached tables |
| 16 |
source include/memcache_config.inc; |
| 17 |
--enable_query_log |
| 18 |
|
| 19 |
INSERT INTO cache_policies VALUES('cache_policy', 'innodb_only', |
| 20 |
'innodb_only', 'innodb_only', 'innodb_only'); |
| 21 |
|
| 22 |
INSERT INTO config_options VALUES('separator', '|'); |
| 23 |
|
| 24 |
# describe table for memcache |
| 25 |
INSERT INTO containers VALUES ('desc_t1', 'test', 't1', |
| 26 |
'c1', 'c2', '0', '0', '0', 'PRIMARY'); |
| 27 |
|
| 28 |
USE test; |
| 29 |
let MEMCACHED_PORT=11291; |
| 30 |
|
| 31 |
CREATE TABLE t1(c1 VARCHAR(32), |
| 32 |
c2 VARCHAR(1024), |
| 33 |
primary key(c1)) |
| 34 |
ENGINE = INNODB; |
| 35 |
|
| 36 |
# Tables must exist before plugin can be started! |
| 37 |
--let $memcached_address=127.0.0.1:11291 |
| 38 |
--source ../include/load_daemon_memcached_expecting_success.inc |
| 39 |
|
| 40 |
# Case 1: Purge before restart of server |
| 41 |
|
| 42 |
# Clear the current SDI in table |
| 43 |
--let MEMCACHED_TABLE_MAPPING = desc_t1 |
| 44 |
--source ../include/sdi_drop_index.inc |
| 45 |
--source ../include/sdi_create_index.inc |
| 46 |
|
| 47 |
# Insert and Delete in SDI table via memcached |
| 48 |
--source ../include/sdi_insert_delete.inc |
| 49 |
|
| 50 |
# Finish the purge before restart |
| 51 |
SET GLOBAL innodb_fast_shutdown=0; |
| 52 |
--source include/restart_mysqld.inc |
| 53 |
|
| 54 |
--let $memcached_check_attempts=20 |
| 55 |
--let $memcached_expect=success |
| 56 |
--source ../include/check_daemon_memcached.inc |
| 57 |
# Case 2: Purge after kill & restart |
| 58 |
|
| 59 |
# Insert and Delete in DD_INFO table via memcached |
| 60 |
--source ../include/sdi_insert_delete.inc |
| 61 |
|
| 62 |
# Kill and restart |
| 63 |
--source include/kill_and_restart_mysqld.inc |
| 64 |
|
| 65 |
--let $memcached_check_attempts=20 |
| 66 |
--let $memcached_expect=success |
| 67 |
--source ../include/check_daemon_memcached.inc |
| 68 |
|
| 69 |
# Finish the purge |
| 70 |
SET GLOBAL innodb_fast_shutdown=0; |
| 71 |
--source include/restart_mysqld.inc |
| 72 |
|
| 73 |
--let $memcached_check_attempts=20 |
| 74 |
--let $memcached_expect=success |
| 75 |
--source ../include/check_daemon_memcached.inc |
| 76 |
|
| 77 |
# Stop plugin before innodb_memcached configuration |
| 78 |
UNINSTALL PLUGIN daemon_memcached; |
| 79 |
DROP TABLE t1; |
| 80 |
DROP DATABASE innodb_memcache; |