170
202
bool force_index; ///< prefer index over table scan
171
203
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).
206
is the table a cartesian join, assumption is yes unless "solved"
208
bool isCartesian() const;
180
210
/** Field names in a USING clause for JOIN ... USING. */
181
211
List<String> *join_using_fields;
212
242
TableList *next_leaf;
213
243
thr_lock_type lock_type;
214
244
uint32_t outer_join; ///< Which join type
215
uint32_t shared; ///<Used in multi-upd
216
uint32_t i_s_requested_object;
217
245
size_t db_length;
218
246
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
248
void set_underlying_merge();
239
249
bool setup_underlying(Session *session);
386
396
* true found and reported an error.
388
398
bool process_index_hints(Table *table);
400
friend std::ostream& operator<<(std::ostream& output, const TableList &list)
402
output << "TableList:(";
405
output << list.table_name;
407
output << list.alias;
409
output << "is_natural_join:" << list.is_natural_join;
411
output << "is_join_columns_complete:" << list.is_join_columns_complete;
413
output << "straight:" << list.straight;
415
output << "force_index" << list.force_index;
417
output << "ignore_leaves:" << list.ignore_leaves;
419
output << "create:" << list.create;
421
output << "outer_join:" << list.outer_join;
423
output << "nested_join:" << list.nested_join;
426
return output; // for multiple << operators.
429
void setIsAlias(bool in_is_alias)
431
is_alias= in_is_alias;
434
void setIsFqtn(bool in_is_fqtn)
439
void setCreate(bool in_create)
444
void setInternalTmpTable(bool in_internal_tmp_table)
446
internal_tmp_table= in_internal_tmp_table;
449
void setDbType(plugin::StorageEngine *in_db_type)
454
void setJoinList(List<TableList> *in_join_list)
456
join_list= in_join_list;
459
void setEmbedding(TableList *in_embedding)
461
embedding= in_embedding;
464
void setNestedJoin(NestedJoin *in_nested_join)
466
nested_join= in_nested_join;
469
void setDepTables(table_map in_dep_tables)
471
dep_tables= in_dep_tables;
474
void setOnExprDepTables(table_map in_on_expr_dep_tables)
476
on_expr_dep_tables= in_on_expr_dep_tables;
479
bool getIsAlias() const
484
bool getIsFqtn() const
489
bool isCreate() const
494
bool getInternalTmpTable() const
496
return internal_tmp_table;
499
plugin::StorageEngine *getDbType() const
504
TableList *getEmbedding() const
509
List<TableList> *getJoinList() const
514
NestedJoin *getNestedJoin() const
519
table_map getDepTables() const
524
table_map getOnExprDepTables() const
526
return on_expr_dep_tables;
529
void unlock_table_name();
530
void unlock_table_names(TableList *last_table= NULL);
533
table_map dep_tables; ///< tables the table depends on
534
table_map on_expr_dep_tables; ///< tables on expression depends on
535
NestedJoin *nested_join; ///< if the element is a nested join
536
TableList *embedding; ///< nested join containing the table
537
List<TableList> *join_list; ///< join list the table belongs to
538
plugin::StorageEngine *db_type; ///< table_type for handler
539
bool internal_tmp_table;
541
/** true if an alias for this table was specified in the SQL. */
545
* true if the table is referred to in the statement using a fully
546
* 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
551
* This TableList object corresponds to the table to be created
552
* so it is possible that it does not exist (used in CREATE TABLE
553
* ... SELECT implementation).
409
uint32_t create_table_def_key(char *key);
412
559
void close_thread_tables(Session *session);