28
29
message TableOptions {
29
30
optional uint64 auto_increment = 1;
30
optional string charset = 2;
31
optional string collation = 3;
31
optional string collation = 2;
32
optional uint32 collation_id = 3;
33
optional string connect_string = 4;
34
optional string data_file_name = 5;
35
optional string index_file_name = 6;
36
optional uint64 max_rows = 7;
37
optional uint64 min_rows = 8;
38
optional uint64 auto_increment_value = 9;
39
optional uint32 avg_row_length = 11;
40
optional uint32 key_block_size = 12;
41
optional uint32 block_size = 13;
42
optional string comment = 14;
43
optional bool pack_keys = 15;
44
optional bool pack_record = 16;
45
optional bool checksum = 17;
46
optional bool page_checksum = 18;
47
optional bool delay_key_write = 19;
53
ROW_TYPE_COMPRESSED = 3;
54
ROW_TYPE_REDUNDANT = 4;
59
optional RowType row_type = 20;
34
62
message TableStats {
89
125
message StringFieldOptions {
90
126
optional bool is_fixed_width = 1 [default = false];
91
127
optional int32 length = 2;
92
optional string charset = 3; /* Perhaps this can go away soon...*/
128
optional uint32 collation_id = 3;
93
129
optional string collation = 4;
96
132
message SetFieldOptions {
97
133
required int32 count_elements = 1;
98
repeated string value = 2;
134
optional uint32 collation_id = 2;
135
optional string collation = 3;
136
repeated bytes field_value = 4;
139
message VirtualFieldOptions {
140
required FieldType type = 1;
141
required bool physically_stored = 2;
142
/* optional as we could optimise some cases in future */
143
optional string expression = 3;
101
146
required string name = 1;
102
147
required FieldType type = 2;
103
optional FieldOptions options = 3;
104
optional FieldConstraints constraints = 4;
105
optional NumericFieldOptions numeric_options = 5;
106
optional StringFieldOptions string_options = 6;
148
optional FieldFormatType format = 3;
149
optional FieldOptions options = 4;
150
optional FieldConstraints constraints = 5;
151
optional NumericFieldOptions numeric_options = 6;
152
optional StringFieldOptions string_options = 7;
153
optional VirtualFieldOptions virtual_options = 8;
107
155
optional string comment = 16; /* Reserve 0-15 for frequently accessed attributes */
108
156
optional SetFieldOptions set_options = 17;
109
157
optional TimestampFieldOptions timestamp_options = 18;
159
optional uint32 pack_flag = 100; /* MUST DIE */
165
/* Kept in sync with enum ha_key_alg if only for stewart's sanity. */
122
173
message IndexPart {
123
required Field field = 1;
174
required uint32 fieldnr = 1;
124
175
optional int32 compare_length = 2;
125
176
optional bool in_reverse_order = 3 [default = false];
178
optional uint32 key_type = 101; /* THIS MUST DIE. Along with pack_flag*/
181
message IndexOptions {
182
optional bool pack_key = 1;
183
optional bool binary_pack_key = 2;
184
optional bool var_length_key = 3;
185
optional bool null_part_key = 4;
186
optional uint32 key_block_size = 5;
187
optional bool has_partial_segments =6;
188
optional bool auto_generated_key = 7;
128
191
required string name = 1;
129
192
required bool is_primary = 2;
130
193
required bool is_unique = 3;
131
required IndexType type = 4 [default = UNKNOWN];
132
repeated IndexPart index_part = 5;
194
required IndexType type = 4 [default = UNKNOWN_INDEX];
195
required uint32 key_length = 5;
196
repeated IndexPart index_part = 6;
197
optional IndexOptions options= 7;
198
optional string comment = 8;
135
201
required string name = 1;
136
202
required TableType type = 5;
137
203
required StorageEngine engine = 2;
138
204
repeated Field field = 3;
139
repeated Index index = 4;
205
repeated Index indexes = 4;
141
207
repeated ForeignKeyConstraint fk_constraint = 8;
142
208
optional TableOptions options = 9;
143
209
optional TableStats stats = 10;
145
optional string comment = 16;
148
212
message TableList {