On Mon, Sep 02, 2013 at 08:53:18PM +0100, Martin J. Evans wrote:
> On 02/09/2013 20:27, Martin J. Evans wrote:
> >
> >Now, table_info() with no arguments is not mentioned in the DBI pod so
> >you could say that is undefined behaviour but it is a little late for
> >that now as DBD::ODBC uses it in test code and as far as I know, so do
> >others. However, to fix the initial bug I cannot know when empty strings
> >are supposed to be undef/NULL and when they are supposed to be empty
> >strings. So I can fix the bug as shown but only if I change DBD::ODBC
> >test code from table_info() to table_info('%', '%', '%', '%') and I
> >cannot change anyone elses code.
> 
> Correction, in that last paragraph (I did warn you), I should have
> said table_info() to table_info('%', '%', '%') i.e.,
> 
> table_info('%', '', '') returns catalogs only
> table_info('', '%', '') returns schemas only
> table_info('', '', '', '%') returns types only
> table_info('%', '%', '%') returns everything
> table_info() did return everything due to workaround in DBD::ODBC
> but fixing bug ends up in table_info() returning nothing.

How about changing your test code to table_info('%', '%', '%', '%')
and treat table_info() a special case that triggers a warning?

Tim.

Reply via email to