1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result

Reseting subqueries with "quick" access methods was incomplete.
 Partially backported the correct reseting of QUICK_SELECTs from 5.x.


mysql-test/r/subselect.result:
  Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
   - test case
mysql-test/t/subselect.test:
  Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
   - test case
sql/opt_range.cc:
  Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
   - partially backported the correct reseting of QUICK_SELECTs from 5.x.
sql/opt_range.h:
  Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
   - partially backported the correct reseting of QUICK_SELECTs from 5.x.
This commit is contained in:
unknown
2006-08-03 19:20:30 +03:00
parent 84ece59cef
commit 8462d3a46a
4 changed files with 70 additions and 3 deletions

View File

@ -2980,6 +2980,14 @@ int QUICK_SELECT::get_next()
}
}
void QUICK_SELECT::reset(void)
{
next= 0;
it.rewind();
range= 0;
if (file->inited == handler::NONE)
file->ha_index_init(index);
}
/* Get next for geometrical indexes */
@ -3201,7 +3209,11 @@ bool QUICK_SELECT_DESC::test_if_null_range(QUICK_RANGE *range_arg,
return 0;
}
#endif
void QUICK_SELECT_DESC::reset(void)
{
rev_it.rewind();
QUICK_SELECT::reset();
}
/*****************************************************************************
** Print a quick range for debugging