Bug #47719 mysqld crashes if handlerton->show_status returns an error
Submitted: 29 Sep 2009 15:29 Modified: 30 Sep 2009 9:15
Reporter: Zardosht Kasheff (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.36, 5.1 bzr OS:Any
Assigned to: CPU Architecture:Any

[29 Sep 2009 15:29] Zardosht Kasheff
From an email thread on the internals list:

Hi, Zardosht!

On Sep 29, Zardosht Kasheff wrote:
> In the function ha_show_status, in handler.cc, I see the following
> code to end the function:
>   if (!result)
>     my_eof(thd);
>   return result;
> }
> So, if the handlerton's show_status function successfully returns,
> my_eof(thd) is called, and the assert is not hit in protocol.cc.
> However, if show_status returns an error, then nothing is called here,
> causing the assert.

This looks like a bug to me.

> Is there something simple and safe that can be done that allows
> show_status to return an error in some cases, but not causing a crash?

The simple and safe workaround that you can do is to call my_error()
when you have an error. It will set the proper status in the

Regards / Mit vielen Grüßen,

How to repeat:
have a storage engine's show_status function return an error.

Suggested fix:
what Sergei suggests.
[30 Sep 2009 9:15] Sveta Smirnova
Thank you for the report.

Verified as described.
[26 Mar 2010 19:43] Zardosht Kasheff
patch for 5.1.43

Attachment: 10-MySQL_47719.txt (text/plain), 349 bytes.