1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fixed bug when making a range join based on information from a const table.

This commit is contained in:
monty@hundin.mysql.fi
2002-01-18 00:43:50 +02:00
parent 89f8ca058e
commit 89fa5f13d9
6 changed files with 103 additions and 11 deletions

View File

@@ -1026,14 +1026,13 @@ make_join_statistics(JOIN *join,TABLE_LIST *tables,COND *conds,
{
ha_rows records;
if (!select)
select=make_select(s->table,const_table_map,
select=make_select(s->table,0,
0,
and_conds(conds,s->on_expr),&error);
records=get_quick_record_count(select,s->table, s->const_keys);
s->quick=select->quick;
s->needed_reg=select->needed_reg;
select->quick=0;
select->read_tables=const_table_map;
if (records != HA_POS_ERROR)
{
s->found_records=records;