Bug #24925 httpd segfault after php attempts attempt to non-existing database
Submitted: 8 Dec 2006 20:12 Modified: 8 Dec 2006 21:03
Reporter: mack rhinelander Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Embedded Library ( libmysqld ) Severity:S2 (Serious)
Version:Ver 14.7 Distrib 4.1.21 readline 4.3 OS:Linux (linux 2.6.9-42.0.3.ELsmp x_86_64)
Assigned to: CPU Architecture:Any
Tags: 64-bit, apache2, httpd, libmysqlclient, php, segfault, x86_64

[8 Dec 2006 20:12] mack rhinelander
Description:
When the php application phpadsnew is invoked, but the phpadsnew database is not present (due to oversight during a migration), the calls to mysql cause httpd to segfault, instead of a clean "no database found" error.

A gdb on httpd (note, NOT mysqld) is:

Error received when running gdb:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 182897535712 (LWP 17836)] 0x0000002a95f587d5 in get_charset_by_csname ()    from /usr/lib64/libmysqlclient.so.14 (gdb)

Redhat 64-bit linux, 2.6.9-42.0.3.ELsmp x86_64
httpd Apache/2.2.3

How to repeat:
I'm sorry, I am unable to provide repeatability instructions.
[8 Dec 2006 20:57] Hartmut Holzgraefe
We're sorry, but the bug system is not the appropriate forum for asking help on using MySQL products. Your problem is not the result of a bug.

Support on using our products is available both free in our forums at http://forums.mysql.com/ and for a reasonable fee direct from our skilled support engineers at http://www.mysql.com/support/

Thank you for your interest in MySQL.
[8 Dec 2006 21:03] mack rhinelander
Thank you for your fast response!  

I thought it was a bug, in that I would expect not finding the database to cause a clean "not found" error, surely not a segfault?  I've seen other segfault bugs reported, always for php on 64bit linux, it seemed, so I presumed this was related.  Is it not a bug in the sense that: this is the expected behavior?

Thanks again.