[unixODBC-support] core dump in libodbccr.so on HP iA64

Cherie Soleil sunf2002 at gmail.com
Thu Nov 15 04:02:27 GMT 2007


Nick
IBM driver is using 64bit SQLULEN.
Here's a download of DB2 trial version
DB2 Version 9.1 fix packs & client downloads for HP-UX (IA64, HP
Integrity servers) -- (DB2 64-bit)
V9 Fix Pack 3 for HP-UX IA64 (64 bit)  :DB2 Connect Server
from here:
http://www-1.ibm.com/support/docview.wss?rs=56&context=SSEPDU&dc=DB520&uid=swg21255387&loc=en_US&cs=UTF-8&lang=en&rss=ct56db2

we are using DB2 64-bit open source ODBC libdb2o.so.

When we build our application we used -DDBUILD_REAL_64_BIT_MODE . I
think IBM 64-bit diver are using the same definition as unixodbc
driver manager libodbc.so because our application can work well with
IBM db2 driver and can work well with unixodbc driver manager at the
same time. So the definition should be same ,otherwize there muxt be a
lot of core dump.
The only problem happens when use libodbccr.so.

Need any other information from me I'd like to supply.

Thanks.

On Nov 14, 2007 7:02 PM, Nick Gorham <nick.gorham at easysoft.com> wrote:
> Cherie Soleil wrote:
>
> >Thank you very much Nick. I found my problem for setting the
> >SQL_CUR_USE_IF_NEEDED.
> >
> >But when I used your unixodbc2.2.13pre I can still get the exactly
> >same core dump as I wrote in previous mails.
> >
> >
> When I looked at this yesterday, I reduced the operation you were doing
> down to the following
>
> > #include <stdio.h>
> > #include <sql.h>
> > #include <sqlext.h>
> >
> > int main( void )
> > {
> >     SQLHANDLE henv, hdbc, hstmt;
> >     SQLRETURN ret;
> >     SQLCHAR str[ 256 ], name[ 30 ];
> >     SQLINTEGER ival;
> >     SQLSMALLINT sival, dtype, ddigits, nul;
> >     SQLULEN csize, lval;
> >     int long_val;
> >
> >     ret = SQLAllocHandle( SQL_HANDLE_ENV, NULL, &henv );
> >     ret = SQLSetEnvAttr( henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)3,
> > SQL_IS_UINTEGER );
> >     ret = SQLAllocHandle( SQL_HANDLE_DBC, henv, &hdbc );
> >
> >     ret = SQLSetConnectAttr( hdbc, SQL_ATTR_ODBC_CURSORS,
> > SQL_CUR_USE_IF_NEEDED, SQL_IS_UINTEGER );
> >     ret = SQLSetConnectAttr( hdbc, SQL_ATTR_QUIET_MODE, SQL_FALSE,
> > SQL_IS_POINTER );
> >
> >     ret = SQLConnect( hdbc, "driver", SQL_NTS, "user", SQL_NTS,
> > "password", SQL_NTS );
> >
> >     ret = SQLAllocHandle( SQL_HANDLE_STMT, hdbc, &hstmt );
> >
> >     ret = SQLExecDirect( hstmt, "select * from ty1", SQL_NTS );
> >
> >     ret = SQLBindCol( hstmt, 1, SQL_C_SLONG, &long_val, sizeof(
> > long_val ), &lval );
> >
> >     ret = SQLFetch( hstmt );
> >
> >     printf( "fetched %d %d %d\n", ret, long_val, lval );
> > }
>
>
> I would expect the above code to show the same problem with the IBM driver.
>
> --
>
> Nick Gorham
> Easysoft Limited
> http://www.easysoft.com, http://www.unixODBC.org
>
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at easysoft.com
> http://mail.easysoft.com/mailman/listinfo/unixodbc-support
>



More information about the unixODBC-support mailing list