1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +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

@@ -86,7 +86,7 @@ public:
QUICK_SELECT(THD *thd, TABLE *table,uint index_arg,bool no_alloc=0);
virtual ~QUICK_SELECT();
void reset(void) { next=0; it.rewind(); }
virtual void reset(void);
int init()
{
key_part_info= head->key_info[index].key_part;
@@ -120,7 +120,7 @@ private:
#ifdef NOT_USED
bool test_if_null_range(QUICK_RANGE *range, uint used_key_parts);
#endif
void reset(void) { next=0; rev_it.rewind(); }
void reset(void);
List<QUICK_RANGE> rev_ranges;
List_iterator<QUICK_RANGE> rev_it;
};