List:Commits« Previous MessageNext Message »
From:horst.hunger Date:March 9 2012 4:08pm
Subject:bzr push into mysql-trunk-wl5824 branch (horst.hunger:3849 to 3850) WL#5824
View as plain text  
 3850 horst.hunger@stripped	2012-03-09
      WL#5824: added another r_batch_size test.

    added:
      mysql-test/suite/memcached/r/memc263_r_batch_4.result
      mysql-test/suite/memcached/t/memc263_r_batch_4-master.opt
      mysql-test/suite/memcached/t/memc263_r_batch_4.test
 3849 Jimmy Yang	2012-03-09
      Add memc250_container.test for container related testing

    added:
      mysql-test/suite/memcached/r/memc250_container.result
      mysql-test/suite/memcached/t/memc250_container-master.opt
      mysql-test/suite/memcached/t/memc250_container.test
    modified:
      mysql-test/suite/memcached/t/memc247_cache_policy-master.opt
      plugin/innodb_memcached/innodb_memcache/src/innodb_api.c
=== added file 'mysql-test/suite/memcached/r/memc263_r_batch_4.result'
--- a/mysql-test/suite/memcached/r/memc263_r_batch_4.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/memcached/r/memc263_r_batch_4.result	2012-03-09 16:07:41 +0000
@@ -0,0 +1,45 @@
+SET @tx_isolation= @@global.tx_isolation;
+SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+UNINSTALL PLUGIN daemon_memcached;
+INSERT INTO cache_policies VALUES("cache_policy", "innodb_only",
+"innodb_only", "innodb_only", "innodb_only");
+INSERT INTO config_options VALUES("separator", "|");
+INSERT INTO containers VALUES ("desc_t1", "test", "t1",
+"c1", "c2,c21", "c3", "c4", "c5", "PRIMARY");
+USE test;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1        (c1 VARCHAR(32),
+c2 VARCHAR(1024),
+c21 VARCHAR(1024),
+c3 INT, c4 BIGINT UNSIGNED, c5 INT, primary key(c1))
+ENGINE = INNODB;
+INSERT INTO t1 VALUES ('D', 'Darmstadt', 'City', 0, 0, 0);
+INSERT INTO t1 VALUES ('B', 'Berlin', 'Mitte', 0, 0, 0);
+INSERT INTO t1 VALUES ('C', 'Cottbus', 'West', 0, 0 ,0);
+INSERT INTO t1 VALUES ('H', 'Hamburg', 'Norderstedt', 0, 0, 0);
+INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so';
+SELECT @@global.daemon_memcached_r_batch_size;
+@@global.daemon_memcached_r_batch_size
+1073741824
+SET @@global.daemon_memcached_r_batch_size=100;
+ERROR HY000: Variable 'daemon_memcached_r_batch_size' is a read only variable
+SELECT c1,c2,c21 FROM t1;
+c1	c2	c21
+B	Berlin	Mitte
+C	Cottbus	West
+D	Darmstadt	City
+H	Hamburg	Norderstedt
+Here the memcached results with D,B,H,C:
+Darmstadt|City
+Berlin|Mitte
+Hamburg|Norderstedt
+Cottbus|West
+SELECT c1,c2,c21 FROM t1;
+c1	c2	c21
+B	Berlin	Mitte
+C	Cottbus	West
+D	Darmstadt	City
+H	Hamburg	Norderstedt
+DROP TABLE t1;
+DROP DATABASE innodb_memcache;
+SET @@global.tx_isolation= @tx_isolation;

=== added file 'mysql-test/suite/memcached/t/memc263_r_batch_4-master.opt'
--- a/mysql-test/suite/memcached/t/memc263_r_batch_4-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/memcached/t/memc263_r_batch_4-master.opt	2012-03-09 16:07:41 +0000
@@ -0,0 +1,5 @@
+$DAEMON_MEMCACHED_OPT
+$DAEMON_MEMCACHED_LOAD
+--loose-daemon_memcached_r_batch_size=2
+--loose-daemon_memcached_engine_lib_path=$INNODB_ENGINE_DIR
+--loose-daemon_memcached_option="-p11263"

=== added file 'mysql-test/suite/memcached/t/memc263_r_batch_4.test'
--- a/mysql-test/suite/memcached/t/memc263_r_batch_4.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/memcached/t/memc263_r_batch_4.test	2012-03-09 16:07:41 +0000
@@ -0,0 +1,122 @@
+--disable_query_log
+CALL mtr.add_suppression("daemon-memcached-r-batch-size': unsigned value");
+CALL mtr.add_suppression("Could not obtain server's UPN to be used as target service name");
+CALL mtr.add_suppression("InnoDB: Warning: MySQL is trying to drop");
+--enable_query_log
+
+source include/not_windows.inc;
+source include/have_innodb.inc;
+
+--enable_connect_log
+SET @auto_commit= @@global.autocommit;
+SET @@global.autocommit=0;
+SET @tx_isolation= @@global.tx_isolation;
+SET GLOBAL TRANSACTION ISOLATION LEVEL SERIALIZABLE;
+SET @wait= @@global.wait_timeout;
+SET @@global.wait_timeout=1;
+SET @@global.lock_wait_timeout=1;
+SET @@global.innodb_lock_wait_timeout=1;
+
+# Stop plugin befor innodb_memcached configuration
+UNINSTALL PLUGIN daemon_memcached;
+
+# Create the memcached tables
+--disable_query_log
+source suite/memcached/inc/memcache_config.inc;
+--enable_query_log
+
+INSERT INTO cache_policies VALUES("cache_policy", "innodb_only",
+				  "innodb_only", "innodb_only", "innodb_only");
+
+INSERT INTO config_options VALUES("separator", "|");
+
+# describe table for memcache
+INSERT INTO containers VALUES ("desc_t1", "test", "t1",
+			       "c1", "c2,c21", "c3", "c4", "c5", "PRIMARY");
+
+CREATE USER mysqltest1@localhost;
+COMMIT;
+connect (mysqltest1,localhost,mysqltest1,,);
+connection mysqltest1;
+
+USE test;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE t1        (c1 VARCHAR(32),
+			c2 VARCHAR(1024),
+			c21 VARCHAR(1024),
+			c3 INT, c4 BIGINT UNSIGNED, c5 INT, primary key(c1))
+ENGINE = INNODB;
+
+INSERT INTO t1 VALUES ('D', 'Darmstadt', 'City', 0, 0, 0);
+INSERT INTO t1 VALUES ('B', 'Berlin', 'Mitte', 0, 0, 0);
+INSERT INTO t1 VALUES ('C', 'Cottbus', 'West', 0, 0 ,0);
+INSERT INTO t1 VALUES ('H', 'Hamburg', 'Norderstedt', 0, 0, 0);
+COMMIT;
+
+connection default;
+# Tables must exist before plugin can be started!
+INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so';
+SELECT @@global.daemon_memcached_r_batch_size;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+SET @@global.daemon_memcached_r_batch_size=100;
+
+connection mysqltest1;
+
+# The following select is writing all to  memcache otherwisw memcache is empty.
+--sorted_result
+SELECT c1,c2,c21 FROM t1;
+COMMIT;
+
+connection default;
+perl;
+use DBI;
+use Cache::Memcached;
+my $memd = new Cache::Memcached {
+  'servers' => [ "127.0.0.1:11263" ]
+};
+print "Here the memcached results:\n";
+$val = $memd->get("B");
+if ($val) { print "$val\n"; }
+$val = $memd->get("C");
+if ($val) { print "$val\n"; }
+$memd->disconnect_all;
+EOF
+--sorted_result
+SELECT c1,c2,c21 FROM test.t1;
+
+connection mysqltest1;
+--sorted_result
+SELECT c1,c2,c21 FROM t1 FOR UPDATE;
+#ROLLBACK;
+
+connection default;
+perl;
+use DBI;
+use Cache::Memcached;
+my $memd = new Cache::Memcached {
+  'servers' => [ "127.0.0.1:11263" ]
+};
+print "Here the memcached results:\n";
+$val = $memd->get("D");
+if ($val) { print "$val\n"; }
+$memd->disconnect_all;
+EOF
+--sorted_result
+SELECT c1,c2,c21 FROM test.t1;
+
+connection mysqltest1;
+--error 1205
+SELECT c1,c2,c21 FROM test.t1 FOR UPDATE;
+DROP TABLE test.t1;
+
+connection default;
+disconnect mysqltest1;
+DROP DATABASE innodb_memcache;
+DROP USER mysqltest1@localhost;
+ 
+SET @@global.tx_isolation= @tx_isolation;
+SET  @@global.autocommit=@auto_commit;
+SET @@global.wait_timeout=@wait;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl5824 branch (horst.hunger:3849 to 3850) WL#5824horst.hunger12 Mar