vitess.io/vitess@v0.16.2/go/vt/vtexplain/testdata/test-schema.sql (about) 1 create table t1 ( 2 id bigint(20) unsigned not null, 3 intval bigint(20) unsigned not null default 0, 4 floatval float not null default 0, 5 primary key (id) 6 ); 7 create table t2 ( 8 id bigint(20) unsigned not null, 9 t1_id bigint(20) unsigned not null default 0, 10 c2 bigint(20) null, 11 primary key (id) 12 ); 13 14 create table user ( 15 id bigint, 16 name varchar(64), 17 email varchar(64), 18 nickname varchar(64), 19 pet varchar(64), 20 primary key (id) 21 ) Engine=InnoDB; 22 23 create table name_user_map ( 24 name varchar(64), 25 user_id bigint, 26 primary key (name, user_id) 27 ) Engine=InnoDB; 28 29 create table name_info( 30 name varchar(128), 31 info varchar(128), 32 primary key(name) 33 ); 34 35 create table email_info( 36 name varchar(128), 37 info varchar(128), 38 primary key(name) 39 ); 40 41 create table music ( 42 user_id bigint, 43 id bigint, 44 song varchar(64), 45 primary key (user_id, id) 46 ) Engine=InnoDB; 47 48 create table music_extra ( 49 id bigint, 50 extra varchar(64), 51 primary key (id) 52 ) Engine=InnoDB; 53 54 create table table_not_in_vschema ( 55 id bigint, 56 primary key (id) 57 ) Engine=InnoDB; 58 59 /* 60 * This is not used by the tests themselves, but is used to verify 61 * that the vtexplain schema parsing logic can properly skip past 62 * the mysql comments used by partitioned tables. 63 */ 64 create table test_partitioned ( 65 id bigint, 66 date_create int, 67 primary key(id) 68 ) Engine=InnoDB 69 ; 70 71 create table customer ( 72 id bigint, 73 email varchar(64), 74 primary key (id) 75 ) Engine=InnoDB; 76 77 create table email_customer_map ( 78 email varchar(64), 79 user_id bigint, 80 primary key (email, user_id) 81 ) Engine=InnoDB; 82 83 create table user_region ( 84 regionId bigint, 85 userId bigint, 86 name varchar(64), 87 email varchar(64), 88 primary key (regionId,userId) 89 ) Engine=InnoDB; 90 91 create table member ( 92 id bigint, 93 lkp binary(16) NOT NULL, 94 more_id int not null, 95 primary key (id) 96 ) Engine=InnoDB; 97 98 create table lkp_idx ( 99 lkp binary(16) NOT NULL, 100 id bigint, 101 primary key (lkp) 102 ) Engine=InnoDB; 103 104 CREATE TABLE orders ( 105 id bigint, 106 customer_id bigint 107 ); 108 109 CREATE TABLE orders_id_lookup ( 110 id int NOT NULL, 111 keyspace_id varbinary(128), 112 primary key(id) 113 ); 114 115 CREATE TABLE orders_id_lookup_exclusive_read_lock ( 116 id int NOT NULL, 117 keyspace_id varbinary(128), 118 primary key(id) 119 ); 120 121 CREATE TABLE orders_id_lookup_shared_read_lock ( 122 id int NOT NULL, 123 keyspace_id varbinary(128), 124 primary key(id) 125 ); 126 127 CREATE TABLE orders_id_lookup_no_read_lock ( 128 id int NOT NULL, 129 keyspace_id varbinary(128), 130 primary key(id) 131 ); 132 133 CREATE TABLE orders_id_lookup_no_verify ( 134 id int NOT NULL, 135 keyspace_id varbinary(128), 136 primary key(id) 137 );