summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@sun.com>2009-07-10 17:34:03 +0600
committerAlexey Kopytov <Alexey.Kopytov@sun.com>2009-07-10 17:34:03 +0600
commit9cb84f8466d9f51dc5444f8034a489957fed6fe4 (patch)
tree491fcfae5d84cff9f10b2ea29d4687328e86f5ba /include
parentaf1f8c6dd8389e76866b958626b562bad48681d1 (diff)
downloadmariadb-git-9cb84f8466d9f51dc5444f8034a489957fed6fe4.tar.gz
Bug #45796: invalid memory reads and writes when altering merge
and base tables myrg_attach_children() could reuse a buffer that was allocated previously based on a definition of a child table. The problem was that the child's definition might have been changed, so reusing the buffer could lead to crashes or valgrind errors under some circumstances. Fixed by changing myrg_attach_children() so that the rec_per_key_part buffer is reused only when the child table have not changed, and reallocated otherwise (the old buffer is deallocated if necessary).
Diffstat (limited to 'include')
-rw-r--r--include/myisammrg.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/myisammrg.h b/include/myisammrg.h
index dafae157ee0..446ecb7d719 100644
--- a/include/myisammrg.h
+++ b/include/myisammrg.h
@@ -88,7 +88,8 @@ extern MYRG_INFO *myrg_parent_open(const char *parent_name,
void *callback_param);
extern int myrg_attach_children(MYRG_INFO *m_info, int handle_locking,
MI_INFO *(*callback)(void*),
- void *callback_param);
+ void *callback_param,
+ my_bool *need_compat_check);
extern int myrg_detach_children(MYRG_INFO *m_info);
extern int myrg_panic(enum ha_panic_function function);
extern int myrg_rfirst(MYRG_INFO *file,uchar *buf,int inx);