Debian Codegraph @

mysql-test/suite/parts/r/partition_bigint_innodb.result

raw
1 create table t1 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
2 partition by key (a) (
3 partition pa1 max_rows=20 min_rows=2,
4 partition pa2 max_rows=30 min_rows=3,
5 partition pa3 max_rows=30 min_rows=4,
6 partition pa4 max_rows=40 min_rows=2);
7 show create table t1;
8 Table Create Table
9 t1 CREATE TABLE `t1` (
10 `a` bigint(20) unsigned NOT NULL,
11 PRIMARY KEY (`a`)
12 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
13 PARTITION BY KEY (`a`)
14 (PARTITION `pa1` MAX_ROWS = 20 MIN_ROWS = 2 ENGINE = InnoDB,
15 PARTITION `pa2` MAX_ROWS = 30 MIN_ROWS = 3 ENGINE = InnoDB,
16 PARTITION `pa3` MAX_ROWS = 30 MIN_ROWS = 4 ENGINE = InnoDB,
17 PARTITION `pa4` MAX_ROWS = 40 MIN_ROWS = 2 ENGINE = InnoDB)
18 insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612), (1), (2), (65535);
19 select * from t1;
20 a
21 1
22 18446744073709551612
23 18446744073709551613
24 18446744073709551614
25 18446744073709551615
26 2
27 65535
28 select * from t1 where a=-2;
29 a
30 delete from t1 where a=-2;
31 select * from t1;
32 a
33 1
34 18446744073709551612
35 18446744073709551613
36 18446744073709551614
37 18446744073709551615
38 2
39 65535
40 select * from t1 where a=18446744073709551615;
41 a
42 18446744073709551615
43 delete from t1 where a=18446744073709551615;
44 select * from t1;
45 a
46 1
47 18446744073709551612
48 18446744073709551613
49 18446744073709551614
50 2
51 65535
52 drop table t1;
53 create table t2 (a bigint unsigned not null, primary key(a)) engine='InnoDB'
54 partition by key (a) partitions 8;
55 show create table t2;
56 Table Create Table
57 t2 CREATE TABLE `t2` (
58 `a` bigint(20) unsigned NOT NULL,
59 PRIMARY KEY (`a`)
60 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
61 PARTITION BY KEY (`a`)
62 PARTITIONS 8
63 insert into t2 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
64 select * from t2;
65 a
66 18446744073709551612
67 18446744073709551613
68 18446744073709551614
69 18446744073709551615
70 select * from t2 where a=18446744073709551615;
71 a
72 18446744073709551615
73 delete from t2 where a=18446744073709551615;
74 select * from t2;
75 a
76 18446744073709551612
77 18446744073709551613
78 18446744073709551614
79 delete from t2;
80 1024 inserts;
81 select count(*) from t2;
82 count(*)
83 1024
84 drop table t2;
85 create table t3 (a bigint not null, primary key(a)) engine='InnoDB'
86 partition by key (a) partitions 7;
87 show create table t3;
88 Table Create Table
89 t3 CREATE TABLE `t3` (
90 `a` bigint(20) NOT NULL,
91 PRIMARY KEY (`a`)
92 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
93 PARTITION BY KEY (`a`)
94 PARTITIONS 7
95 insert into t3 values (9223372036854775807), (9223372036854775806), (9223372036854775805), (9223372036854775804), (-9223372036854775808), (-9223372036854775807), (1), (-1), (0);
96 select * from t3;
97 a
98 -1
99 -9223372036854775807
100 -9223372036854775808
101 0
102 1
103 9223372036854775804
104 9223372036854775805
105 9223372036854775806
106 9223372036854775807
107 select * from t3 where a=9223372036854775806;
108 a
109 9223372036854775806
110 delete from t3 where a=9223372036854775806;
111 select * from t3;
112 a
113 -1
114 -9223372036854775807
115 -9223372036854775808
116 0
117 1
118 9223372036854775804
119 9223372036854775805
120 9223372036854775807
121 drop table t3;