Below is the list of changes that have just been committed into a local
5.1 repository of hf. When hf does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-06-25 12:45:34+05:00, holyfoot@stripped +1 -0
Bug #29252 Assertion 'table->file || table->file->inited == handler::NONE'
failed
when index_init() or rnd_init() return an error, we still set
handler->inited to INDEX or RND in ha_index_init and ha_rnd_init.
As caller doesn't call ha_*_end() in this case, we get DBUG_ASSERT
failed.
sql/handler.h@stripped, 2007-06-25 12:45:31+05:00, holyfoot@stripped +7 -4
Bug #29252 Assertion 'table->file || table->file->inited == handler::NONE'
failed.
make sure that 'inited' is handler::NONE if index_init() or rnd_init()
returned an error
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: holyfoot
# Host: hfmain.(none)
# Root: /home/hf/work/29252/my51-29252
--- 1.264/sql/handler.h 2007-06-25 12:45:38 +05:00
+++ 1.265/sql/handler.h 2007-06-25 12:45:38 +05:00
@@ -1097,10 +1097,12 @@ public:
int ha_index_init(uint idx, bool sorted)
{
+ int result;
DBUG_ENTER("ha_index_init");
DBUG_ASSERT(inited==NONE);
- inited=INDEX;
- DBUG_RETURN(index_init(idx, sorted));
+ if (!(result= index_init(idx, sorted)))
+ inited=INDEX;
+ DBUG_RETURN(result);
}
int ha_index_end()
{
@@ -1111,10 +1113,11 @@ public:
}
int ha_rnd_init(bool scan)
{
+ int result;
DBUG_ENTER("ha_rnd_init");
DBUG_ASSERT(inited==NONE || (inited==RND && scan));
- inited=RND;
- DBUG_RETURN(rnd_init(scan));
+ inited= (result= rnd_init(scan)) ? NONE: RND;
+ DBUG_RETURN(result);
}
int ha_rnd_end()
{
| Thread |
|---|
| • bk commit into 5.1 tree (holyfoot:1.2528) BUG#29252 | holyfoot | 25 Jun |