maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #06422
Re: MWL83: review
> +double JOIN::static_pushdown_cost(Item *pushed_cond, uint idx)
> +{
> + table_map cond_tables= pushed_cond->used_tables();
> + POSITION *last_pos= NULL;
> + POSITION *opt_pos;
> + double pushed_cond_cost;
Take the first example from condition_pushdown.inc:
explain extended
SELECT count(*) from t2 where b2 < '6' and b3 < '4' and b4 < '2';
Put a break point in this function. When it is hit:
(gdb) fini
Run till exit from #0 JOIN::static_pushdown_cost...
0x00000000006648f3 in best_extension_by_limited_search ...
Value returned is $9 = 8.9089074181826877
Run the query again:
Breakpoint 2, JOIN::static_pushdown_cost....
(gdb) set pushed_cond_cost=10000*10000*1000.
(gdb) fini
Run till exit from #0 JOIN::static_pushdown_cost...
0x00000000006648f3 in best_extension_by_limited_search ...
Value returned is $11 = 262103778125.49277
Apparently, the value is not initialized.
BR
Sergei
--
Sergei Petrunia, Software Developer
MariaDB | Skype: sergefp | Blog: http://s.petrunia.net/blog
References