-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
close #47177
- Loading branch information
1 parent
7a116f3
commit 21a91db
Showing
11 changed files
with
1,325 additions
and
1,335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,260 @@ | ||
drop table if exists t; | ||
create table t(a bigint unsigned primary key, b int, c int, index idx(a, b)); | ||
insert into t values(1, 1, 1); | ||
admin check table t; | ||
|
||
drop table if exists t1; | ||
CREATE TABLE t1 (c1 int); | ||
INSERT INTO t1 SET c1 = 1; | ||
ALTER TABLE t1 ADD COLUMN cc1 CHAR(36) NULL DEFAULT ''; | ||
ALTER TABLE t1 ADD COLUMN cc2 VARCHAR(36) NULL DEFAULT ''; | ||
ALTER TABLE t1 ADD INDEX idx1 (cc1); | ||
ALTER TABLE t1 ADD INDEX idx2 (cc2); | ||
ALTER TABLE t1 engine=innodb; | ||
admin check table t1; | ||
|
||
drop table if exists t1; | ||
create table t1 ( | ||
a int as (JSON_EXTRACT(k,'$.a')), | ||
c double as (JSON_EXTRACT(k,'$.c')), | ||
d decimal(20,10) as (JSON_EXTRACT(k,'$.d')), | ||
e char(10) as (JSON_EXTRACT(k,'$.e')), | ||
f date as (JSON_EXTRACT(k,'$.f')), | ||
g time as (JSON_EXTRACT(k,'$.g')), | ||
h datetime as (JSON_EXTRACT(k,'$.h')), | ||
i timestamp as (JSON_EXTRACT(k,'$.i')), | ||
j year as (JSON_EXTRACT(k,'$.j')), | ||
k json); | ||
insert into t1 set k='{"a": 100,"c":1.234,"d":1.2340000000,"e":"abcdefg","f":"2018-09-28","g":"12:59:59","h":"2018-09-28 12:59:59","i":"2018-09-28 16:40:33","j":"2018"}'; | ||
alter table t1 add index idx_a(a); | ||
alter table t1 add index idx_c(c); | ||
alter table t1 add index idx_d(d); | ||
alter table t1 add index idx_e(e); | ||
alter table t1 add index idx_f(f); | ||
alter table t1 add index idx_g(g); | ||
alter table t1 add index idx_h(h); | ||
alter table t1 add index idx_j(j); | ||
alter table t1 add index idx_i(i); | ||
alter table t1 add index idx_m(a,c,d,e,f,g,h,i,j); | ||
admin check table t1; | ||
|
||
drop table if exists t; | ||
create table t (a bigint, b varchar(255), c int, primary key (a, b), index idx_0(a, b), index idx_1(b, c)); | ||
insert into t values (1, '1', 1); | ||
insert into t values (2, '2', 2); | ||
admin check table t; | ||
|
||
insert into t values (3, '3', 3); | ||
insert into t values (4, '4', 4); | ||
insert into t values (5, '5', 5); | ||
insert into t values (6, '6', 6); | ||
insert into t values (7, '7', 7); | ||
insert into t values (8, '8', 8); | ||
insert into t values (9, '9', 9); | ||
insert into t values (10, '10', 10); | ||
insert into t values (11, '11', 11); | ||
insert into t values (12, '12', 12); | ||
insert into t values (13, '13', 13); | ||
insert into t values (14, '14', 14); | ||
insert into t values (15, '15', 15); | ||
insert into t values (16, '16', 16); | ||
insert into t values (17, '17', 17); | ||
insert into t values (18, '18', 18); | ||
insert into t values (19, '19', 19); | ||
insert into t values (20, '20', 20); | ||
insert into t values (21, '21', 21); | ||
insert into t values (22, '22', 22); | ||
insert into t values (23, '23', 23); | ||
insert into t values (24, '24', 24); | ||
insert into t values (25, '25', 25); | ||
insert into t values (26, '26', 26); | ||
insert into t values (27, '27', 27); | ||
insert into t values (28, '28', 28); | ||
insert into t values (29, '29', 29); | ||
insert into t values (30, '30', 30); | ||
insert into t values (31, '31', 31); | ||
insert into t values (32, '32', 32); | ||
insert into t values (33, '33', 33); | ||
insert into t values (34, '34', 34); | ||
insert into t values (35, '35', 35); | ||
insert into t values (36, '36', 36); | ||
insert into t values (37, '37', 37); | ||
insert into t values (38, '38', 38); | ||
insert into t values (39, '39', 39); | ||
insert into t values (40, '40', 40); | ||
insert into t values (41, '41', 41); | ||
insert into t values (42, '42', 42); | ||
insert into t values (43, '43', 43); | ||
insert into t values (44, '44', 44); | ||
insert into t values (45, '45', 45); | ||
insert into t values (46, '46', 46); | ||
insert into t values (47, '47', 47); | ||
insert into t values (48, '48', 48); | ||
insert into t values (49, '49', 49); | ||
insert into t values (50, '50', 50); | ||
insert into t values (51, '51', 51); | ||
insert into t values (52, '52', 52); | ||
insert into t values (53, '53', 53); | ||
insert into t values (54, '54', 54); | ||
insert into t values (55, '55', 55); | ||
insert into t values (56, '56', 56); | ||
insert into t values (57, '57', 57); | ||
insert into t values (58, '58', 58); | ||
insert into t values (59, '59', 59); | ||
insert into t values (60, '60', 60); | ||
insert into t values (61, '61', 61); | ||
insert into t values (62, '62', 62); | ||
insert into t values (63, '63', 63); | ||
insert into t values (64, '64', 64); | ||
insert into t values (65, '65', 65); | ||
insert into t values (66, '66', 66); | ||
insert into t values (67, '67', 67); | ||
insert into t values (68, '68', 68); | ||
insert into t values (69, '69', 69); | ||
insert into t values (70, '70', 70); | ||
insert into t values (71, '71', 71); | ||
insert into t values (72, '72', 72); | ||
insert into t values (73, '73', 73); | ||
insert into t values (74, '74', 74); | ||
insert into t values (75, '75', 75); | ||
insert into t values (76, '76', 76); | ||
insert into t values (77, '77', 77); | ||
insert into t values (78, '78', 78); | ||
insert into t values (79, '79', 79); | ||
insert into t values (80, '80', 80); | ||
insert into t values (81, '81', 81); | ||
insert into t values (82, '82', 82); | ||
insert into t values (83, '83', 83); | ||
insert into t values (84, '84', 84); | ||
insert into t values (85, '85', 85); | ||
insert into t values (86, '86', 86); | ||
insert into t values (87, '87', 87); | ||
insert into t values (88, '88', 88); | ||
insert into t values (89, '89', 89); | ||
insert into t values (90, '90', 90); | ||
insert into t values (91, '91', 91); | ||
insert into t values (92, '92', 92); | ||
insert into t values (93, '93', 93); | ||
insert into t values (94, '94', 94); | ||
insert into t values (95, '95', 95); | ||
insert into t values (96, '96', 96); | ||
insert into t values (97, '97', 97); | ||
insert into t values (98, '98', 98); | ||
insert into t values (99, '99', 99); | ||
insert into t values (100, '100', 100); | ||
insert into t values (101, '101', 101); | ||
insert into t values (102, '102', 102); | ||
insert into t values (103, '103', 103); | ||
insert into t values (104, '104', 104); | ||
insert into t values (105, '105', 105); | ||
insert into t values (106, '106', 106); | ||
insert into t values (107, '107', 107); | ||
insert into t values (108, '108', 108); | ||
insert into t values (109, '109', 109); | ||
insert into t values (110, '110', 110); | ||
insert into t values (111, '111', 111); | ||
insert into t values (112, '112', 112); | ||
insert into t values (113, '113', 113); | ||
insert into t values (114, '114', 114); | ||
insert into t values (115, '115', 115); | ||
insert into t values (116, '116', 116); | ||
insert into t values (117, '117', 117); | ||
insert into t values (118, '118', 118); | ||
insert into t values (119, '119', 119); | ||
insert into t values (120, '120', 120); | ||
insert into t values (121, '121', 121); | ||
insert into t values (122, '122', 122); | ||
insert into t values (123, '123', 123); | ||
insert into t values (124, '124', 124); | ||
insert into t values (125, '125', 125); | ||
insert into t values (126, '126', 126); | ||
insert into t values (127, '127', 127); | ||
insert into t values (128, '128', 128); | ||
insert into t values (129, '129', 129); | ||
insert into t values (130, '130', 130); | ||
insert into t values (131, '131', 131); | ||
insert into t values (132, '132', 132); | ||
insert into t values (133, '133', 133); | ||
insert into t values (134, '134', 134); | ||
insert into t values (135, '135', 135); | ||
insert into t values (136, '136', 136); | ||
insert into t values (137, '137', 137); | ||
insert into t values (138, '138', 138); | ||
insert into t values (139, '139', 139); | ||
insert into t values (140, '140', 140); | ||
insert into t values (141, '141', 141); | ||
insert into t values (142, '142', 142); | ||
insert into t values (143, '143', 143); | ||
insert into t values (144, '144', 144); | ||
insert into t values (145, '145', 145); | ||
insert into t values (146, '146', 146); | ||
insert into t values (147, '147', 147); | ||
insert into t values (148, '148', 148); | ||
insert into t values (149, '149', 149); | ||
insert into t values (150, '150', 150); | ||
insert into t values (151, '151', 151); | ||
insert into t values (152, '152', 152); | ||
insert into t values (153, '153', 153); | ||
insert into t values (154, '154', 154); | ||
insert into t values (155, '155', 155); | ||
insert into t values (156, '156', 156); | ||
insert into t values (157, '157', 157); | ||
insert into t values (158, '158', 158); | ||
insert into t values (159, '159', 159); | ||
insert into t values (160, '160', 160); | ||
insert into t values (161, '161', 161); | ||
insert into t values (162, '162', 162); | ||
insert into t values (163, '163', 163); | ||
insert into t values (164, '164', 164); | ||
insert into t values (165, '165', 165); | ||
insert into t values (166, '166', 166); | ||
insert into t values (167, '167', 167); | ||
insert into t values (168, '168', 168); | ||
insert into t values (169, '169', 169); | ||
insert into t values (170, '170', 170); | ||
insert into t values (171, '171', 171); | ||
insert into t values (172, '172', 172); | ||
insert into t values (173, '173', 173); | ||
insert into t values (174, '174', 174); | ||
insert into t values (175, '175', 175); | ||
insert into t values (176, '176', 176); | ||
insert into t values (177, '177', 177); | ||
insert into t values (178, '178', 178); | ||
insert into t values (179, '179', 179); | ||
insert into t values (180, '180', 180); | ||
insert into t values (181, '181', 181); | ||
insert into t values (182, '182', 182); | ||
insert into t values (183, '183', 183); | ||
insert into t values (184, '184', 184); | ||
insert into t values (185, '185', 185); | ||
insert into t values (186, '186', 186); | ||
insert into t values (187, '187', 187); | ||
insert into t values (188, '188', 188); | ||
insert into t values (189, '189', 189); | ||
insert into t values (190, '190', 190); | ||
insert into t values (191, '191', 191); | ||
insert into t values (192, '192', 192); | ||
insert into t values (193, '193', 193); | ||
insert into t values (194, '194', 194); | ||
insert into t values (195, '195', 195); | ||
insert into t values (196, '196', 196); | ||
insert into t values (197, '197', 197); | ||
insert into t values (198, '198', 198); | ||
insert into t values (199, '199', 199); | ||
admin check table t; | ||
|
||
create index idx_2 on t (c); | ||
admin check table t; | ||
|
||
create index idx_3 on t (a,c); | ||
admin check table t; | ||
|
||
alter table t add column e char(36); | ||
admin check table t; | ||
|
||
alter table t add column d char(36) NULL DEFAULT ''; | ||
admin check table t; | ||
|
||
insert into t values (1000, '1000', 1000, '1000', '1000'); | ||
admin check table t; | ||
|
Oops, something went wrong.