251 lines
6.5 KiB
Plaintext
251 lines
6.5 KiB
Plaintext
SET @transaction_isolation= @@global.transaction_isolation;
|
|
SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
|
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");
|
|
INSERT INTO containers VALUES ("int_test", "test", "int_test",
|
|
"k", "v", "", "", "", "PRIMARY");
|
|
USE test;
|
|
DROP TABLE IF EXISTS int_test;
|
|
DROP TABLE IF EXISTS t1;
|
|
CREATE TABLE t1 (c1 VARCHAR(32),
|
|
c2 INT,
|
|
c21 VARCHAR(1024),
|
|
c3 INT, c4 BIGINT UNSIGNED, c5 INT, primary key(c1))
|
|
ENGINE = INNODB;
|
|
CREATE TABLE int_test (k varchar(32),
|
|
v int unsigned NOT NULL, PRIMARY KEY (k)) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES ('D', 1, 'City', 0, 0, 0);
|
|
INSERT INTO t1 VALUES ('B', 2, 'Mitte', 0, 0, 0);
|
|
INSERT INTO t1 VALUES ('C', 3, 'West', 0, 0 ,0);
|
|
INSERT INTO t1 VALUES ('H', 4, 'Norderstedt', 0, 0, 0);
|
|
INSTALL PLUGIN daemon_memcached SONAME 'libmemcached.so';
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 Mitte
|
|
C 3 West
|
|
D 1 City
|
|
H 4 Norderstedt
|
|
Here are the memcached results with D,B,H,C:
|
|
1|City
|
|
2|Mitte
|
|
4|Norderstedt
|
|
3|West
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 Mitte
|
|
C 3 West
|
|
D 1 City
|
|
H 4 Norderstedt
|
|
Here are the memcached results after set:
|
|
5|Ost
|
|
Here are the memcached results after set min border:
|
|
-2147483648|Ost
|
|
Here are the memcached results after set max border:
|
|
2147483647|Ost
|
|
Here are the memcached results after set over max border:
|
|
-2147483648|Ost
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 Mitte
|
|
C 3 West
|
|
D 1 City
|
|
E -2147483648 Ost
|
|
H 4 Norderstedt
|
|
Here are the memcached results after set:
|
|
6|Sofia
|
|
Here are the memcached results after calling incr 10:
|
|
16|
|
|
Here are the memcached results after calling decr 4:
|
|
12|
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 Mitte
|
|
C 3 West
|
|
D 1 City
|
|
E -2147483648 Ost
|
|
H 4 Norderstedt
|
|
ALTER TABLE t1 MODIFY c2 varchar(20);
|
|
Here are the memcached results with D,B,H,C:
|
|
1|City
|
|
2|Mitte
|
|
4|Norderstedt
|
|
3|West
|
|
Here are the memcached results after set:
|
|
5|Ost-VARCHAR
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 Mitte
|
|
C 3 West
|
|
D 1 City
|
|
E 5 Ost-VARCHAR
|
|
H 4 Norderstedt
|
|
ALTER TABLE t1 MODIFY c2 BIGINT;
|
|
Here are the memcached results with D,B,H,C:
|
|
1|City
|
|
2|Mitte
|
|
4|Norderstedt
|
|
3|West
|
|
Here are the memcached results after set:
|
|
5|Ost-BIGINT
|
|
Here are the memcached results after set min border:
|
|
-9223372036854775808|Ost
|
|
Here are the memcached results after set max border:
|
|
9223372036854775807|Ost
|
|
Here are the memcached results after set over max border:
|
|
9223372036854775807|Ost
|
|
Here are the memcached results after add:
|
|
-1|Beijing-Signed-BIGINT
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 Mitte
|
|
C 3 West
|
|
D 1 City
|
|
E 9223372036854775807 Ost
|
|
F -1 Beijing-Signed-BIGINT
|
|
H 4 Norderstedt
|
|
SET sql_mode='NO_ENGINE_SUBSTITUTION';
|
|
ALTER TABLE t1 MODIFY c2 SMALLINT;
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c2' at row 4
|
|
Here are the memcached results with D,B,H,C:
|
|
1|City
|
|
2|Mitte
|
|
4|Norderstedt
|
|
3|West
|
|
Here are the memcached results after set:
|
|
5|Ost-SMALLINT
|
|
Here are the memcached results after set min border:
|
|
-32768|Ost
|
|
Here are the memcached results after set max border:
|
|
32767|Ost
|
|
Here are the memcached results after set over max border:
|
|
-32768|Ost
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 Mitte
|
|
C 3 West
|
|
D 1 City
|
|
E -32768 Ost
|
|
F -1 Beijing-Signed-BIGINT
|
|
H 4 Norderstedt
|
|
ALTER TABLE t1 MODIFY c2 TINYINT;
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c2' at row 4
|
|
Here are the memcached results with D,B,H,C:
|
|
1|City
|
|
2|Mitte
|
|
4|Norderstedt
|
|
3|West
|
|
Here are the memcached results after set:
|
|
5|Ost-TINYINT
|
|
Here are the memcached results after set min border:
|
|
-128|Ost
|
|
Here are the memcached results after set max border:
|
|
127|Ost
|
|
Here are the memcached results after set over max border:
|
|
-127|Ost
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 Mitte
|
|
C 3 West
|
|
D 1 City
|
|
E -127 Ost
|
|
F -1 Beijing-Signed-BIGINT
|
|
H 4 Norderstedt
|
|
ALTER TABLE t1 MODIFY c2 BIGINT UNSIGNED;
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c2' at row 4
|
|
Warning 1264 Out of range value for column 'c2' at row 5
|
|
Here are the memcached results with D,B,H,C:
|
|
1|City
|
|
2|Mitte
|
|
4|Norderstedt
|
|
3|West
|
|
Here are the memcached results after set:
|
|
5|Ost-BIGINT-UNSIGNED
|
|
Here are the memcached results after set max border:
|
|
18446744073709551615|Ost
|
|
Here are the memcached results after set over max border:
|
|
18446744073709551615|Ost
|
|
ALTER TABLE t1 MODIFY c21 BIGINT UNSIGNED;
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: 'Mitte' for column 'c21' at row 1
|
|
Warning 1366 Incorrect integer value: 'West' for column 'c21' at row 2
|
|
Warning 1366 Incorrect integer value: 'City' for column 'c21' at row 3
|
|
Warning 1366 Incorrect integer value: 'Ost' for column 'c21' at row 4
|
|
Warning 1366 Incorrect integer value: 'Beijing-Signed-BIGINT' for column 'c21' at row 5
|
|
Warning 1366 Incorrect integer value: 'Norderstedt' for column 'c21' at row 6
|
|
Here are the memcached results with D,B,H,C:
|
|
1|0
|
|
2|0
|
|
4|0
|
|
3|0
|
|
Here are the memcached results after set:
|
|
5|5
|
|
Here are the memcached results after set max border:
|
|
18446744073709551615|18446744073709551615
|
|
Here are the memcached results after set over max border:
|
|
18446744073709551615|18446744073709551615
|
|
Here are the memcached results after append:
|
|
Append to integer value is not supported.
|
|
18446744073709551615|18446744073709551615
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 0
|
|
C 3 0
|
|
D 1 0
|
|
E 18446744073709551615 18446744073709551615
|
|
F 0 0
|
|
H 4 0
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
B 2 0
|
|
C 3 0
|
|
D 1 0
|
|
E 18446744073709551615 18446744073709551615
|
|
F 0 0
|
|
H 4 0
|
|
DELETE FROM t1;
|
|
ALTER TABLE t1 MODIFY c1 INT;
|
|
ALTER TABLE t1 MODIFY c21 VARCHAR(1024);
|
|
INSERT INTO t1 VALUES (1, 1, 'City', 0, 0, 0);
|
|
INSERT INTO t1 VALUES (2, 2, 'Mitte', 0, 0, 0);
|
|
INSERT INTO t1 VALUES (3, 3, 'West', 0, 0 ,0);
|
|
INSERT INTO t1 VALUES (4, 4, 'Norderstedt', 0, 0, 0);
|
|
SELECT c1,c2,c21 FROM t1;
|
|
c1 c2 c21
|
|
1 1 City
|
|
2 2 Mitte
|
|
3 3 West
|
|
4 4 Norderstedt
|
|
Here are the memcached results with 1,2,3,4:
|
|
1|City
|
|
2|Mitte
|
|
3|West
|
|
4|Norderstedt
|
|
Here are the memcached results after set:
|
|
5|Ost-INT-KEY
|
|
Here are the memcached results after add key with min border:
|
|
6|Ost
|
|
Here are the memcached results after add key with max border:
|
|
7|Ost
|
|
Here are the memcached results after add key with over max border:
|
|
6|Ost
|
|
DROP TABLE t1;
|
|
SET sql_mode=default;
|
|
#
|
|
# Bug#20535517 INCORRECT HANDLING OF UNSIGNED NOT NULL INTEGERS IN INNODB_MEMCACHED
|
|
#
|
|
Here are the memcached results with E:
|
|
543
|
|
SELECT * FROM int_test;
|
|
k v
|
|
E 543
|
|
DROP TABLE int_test;
|
|
UNINSTALL PLUGIN daemon_memcached;
|
|
DROP DATABASE innodb_memcache;
|
|
SET @@global.transaction_isolation= @transaction_isolation;
|