mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-6152: Remove calls to current_thd while creating Item
- Part 4: Removing calls to sql_alloc() and sql_calloc() Other things: - Added current_thd in some places to make it clear that it's called (easier to remove later) - Move memory allocation from Item_func_case::fix_length_and_dec() to Item_func_case::fix_fields() - Added mem_root to some new calls - Fixed some wrong UNINIT_VAR() calls - Fixed a bug in generate_partition_syntax() in case of errors - Added mem_root to argument to new thread_info - Simplified my_parse_error() call in sql_yacc.yy
This commit is contained in:
@ -95,12 +95,13 @@ public:
|
||||
bound_sj_equalities(0),
|
||||
quick_uses_applicable_index(FALSE)
|
||||
{
|
||||
UNINIT_VAR(quick_max_loose_keypart); /* Protected by quick_uses_applicable_index */
|
||||
/* Protected by quick_uses_applicable_index */
|
||||
LINT_INIT(quick_max_loose_keypart);
|
||||
/* The following are protected by best_loose_scan_cost!= DBL_MAX */
|
||||
UNINIT_VAR(best_loose_scan_key);
|
||||
UNINIT_VAR(best_loose_scan_records);
|
||||
UNINIT_VAR(best_max_loose_keypart);
|
||||
UNINIT_VAR(best_loose_scan_start_key);
|
||||
LINT_INIT(best_loose_scan_key);
|
||||
LINT_INIT(best_loose_scan_records);
|
||||
LINT_INIT(best_max_loose_keypart);
|
||||
LINT_INIT(best_loose_scan_start_key);
|
||||
}
|
||||
|
||||
void init(JOIN *join, JOIN_TAB *s, table_map remaining_tables)
|
||||
@ -122,7 +123,7 @@ public:
|
||||
s->emb_sj_nest->sj_in_exprs < 64 &&
|
||||
((remaining_tables & s->emb_sj_nest->sj_inner_tables) == // (2)
|
||||
s->emb_sj_nest->sj_inner_tables) && // (2)
|
||||
join->cur_sj_inner_tables == 0 && // (3)
|
||||
join->cur_sj_inner_tables == 0 && // (3)
|
||||
!(remaining_tables &
|
||||
s->emb_sj_nest->nested_join->sj_corr_tables) && // (4)
|
||||
remaining_tables & s->emb_sj_nest->nested_join->sj_depends_on &&// (5)
|
||||
|
Reference in New Issue
Block a user