github.com/dolthub/go-mysql-server@v0.18.0/enginetest/scriptgen/setup/scripts/comp_index_tables (about)

     1  exec
     2  CREATE TABLE comp_index_t0 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT)
     3  ----
     4  
     5  exec
     6  create INDEX v_idx on comp_index_t0 (v1, v2)
     7  ----
     8  
     9  exec
    10  INSERT INTO comp_index_t0 VALUES (0,0,48),(1,0,52),(2,2,4),(3,2,10),(4,3,35),(5,5,36),(6,5,60),(7,6,1),(8,6,51),
    11  (9,6,60),(10,6,73),(11,9,44),(12,9,97),(13,13,44),(14,14,53),(15,14,57),(16,14,98),(17,16,19),(18,16,53),(19,16,95),
    12  (20,18,31),(21,19,48),(22,19,75),(23,19,97),(24,24,60),(25,25,14),(26,25,31),(27,27,9),(28,27,24),(29,28,24),(30,28,83),
    13  (31,31,14),(32,33,39),(33,34,22),(34,34,91),(35,35,89),(36,38,20),(37,38,66),(38,39,55),(39,39,86),(40,40,97),(41,42,0),
    14  (42,42,82),(43,43,63),(44,44,48),(45,44,67),(46,45,22),(47,45,31),(48,45,63),(49,45,86),(50,46,46),(51,47,5),(52,48,22),
    15  (53,49,0),(54,50,0),(55,50,14),(56,51,35),(57,54,38),(58,56,0),(59,56,60),(60,57,29),(61,57,49),(62,58,12),(63,58,32),
    16  (64,59,29),(65,59,45),(66,59,54),(67,60,66),(68,61,3),(69,61,34),(70,63,19),(71,63,69),(72,65,80),(73,65,97),(74,67,95),
    17  (75,68,11),(76,69,34),(77,72,52),(78,74,81),(79,76,39),(80,78,0),(81,78,90),(82,79,36),(83,80,61),(84,80,88),(85,81,4),
    18  (86,82,16),(87,83,30),(88,83,74),(89,84,9),(90,84,45),(91,86,56),(92,86,88),(93,87,51),(94,89,3),(95,93,19),(96,93,21),
    19  (97,93,96),(98,98,0),(99,98,51),(100,98,61);
    20  ----
    21  
    22  exec
    23  CREATE TABLE comp_index_t1 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT, v3 BIGINT)
    24  ----
    25  
    26  exec
    27  create INDEX v_idx on comp_index_t1 (v1, v2, v3)
    28  ----
    29  
    30  exec
    31  INSERT INTO comp_index_t1 VALUES (0,0,3,16),(1,2,65,9),(2,3,38,37),(3,3,99,99),(4,5,17,42),(5,6,6,76),(6,6,81,33),
    32  (7,7,33,51),(8,7,37,42),(9,8,9,21),(10,8,37,90),(11,9,39,20),(12,9,71,82),(13,10,16,21),(14,10,32,46),(15,10,47,36),
    33  (16,12,44,84),(17,12,66,40),(18,13,47,30),(19,13,56,41),(20,14,38,24),(21,14,91,1),(22,15,2,69),(23,16,40,36),
    34  (24,20,29,93),(25,21,9,89),(26,21,42,76),(27,23,13,53),(28,23,28,68),(29,23,28,90),(30,23,30,44),(31,24,20,8),
    35  (32,25,49,88),(33,26,15,28),(34,27,35,12),(35,28,39,84),(36,29,7,38),(37,29,21,74),(38,29,27,48),(39,29,77,46),
    36  (40,31,47,21),(41,31,47,91),(42,32,40,76),(43,33,70,50),(44,34,27,58),(45,35,32,36),(46,36,4,36),(47,36,84,75),
    37  (48,37,27,32),(49,38,88,68),(50,41,17,68),(51,41,77,26),(52,42,80,85),(53,45,1,57),(54,46,58,8),(55,49,26,11),
    38  (56,50,49,20),(57,50,86,6),(58,54,13,78),(59,54,57,83),(60,55,45,46),(61,55,81,80),(62,56,0,97),(63,56,8,78),
    39  (64,56,58,4),(65,56,66,33),(66,57,7,52),(67,59,77,53),(68,60,8,70),(69,61,11,25),(70,63,85,23),(71,65,17,9),
    40  (72,66,46,46),(73,66,73,4),(74,67,55,27),(75,70,8,54),(76,70,58,33),(77,71,39,15),(78,72,65,64),(79,74,78,26),
    41  (80,75,91,35),(81,76,40,52),(82,76,44,87),(83,81,32,4),(84,82,11,6),(85,82,46,32),(86,84,40,8),(87,84,93,37),
    42  (88,85,53,50),(89,86,63,79),(90,87,22,34),(91,87,57,62),(92,88,88,42),(93,90,30,67),(94,91,15,15),(95,93,7,26),
    43  (96,94,92,38),(97,95,89,66),(98,97,63,19),(99,98,31,21),(100,98,42,22)
    44  ----
    45  
    46  exec
    47  CREATE TABLE comp_index_t2 (pk BIGINT PRIMARY KEY, v1 BIGINT, v2 BIGINT, v3 BIGINT, v4 BIGINT)
    48  ----
    49  
    50  exec
    51  create INDEX v_idx on comp_index_t2 (v1, v2, v3, v4)
    52  ----
    53  
    54  exec
    55  INSERT INTO comp_index_t2 VALUES (0,0,33,2,67),(1,0,55,14,32),(2,1,43,13,36),(3,1,72,29,21),(4,2,27,1,75),
    56  (5,3,31,22,81),(6,4,6,67,80),(7,4,10,53,69),(8,4,27,77,5),(9,5,17,52,13),(10,5,32,30,48),(11,5,76,70,46),(12,7,7,66,62),
    57  (13,7,21,75,70),(14,7,76,26,47),(15,8,54,46,87),(16,8,99,43,1),(17,9,7,74,92),(18,9,19,38,35),(19,10,36,27,5),
    58  (20,12,0,33,62),(21,12,42,15,31),(22,12,46,43,23),(23,15,42,17,60),(24,17,49,14,7),(25,17,75,86,18),(26,20,30,34,71),
    59  (27,21,21,32,8),(28,22,21,28,78),(29,22,98,22,21),(30,23,43,13,11),(31,24,26,69,25),(32,24,45,96,0),(33,29,72,97,93),
    60  (34,32,16,97,29),(35,33,29,69,6),(36,33,53,56,88),(37,33,86,12,22),(38,34,55,37,34),(39,34,87,13,51),(40,34,89,27,90),
    61  (41,35,6,86,74),(42,36,7,40,16),(43,37,35,6,44),(44,37,41,36,10),(45,38,71,22,37),(46,39,45,75,55),(47,41,1,85,9),
    62  (48,41,21,82,54),(49,43,23,15,0),(50,43,66,85,66),(51,45,9,76,9),(52,47,94,56,21),(53,48,3,11,18),(54,50,26,23,71),
    63  (55,50,36,73,58),(56,50,39,26,37),(57,50,79,10,12),(58,50,97,0,79),(59,51,97,39,36),(60,52,72,44,2),(61,53,6,53,89),
    64  (62,53,48,19,36),(63,55,31,29,92),(64,57,25,97,65),(65,63,50,20,43),(66,64,23,33,5),(67,64,26,77,97),(68,64,41,74,85),
    65  (69,64,77,41,17),(70,66,97,6,39),(71,67,39,87,15),(72,69,81,70,37),(73,70,40,19,5),(74,70,56,21,22),(75,71,3,49,55),
    66  (76,71,48,89,99),(77,73,10,2,0),(78,73,91,56,0),(79,74,22,42,16),(80,74,35,72,97),(81,76,74,97,18),(82,82,29,66,71),
    67  (83,82,31,22,99),(84,82,70,5,47),(85,83,37,36,16),(86,83,41,53,57),(87,84,56,78,18),(88,85,2,3,88),(89,86,7,57,96),
    68  (90,87,23,16,63),(91,87,66,8,22),(92,88,57,12,88),(93,89,1,27,50),(94,89,91,7,45),(95,90,25,0,17),(96,91,23,2,9),
    69  (97,93,56,71,53),(98,94,43,71,43),(99,94,79,53,73),(100,96,73,38,38)
    70  ----
    71  
    72  exec
    73  CREATE TABLE comp_index_t3 (pk BIGINT PRIMARY KEY, v1 BLOB, v2 BLOB)
    74  ----
    75  
    76  exec
    77  create INDEX v_idx on comp_index_t3 (v1(3))
    78  ----
    79  
    80  exec
    81  INSERT INTO comp_index_t3 VALUES (0, 'a', 'a'), (1, 'ab', 'ab'), (2, 'abc', 'abc'), (3, 'abcde', 'abcde')
    82  ----
    83  
    84  exec
    85  create table pref_index_t2 (i int primary key, v1 varchar(10), v2 varchar(10), unique index (v1(3),v2(5))) collate utf8mb4_0900_ai_ci;
    86  ----
    87  
    88  exec
    89  create table pref_index_t1 (i int primary key, v1 text, v2 text, unique index (v1(3),v2(5)));
    90  ----
    91  
    92  exec
    93  create table pref_index_t3 (v1 varchar(10), v2 varchar(10), unique index (v1(3),v2(5)));
    94  ----
    95  
    96  exec
    97  create table pref_index_t4 (i int primary key, v1 varchar(10), v2 varchar(10), unique index (v1(3),v2(5)));
    98  ----