I' m developing a client application using C-Api functions . Server and Client reside on the same machine, so I connect the Server via Unix socket . If I call the mysql_real_query after the wait_timeout expired on the server side , my client crashes. The Manual speaks about the ability of catch the "server has gone away Error", Why I haven't ?