MySQL Client Library Segmentation Fault; Net_clear; sql/net_serv.cc;

(Doc ID 1554557.1)

Last updated on OCTOBER 25, 2017

Applies to:

MySQL Server - Version 4.0 to 5.7 [Release 4.0 to 5.7]
Information in this document applies to any platform.

Symptoms

When attempting to use the C API to execute a prepared statement after the connection to the server was lost, an error occurs similar to:

The segmentation fault can also occur in other places such as in Net_clear in sql/net_serv.cc.
The issue can be reproduced at will with the following steps:

  1. Prepare a statement.
  2. Lose the connection to the server, e.g. due to wait_timeout or a server restart.
  3. Prepare a second statement.
  4. Execute the first prepared statement.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms