From: Michele C. <m....@it...> - 2004-01-03 11:43:44
|
Hi all and sorry for my poor english. I tested OdbcJdbc driver for Firebird. Great work !!!! I fave found an incorrect reslt for NULL indicator. Here there is an example: CREATE TABLE XX ( YY INTEGER, YYSTR VARCHAR(10) ); COMMIT WORK; INSERT INTO XX (YY, YYSTR) VALUES (NULL, NULL); COMMIT; From a test MFC Application I test NULL status of XX and YYSTR fields: XX is NULL (correctly) and YYSTR is NOT NULL (wrong!!!). All work fine if table's fields are all INTEGER such as above example: CREATE TABLE XX2 ( YY INTEGER, YY2 INTEGER ); COMMIT WORK; INSERT INTO XX2 (YY, YY2) VALUES (NULL, NULL); COMMIT; From a test MFC Application, in this case, YY is NULL and YY2 is NULL. So I have done some debuggging for investigating the problem. In the first case, into IscResultSet::next() after int ret = statement->connection->GDS->_dsql_fetch (statusVector, &statement->statementHandle, dialect, *sqlda); I have found that sqlind for the second XSQLVAR (field YYSTR) is 0. So or isc_dsql_fetch have a bug or there was a buffer overflow. Into Sqlda::allocBuffer I saw that indicators buffers were allocated at the end of data buffers. Is an overflow of YYSTR varying fetching that overwrite YY indicator buffer? I don't know the OdbcJdbc soruce code, so my investigation halted here. I hope this is useful. My ENV is: VS 6 SP5 MFC Application Win2k Pro SP4 Firebird 1.5 RC7 and RC8 OdbcJdbc (snapshot 2003-12-29) |