mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
merge
This commit is contained in:
commit
de2c4f0ad0
3 changed files with 11 additions and 4 deletions
|
@ -2044,13 +2044,15 @@ restart:
|
|||
}
|
||||
else
|
||||
{
|
||||
size_t block_mem_offset;
|
||||
/* There are some never used blocks, take first of them */
|
||||
DBUG_ASSERT(keycache->blocks_used <
|
||||
(ulong) keycache->disk_blocks);
|
||||
block= &keycache->block_root[keycache->blocks_used];
|
||||
block_mem_offset=
|
||||
((size_t) keycache->blocks_used) * keycache->key_cache_block_size;
|
||||
block->buffer= ADD_TO_PTR(keycache->block_mem,
|
||||
((ulong) keycache->blocks_used*
|
||||
keycache->key_cache_block_size),
|
||||
block_mem_offset,
|
||||
uchar*);
|
||||
keycache->blocks_used++;
|
||||
DBUG_ASSERT(!block->next_used);
|
||||
|
|
|
@ -174,7 +174,7 @@ void *_mymalloc(size_t size, const char *filename, uint lineno, myf MyFlags)
|
|||
data[size + 3]= MAGICEND3;
|
||||
irem->filename= (char *) filename;
|
||||
irem->linenum= lineno;
|
||||
irem->datasize= (uint32) size;
|
||||
irem->datasize= size;
|
||||
irem->prev= NULL;
|
||||
|
||||
/* Add this remember structure to the linked list */
|
||||
|
|
|
@ -898,6 +898,8 @@ int ha_ibmdb2i::index_init(uint idx, bool sorted)
|
|||
releaseIndexFile(idx);
|
||||
}
|
||||
|
||||
rrnAssocHandle= 0;
|
||||
|
||||
DBUG_RETURN(rc);
|
||||
}
|
||||
|
||||
|
@ -1154,6 +1156,8 @@ int ha_ibmdb2i::rnd_init(bool scan)
|
|||
releaseDataFile();
|
||||
}
|
||||
|
||||
rrnAssocHandle= 0;
|
||||
|
||||
DBUG_RETURN(0); // MySQL sometimes does not check the return code, causing
|
||||
// an assert in ha_rnd_end later on if we return a non-zero
|
||||
// value here.
|
||||
|
@ -1251,7 +1255,8 @@ int ha_ibmdb2i::rnd_pos(uchar * buf, uchar *pos)
|
|||
|
||||
int rc = 0;
|
||||
|
||||
if (activeHandle != rrnAssocHandle)
|
||||
if (rrnAssocHandle &&
|
||||
(activeHandle != rrnAssocHandle))
|
||||
{
|
||||
if (activeHandle) releaseActiveHandle();
|
||||
rc = useFileByHandle(QMY_UPDATABLE, rrnAssocHandle);
|
||||
|
|
Loading…
Add table
Reference in a new issue