mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
cleanup
remove casts. uchar can store 1/0 as good as bool.
This commit is contained in:
@ -28287,20 +28287,20 @@ JOIN::reoptimize(Item *added_where, table_map join_tables,
|
||||
|
||||
void JOIN::cache_const_exprs()
|
||||
{
|
||||
bool cache_flag= FALSE;
|
||||
bool *analyzer_arg= &cache_flag;
|
||||
uchar cache_flag= FALSE;
|
||||
uchar *analyzer_arg= &cache_flag;
|
||||
|
||||
/* No need in cache if all tables are constant. */
|
||||
if (const_tables == table_count)
|
||||
return;
|
||||
|
||||
if (conds)
|
||||
conds->compile(thd, &Item::cache_const_expr_analyzer, (uchar **)&analyzer_arg,
|
||||
&Item::cache_const_expr_transformer, (uchar *)&cache_flag);
|
||||
conds->compile(thd, &Item::cache_const_expr_analyzer, &analyzer_arg,
|
||||
&Item::cache_const_expr_transformer, &cache_flag);
|
||||
cache_flag= FALSE;
|
||||
if (having)
|
||||
having->compile(thd, &Item::cache_const_expr_analyzer, (uchar **)&analyzer_arg,
|
||||
&Item::cache_const_expr_transformer, (uchar *)&cache_flag);
|
||||
having->compile(thd, &Item::cache_const_expr_analyzer,
|
||||
&analyzer_arg, &Item::cache_const_expr_transformer, &cache_flag);
|
||||
|
||||
for (JOIN_TAB *tab= first_depth_first_tab(this); tab;
|
||||
tab= next_depth_first_tab(this, tab))
|
||||
@ -28309,9 +28309,7 @@ void JOIN::cache_const_exprs()
|
||||
{
|
||||
cache_flag= FALSE;
|
||||
(*tab->on_expr_ref)->compile(thd, &Item::cache_const_expr_analyzer,
|
||||
(uchar **)&analyzer_arg,
|
||||
&Item::cache_const_expr_transformer,
|
||||
(uchar *)&cache_flag);
|
||||
&analyzer_arg, &Item::cache_const_expr_transformer, &cache_flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user