mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge with 5.1
This commit is contained in:
@ -1321,14 +1321,18 @@ public:
|
||||
DBUG_ENTER("ha_index_init");
|
||||
DBUG_ASSERT(inited==NONE);
|
||||
if (!(result= index_init(idx, sorted)))
|
||||
inited=INDEX;
|
||||
{
|
||||
inited= INDEX;
|
||||
active_index= idx;
|
||||
}
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
int ha_index_end()
|
||||
{
|
||||
DBUG_ENTER("ha_index_end");
|
||||
DBUG_ASSERT(inited==INDEX);
|
||||
inited=NONE;
|
||||
inited= NONE;
|
||||
active_index= MAX_KEY;
|
||||
DBUG_RETURN(index_end());
|
||||
}
|
||||
/* This is called after index_init() if we need to do a index scan */
|
||||
@ -1511,7 +1515,12 @@ public:
|
||||
as there may be several calls to this routine.
|
||||
*/
|
||||
virtual void column_bitmaps_signal();
|
||||
uint get_index(void) const { return active_index; }
|
||||
/*
|
||||
We have to check for inited as some engines, like innodb, sets
|
||||
active_index during table scan.
|
||||
*/
|
||||
uint get_index(void) const
|
||||
{ return inited == INDEX ? active_index : MAX_KEY; }
|
||||
virtual int close(void)=0;
|
||||
|
||||
/**
|
||||
@ -1997,8 +2006,8 @@ private:
|
||||
*/
|
||||
|
||||
virtual int open(const char *name, int mode, uint test_if_locked)=0;
|
||||
virtual int index_init(uint idx, bool sorted) { active_index= idx; return 0; }
|
||||
virtual int index_end() { active_index= MAX_KEY; return 0; }
|
||||
virtual int index_init(uint idx, bool sorted) { return 0; }
|
||||
virtual int index_end() { return 0; }
|
||||
/**
|
||||
rnd_init() can be called two times without rnd_end() in between
|
||||
(it only makes sense if scan=1).
|
||||
|
Reference in New Issue
Block a user