170
165
bool force_index; ///< prefer index over table scan
171
166
bool ignore_leaves; ///< preload only non-leaf nodes
174
* This TableList object corresponds to the table to be created
175
* so it is possible that it does not exist (used in CREATE TABLE
176
* ... SELECT implementation).
169
is the table a cartesian join, assumption is yes unless "solved"
171
bool isCartesian() const;
180
173
/** Field names in a USING clause for JOIN ... USING. */
181
174
List<String> *join_using_fields;
212
205
TableList *next_leaf;
213
206
thr_lock_type lock_type;
214
207
uint32_t outer_join; ///< Which join type
215
uint32_t shared; ///<Used in multi-upd
216
uint32_t i_s_requested_object;
217
208
size_t db_length;
218
209
size_t table_name_length;
219
table_map dep_tables; ///< tables the table depends on
220
table_map on_expr_dep_tables; ///< tables on expression depends on
221
nested_join_st *nested_join; ///< if the element is a nested join
222
TableList *embedding; ///< nested join containing the table
223
List<TableList> *join_list; ///< join list the table belongs to
224
plugin::StorageEngine *db_type; ///< table_type for handler
225
char timestamp_buffer[20]; ///< buffer for timestamp (19+1)
226
bool internal_tmp_table;
227
/** true if an alias for this table was specified in the SQL. */
230
* true if the table is referred to in the statement using a fully
231
* qualified name (<db_name>.<table_name>).
235
bool has_db_lookup_value;
236
bool has_table_lookup_value;
238
211
void set_underlying_merge();
239
212
bool setup_underlying(Session *session);
409
382
uint32_t create_table_def_key(char *key);
384
friend std::ostream& operator<<(std::ostream& output, const TableList &list)
386
output << "TableList:(";
389
output << list.table_name;
391
output << list.alias;
393
output << "is_natural_join:" << list.is_natural_join;
395
output << "is_join_columns_complete:" << list.is_join_columns_complete;
397
output << "straight:" << list.straight;
399
output << "force_index" << list.force_index;
401
output << "ignore_leaves:" << list.ignore_leaves;
403
output << "create:" << list.create;
405
output << "outer_join:" << list.outer_join;
407
output << "nested_join:" << list.nested_join;
410
return output; // for multiple << operators.
413
void setIsAlias(bool in_is_alias)
415
is_alias= in_is_alias;
418
void setIsFqtn(bool in_is_fqtn)
423
void setCreate(bool in_create)
428
void setInternalTmpTable(bool in_internal_tmp_table)
430
internal_tmp_table= in_internal_tmp_table;
433
void setDbType(plugin::StorageEngine *in_db_type)
438
void setJoinList(List<TableList> *in_join_list)
440
join_list= in_join_list;
443
void setEmbedding(TableList *in_embedding)
445
embedding= in_embedding;
448
void setNestedJoin(nested_join_st *in_nested_join)
450
nested_join= in_nested_join;
453
void setDepTables(table_map in_dep_tables)
455
dep_tables= in_dep_tables;
458
void setOnExprDepTables(table_map in_on_expr_dep_tables)
460
on_expr_dep_tables= in_on_expr_dep_tables;
463
bool getIsAlias() const
468
bool getIsFqtn() const
473
bool isCreate() const
478
bool getInternalTmpTable() const
480
return internal_tmp_table;
483
plugin::StorageEngine *getDbType() const
488
TableList *getEmbedding() const
493
List<TableList> *getJoinList() const
498
nested_join_st *getNestedJoin() const
503
table_map getDepTables() const
508
table_map getOnExprDepTables() const
510
return on_expr_dep_tables;
515
table_map dep_tables; ///< tables the table depends on
516
table_map on_expr_dep_tables; ///< tables on expression depends on
517
nested_join_st *nested_join; ///< if the element is a nested join
518
TableList *embedding; ///< nested join containing the table
519
List<TableList> *join_list; ///< join list the table belongs to
520
plugin::StorageEngine *db_type; ///< table_type for handler
521
char timestamp_buffer[20]; ///< buffer for timestamp (19+1)
522
bool internal_tmp_table;
523
/** true if an alias for this table was specified in the SQL. */
527
* true if the table is referred to in the statement using a fully
528
* qualified name (<db_name>.<table_name>).
532
* This TableList object corresponds to the table to be created
533
* so it is possible that it does not exist (used in CREATE TABLE
534
* ... SELECT implementation).
412
540
void close_thread_tables(Session *session);