| 1 |
# Bug#20205934 - ENABLE VALGRIND FOR MEMCACHED TESTS |
| 2 |
# |
| 3 |
source include/not_valgrind.inc; |
| 4 |
source include/have_memcached_plugin.inc; |
| 5 |
# Memcached SDI APIs are enabled only for debug version |
| 6 |
source include/have_debug.inc; |
| 7 |
|
| 8 |
--disable_query_log |
| 9 |
CALL mtr.add_suppression("daemon-memcached-w-batch-size': unsigned"); |
| 10 |
CALL mtr.add_suppression("Could not obtain server's UPN to be used as target service name"); |
| 11 |
CALL mtr.add_suppression("Warning: MySQL is trying to drop"); |
| 12 |
# Create the memcached tables |
| 13 |
source include/memcache_config.inc; |
| 14 |
--enable_query_log |
| 15 |
|
| 16 |
INSERT INTO cache_policies VALUES('cache_policy', 'innodb_only', |
| 17 |
'innodb_only', 'innodb_only', 'innodb_only'); |
| 18 |
|
| 19 |
INSERT INTO config_options VALUES('separator', '|'); |
| 20 |
|
| 21 |
# describe table for memcache |
| 22 |
INSERT INTO containers VALUES ('desc_t1', 'test', 't1', |
| 23 |
'c1', 'c2', '0', '0', '0', 'PRIMARY'); |
| 24 |
|
| 25 |
USE test; |
| 26 |
let MEMCACHED_PORT=11288; |
| 27 |
|
| 28 |
--echo # Case 1. Test with uncompressed tables; |
| 29 |
SET DEBUG = '+d, skip_sdi'; |
| 30 |
CREATE TABLE t1(c1 VARCHAR(32), |
| 31 |
c2 VARCHAR(1024), |
| 32 |
primary key(c1)) |
| 33 |
ENGINE = INNODB; |
| 34 |
SET DEBUG = '-d, skip_sdi'; |
| 35 |
|
| 36 |
# Tables must exist before plugin can be started! |
| 37 |
--let $memcached_address=127.0.0.1:11288 |
| 38 |
--source ../include/load_daemon_memcached_expecting_success.inc |
| 39 |
|
| 40 |
# Clear the current SDI in table |
| 41 |
--let MEMCACHED_TABLE_MAPPING = desc_t1 |
| 42 |
--source ../include/sdi_drop_index.inc |
| 43 |
--source ../include/sdi_create_index.inc |
| 44 |
|
| 45 |
# Insert into SDI tables via memcached |
| 46 |
--source ../include/sdi_insert_delete.inc |
| 47 |
SET DEBUG = '+d, skip_sdi'; |
| 48 |
DROP TABLE t1; |
| 49 |
SET DEBUG = '-d, skip_sdi'; |
| 50 |
|
| 51 |
--echo # Case 2. Test with Compressed tables |
| 52 |
SET DEBUG = '+d, skip_sdi'; |
| 53 |
CREATE TABLE t1(c1 VARCHAR(32), |
| 54 |
c2 VARCHAR(1024), |
| 55 |
primary key(c1)) |
| 56 |
ENGINE = INNODB KEY_BLOCK_SIZE=1 ROW_FORMAT=COMPRESSED; |
| 57 |
SET DEBUG = '-d, skip_sdi'; |
| 58 |
|
| 59 |
# Clear the current SDI in table |
| 60 |
--source ../include/sdi_drop_index.inc |
| 61 |
--source ../include/sdi_create_index.inc |
| 62 |
|
| 63 |
# Insert into SDI tables via memcached |
| 64 |
--source ../include/sdi_insert_delete.inc |
| 65 |
SET DEBUG = '+d, skip_sdi'; |
| 66 |
DROP TABLE t1; |
| 67 |
SET DEBUG = '-d, skip_sdi'; |
| 68 |
|
| 69 |
--echo # Case 3. Test with General tablespaces |
| 70 |
SET DEBUG = '+d, skip_sdi'; |
| 71 |
CREATE TABLESPACE ts1 ADD DATAFILE 'ts1.ibd'; |
| 72 |
CREATE TABLE t1(c1 VARCHAR(32), |
| 73 |
c2 VARCHAR(1024), |
| 74 |
primary key(c1)) |
| 75 |
ENGINE = INNODB TABLESPACE=ts1; |
| 76 |
SET DEBUG = '-d, skip_sdi'; |
| 77 |
|
| 78 |
# Clear the current SDI in table |
| 79 |
--source ../include/sdi_drop_index.inc |
| 80 |
--source ../include/sdi_create_index.inc |
| 81 |
|
| 82 |
--source ../include/sdi_insert_delete.inc |
| 83 |
|
| 84 |
SET DEBUG = '+d, skip_sdi'; |
| 85 |
DROP TABLE t1; |
| 86 |
DROP TABLESPACE ts1; |
| 87 |
SET DEBUG = '-d, skip_sdi'; |
| 88 |
|
| 89 |
# Stop plugin before innodb_memcached configuration |
| 90 |
UNINSTALL PLUGIN daemon_memcached; |
| 91 |
DROP DATABASE innodb_memcache; |