Bug #15047 | server crash when compiling without transaction support | ||
---|---|---|---|
Submitted: | 18 Nov 2005 12:00 | Modified: | 2 Dec 2005 20:30 |
Reporter: | Kristian Nielsen | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | Newest 5.0.17 from bk tree | OS: | x86 Debian Sarge |
Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
[18 Nov 2005 12:00]
Kristian Nielsen
[18 Nov 2005 20:55]
Will Miles
I struck this one using the 5.0.15 embedded libmysqld and QNX Neutrino 6.3.0 SP1 and 2. I traced it to sql_class.h; it appears that the constructor for THD::st_transactions zeros and initializes the structure, but it's #ifdef'd out if USING_TRANSACTIONS is false. However, in THD::init_for_queries, there is a call to ha_enable_transaction that is invoked regardless of the setting of USING_TRANSACTIONS; this in turn calls end_trans, that depends on the (uninitialized) value stored in the st_transactions structure. Because it's reading uninitialized memory, sometimes it will succeed and sometimes it will fail. I worked around this one by removing the #ifdef around the THD::st_transactions structure. I doubt this is the 'correct' fix; perhaps someone with a deeper knowledge of the transaction calls could add an #ifdef in the right place. Note of course that it will only happen if you compile WITHOUT Berkeley, Innobase, or NDB support (and thusly USING_TRANSACTIONS is not defined).
[20 Nov 2005 15:13]
Kristian Nielsen
Indeed, the problem appeared in a compile without transactional engines, and disappears when adding a transactional engine (--innodb). I think this is somewhat serious for anyone trying to compile a minimal server themselves, since the bug is somewhat difficult to track down, but on the other hand compiling MySQL is discouraged anyway. The analysis by Will Miles seems a good starting point for a fix.
[21 Nov 2005 7:55]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/internals/32445
[24 Nov 2005 14:38]
Ramil Kalimullin
fixed in 5.0.17
[2 Dec 2005 20:30]
Paul DuBois
Noted in 5.0.17 changelog.