• Bug#265526: mysql++: FTBFS with gcc-3.4: `sql_use_compare' undeclared (

    From Andreas Jochens@1:229/2 to All on Fri Aug 13 17:10:09 2004
    From: [email protected]

    Package: mysql++
    Severity: normal
    Tags: patch

    When building 'mysql++' with gcc-3.4 I get the following error:

    In file included from query1.hh:12,
    from connection1.hh:20,
    from connection2.hh:4,
    from connection3.hh:2,
    from connection.cc:2:
    sql_query1.hh: In member function `SQLQuery& SQLQuery::update(const T&, const T&)':
    sql_query1.hh:171: error: `sql_use_compare' undeclared (first use this function)
    sql_query1.hh:171: error: (Each undeclared identifier is reported only once for each function it appears in.)
    make[4]: *** [connection.lo] Error 1
    make[4]: Leaving directory `/mysql++-1.7.9.sp4/sqlplusint'

    With the attached patch 'mysql++' can be compiled using gcc-3.4.

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/mysql++-1.7.9.sp4/sqlplusint/coldata3.hh ./sqlplusint/coldata3.hh
    --- ../tmp-orig/mysql++-1.7.9.sp4/sqlplusint/coldata3.hh 2001-05-19 18:44:48.000000000 +0200
    +++ ./sqlplusint/coldata3.hh 2004-08-13 16:46:53.955821009 +0200
    @@ -16,7 +16,7 @@
    template <class Str> template <class T, class B>
    mysql_ColData<Str>::operator Null<T,B> () const {
    if ((*this)[0] == 'N' && (*this)[1] == 'U' &&
    - (*this)[2] == 'U' && (*this)[3] == 'L' && size() == 4)
    + (*this)[2] == 'U' && (*this)[3] == 'L' && this->size() == 4)
    return Null<T,B>(null);
    else return Null<T,B>(conv(T()));
    }
    diff -urN ../tmp-orig/mysql++-1.7.9.sp4/sqlplusint/coldata4.hh ./sqlplusint/coldata4.hh
    --- ../tmp-orig/mysql++-1.7.9.sp4/sqlplusint/coldata4.hh 2003-03-06 19:16:21.000000000 +0100
    +++ ./sqlplusint/coldata4.hh 2004-08-13 16:46:38.538164849 +0200
    @@ -20,7 +20,7 @@
    for (;*end == '0'; end++);
    }
    if (*end != '\0' && end != NULL ) {
    - throw BadConversion (typeid(Type).name(), c_str(), end - str, len);
    + throw BadConversion (typeid(Type).name(), this->c_str(), end -