170
203
bool force_index; ///< prefer index over table scan
171
204
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).
207
is the table a cartesian join, assumption is yes unless "solved"
209
bool isCartesian() const;
180
211
/** Field names in a USING clause for JOIN ... USING. */
181
212
List<String> *join_using_fields;
212
243
TableList *next_leaf;
213
244
thr_lock_type lock_type;
214
245
uint32_t outer_join; ///< Which join type
215
uint32_t shared; ///<Used in multi-upd
216
uint32_t i_s_requested_object;
217
246
size_t db_length;
218
247
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
249
void set_underlying_merge();
239
250
bool setup_underlying(Session *session);
386
397
* true found and reported an error.
388
399
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>).
390
* Creates a table definition cache key for this table entry.
392
* @param[out] Create key here (must be of size MAX_DBKEY_LENGTH)
396
* The table cache_key is created from:
400
* if the table is a tmp table, we add the following to make each tmp table
401
* unique on the slave:
403
* 4 bytes for master thread id
404
* 4 bytes pseudo thread id
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).
409
uint32_t create_table_def_key(char *key);
412
560
void close_thread_tables(Session *session);