203
169
bool force_index; ///< prefer index over table scan
204
170
bool ignore_leaves; ///< preload only non-leaf nodes
207
is the table a cartesian join, assumption is yes unless "solved"
209
bool isCartesian() const;
173
* This TableList object corresponds to the table to be created
174
* so it is possible that it does not exist (used in CREATE TABLE
175
* ... SELECT implementation).
211
179
/** Field names in a USING clause for JOIN ... USING. */
212
180
List<String> *join_using_fields;
243
211
TableList *next_leaf;
244
212
thr_lock_type lock_type;
245
213
uint32_t outer_join; ///< Which join type
214
uint32_t shared; ///<Used in multi-upd
246
215
size_t db_length;
247
216
size_t table_name_length;
217
table_map dep_tables; ///< tables the table depends on
218
table_map on_expr_dep_tables; ///< tables on expression depends on
219
nested_join_st *nested_join; ///< if the element is a nested join
220
TableList *embedding; ///< nested join containing the table
221
List<TableList> *join_list; ///< join list the table belongs to
222
plugin::StorageEngine *db_type; ///< table_type for handler
223
char timestamp_buffer[20]; ///< buffer for timestamp (19+1)
224
bool internal_tmp_table;
225
/** true if an alias for this table was specified in the SQL. */
228
* true if the table is referred to in the statement using a fully
229
* qualified name (<db_name>.<table_name>).
233
bool has_db_lookup_value;
234
bool has_table_lookup_value;
249
236
void set_underlying_merge();
250
237
bool setup_underlying(Session *session);
397
384
* true found and reported an error.
399
386
bool process_index_hints(Table *table);
401
friend std::ostream& operator<<(std::ostream& output, const TableList &list)
403
output << "TableList:(";
406
output << list.table_name;
408
output << list.alias;
410
output << "is_natural_join:" << list.is_natural_join;
412
output << "is_join_columns_complete:" << list.is_join_columns_complete;
414
output << "straight:" << list.straight;
416
output << "force_index" << list.force_index;
418
output << "ignore_leaves:" << list.ignore_leaves;
420
output << "create:" << list.create;
422
output << "outer_join:" << list.outer_join;
424
output << "nested_join:" << list.nested_join;
427
return output; // for multiple << operators.
430
void setIsAlias(bool in_is_alias)
432
is_alias= in_is_alias;
435
void setIsFqtn(bool in_is_fqtn)
440
void setCreate(bool in_create)
445
void setInternalTmpTable(bool in_internal_tmp_table)
447
internal_tmp_table= in_internal_tmp_table;
450
void setDbType(plugin::StorageEngine *in_db_type)
455
void setJoinList(List<TableList> *in_join_list)
457
join_list= in_join_list;
460
void setEmbedding(TableList *in_embedding)
462
embedding= in_embedding;
465
void setNestedJoin(nested_join_st *in_nested_join)
467
nested_join= in_nested_join;
470
void setDepTables(table_map in_dep_tables)
472
dep_tables= in_dep_tables;
475
void setOnExprDepTables(table_map in_on_expr_dep_tables)
477
on_expr_dep_tables= in_on_expr_dep_tables;
480
bool getIsAlias() const
485
bool getIsFqtn() const
490
bool isCreate() const
495
bool getInternalTmpTable() const
497
return internal_tmp_table;
500
plugin::StorageEngine *getDbType() const
505
TableList *getEmbedding() const
510
List<TableList> *getJoinList() const
515
nested_join_st *getNestedJoin() const
520
table_map getDepTables() const
525
table_map getOnExprDepTables() const
527
return on_expr_dep_tables;
530
void unlock_table_name();
531
void unlock_table_names(TableList *last_table= NULL);
535
table_map dep_tables; ///< tables the table depends on
536
table_map on_expr_dep_tables; ///< tables on expression depends on
537
nested_join_st *nested_join; ///< if the element is a nested join
538
TableList *embedding; ///< nested join containing the table
539
List<TableList> *join_list; ///< join list the table belongs to
540
plugin::StorageEngine *db_type; ///< table_type for handler
541
char timestamp_buffer[20]; ///< buffer for timestamp (19+1)
542
bool internal_tmp_table;
543
/** true if an alias for this table was specified in the SQL. */
547
* true if the table is referred to in the statement using a fully
548
* qualified name (<db_name>.<table_name>).
552
* This TableList object corresponds to the table to be created
553
* so it is possible that it does not exist (used in CREATE TABLE
554
* ... SELECT implementation).
388
* Creates a table definition cache key for this table entry.
390
* @param[out] Create key here (must be of size MAX_DBKEY_LENGTH)
394
* The table cache_key is created from:
398
* if the table is a tmp table, we add the following to make each tmp table
399
* unique on the slave:
401
* 4 bytes for master thread id
402
* 4 bytes pseudo thread id
407
uint32_t create_table_def_key(char *key);
560
410
void close_thread_tables(Session *session);