Bug #23573 assertion in ha_innobase::close
Submitted: 24 Oct 2006 8:28 Modified: 15 Mar 2007 13:13
Reporter: Georg Richter Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.1.12 OS:Windows (Windows debug)
Assigned to: Assigned Account CPU Architecture:Any

[24 Oct 2006 8:28] Georg Richter
Description:
When running testsuite (Win32 debug) it stops with assertion in ha_innodb.cc, cause DBUG_RETURN was called after executing my_free().

We call DBUG_RETURN in function free_share and in ha_innobase::close.

How to repeat:
Compile Win32 debug version and execute

./mysql-test-run.pl --skip-im

Suggested fix:
use DBUG_LEAVE and return(value)
[24 Oct 2006 11:25] Heikki Tuuri
Osku,

please make these little changes in ha_innodb.cc

Regards,

Heikki
[30 Oct 2006 16:20] Georg Richter
Sorry, for confusion, debugger displayed wrong information, or some binaries weren't up to date.

the assert happens when calling my_free((gptr) upd_buff, MYF(0)):

    * If this ASSERT fails, a bad pointer has been passed in. It may be
    * totally bogus, or it may have been allocated from another heap.
    * The pointer MUST come from the 'local' heap.
   */
   _ASSERTE(_CrtIsValidHeapPointer(pUserData));

Stack trace:
mysqld.exe!_free_dbg_nolock(void * pUserData=0x0000000003368df8, int nBlockUse=1)  Line 1252 + 0x39 bytes	C++
mysqld.exe!_free_dbg(void * pUserData=0x0000000003368df8, int nBlockUse=1)  Line 1194 + 0xe bytes	C++
mysqld.exe!free(void * pUserData=0x0000000003368df8)  Line 1153	C++
mysqld.exe!my_no_flags_free(char * ptr=0x0000000003368df8)  Line 61	C
mysqld.exe!ha_innobase::close()  Line 2485	C++
[15 Mar 2007 13:13] Heikki Tuuri
This is a duplicate of http://bugs.mysql.com/bug.php?id=27143