Skip Menu |
 

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 29691
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: ilmari+cpan [...] ilmari.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Should export ER_* error constants
Download (untitled) / with headers
text/plain 189b
Having access to the ER_* constants from mysqld_error.h would be useful for comparing against $handle->err instead of having to use the numbers directly or matching against $handle->errstr.
Download (untitled) / with headers
text/plain 420b
On Mon Oct 01 08:49:21 2007, ilmari wrote: Show quoted text
> Having access to the ER_* constants from mysqld_error.h would be useful > for comparing against $handle->err instead of having to use the numbers > directly or matching against $handle->errstr.
The only issue with this is that one would have to have server headers in a perl client driver codebase and in many cases the driver is installed on a server with no server install
Subject: Re: [rt.cpan.org #29691] Should export ER_* error constants
Date: Sun, 27 Oct 2013 15:54:50 +0100
To: bug-DBD-mysql [...] rt.cpan.org
From: ilmari [...] ilmari.org (Dagfinn Ilmari Mannsåker)
"Patrick Galbraith via RT" <bug-DBD-mysql@rt.cpan.org> writes: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=29691 > > > On Mon Oct 01 08:49:21 2007, ilmari wrote:
>> Having access to the ER_* constants from mysqld_error.h would be useful >> for comparing against $handle->err instead of having to use the numbers >> directly or matching against $handle->errstr.
> > The only issue with this is that one would have to have server headers > in a perl client driver codebase and in many cases the driver is > installed on a server with no server install
I dodn't know about other OSes, but on Debian/Ubuntu mysqld_error.h is included in the libmysqlclient-dev package, which is needed to build DBD::mysql anyway. It'd be simple to extract the constant names and values at build time, so the header isn't required at runtime. -- "I use RMS as a guide in the same way that a boat captain would use a lighthouse. It's good to know where it is, but you generally don't want to find yourself in the same spot." - Tollef Fog Heen


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.