Re: Null values in result record are overwritten withprevious non-null data when using a prepared query more than once
"Buurman, H.A. (Herbert)" <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <2864EA5D33131F4FB33903DB89A0DD360139FE30@MAILSRV01.interlogica.nl> |
> -----Original Message----- > From: [email protected] > [mailto:[email protected]]On Behalf Of Frediano Ziglio > Sent: Wednesday, 17 June, 2009 17:06 > To: FreeTDS Development Group > Subject: Re: [freetds] Null values in result record are overwritten > withprevious non-null data when using a prepared query more than once > > Hi, > I tried to reproduce problem but without success... I > tested from 0.82 to > current development but I got always right results, my environment > > I'll try with a x86_64 machine. Any luck with that? > > You could try to enable ODBC logging adding these settings to > /etc/odbcinst.ini > > [ODBC] > Trace = Yes > TraceFile = /tmp/sql.log > ForceTrace = No > Pooling = No > Here we go (see attached sql.log), but unfortunately I lack the knowledge to interpret the results. (DSNnames have been obscured to protect the innocent). Hopefully you can do anything with it. Kind regards, H. Buurman <html> <body> <pre style="font-size: 7.5pt; font-family: Arial; color: black; font-style: italic; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"> <pre style="font-size: 7.5pt; font-family: Arial; color: black; font-style: italic; margin-left: 0cm; margin-right: 0cm; margin-top: 0cm; margin-bottom: .0001pt"><span lang="nl"><font color="#C0C0C0" style="font-size: 7pt" face="Arial"><i><b><u>Disclaimer</u> Deze e-mail is verzonden door Interlogica B.V. De inhoud en eventuele bijlagen zijn vertrouwelijk en uitsluitend bestemd voor de geadresseerde. Interlogica B.V. verzoekt bij onjuiste adressering direct contact met haar op te nemen (<a href="mailto:[email protected]">mailto:[email protected]</a>), de naam van de afzender en de geadresseerde aan haar op te geven en vervolgens dit e-mailbericht uit uw systeem te verwijderen. Interlogica B.V. is niet aansprakelijk voor het overbrengen van virussen en het is uw verantwoordelijkheid deze e-mail (en eventuele bijlagen) te controleren. Interlogica B.V. (geregistreerd bij het Handelsregister nr. 08067177) is gevestigd te Ecofactorij 20, NL-7325 WC Apeldoorn. This is an e-mail from Interlogica B.V. Its contents and any attachments are confidential and intended solely for the use of the individual to whom it is addressed. If received in error, please contact Interlogica B.V. (<a href="mailto:[email protected]">mailto:[email protected]</a>) quoting the name of the sender and the addressee, then delete it from your system. Please note that Interlogica B.V. does not accept any responsibility for viruses and it is your responsibility to scan the email and any attachments (if any). Interlogica B.V. (registered with the Chamber of Commerce no. 08067177) is resident at Ecofactorij 20, NL-7325 WC Apeldoorn, The Netherlands. </b></i> </font> <p> </p> </body> </html> _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds
sql.log
(application/octet-stream, 14.7 KB)
[ODBC][15262][__handles.c][444] Exit:[SQL_SUCCESS] Environment = 0xe038a0 [ODBC][15262][SQLSetEnvAttr.c][182] Entry: Environment = 0xe038a0 Attribute = SQL_ATTR_ODBC_VERSION Value = 0x3 StrLen = -6 [ODBC][15262][SQLSetEnvAttr.c][349] Exit:[SQL_SUCCESS] [ODBC][15262][SQLAllocHandle.c][345] Entry: Handle Type = 2 Input Handle = 0xe038a0 [ODBC][15262][SQLAllocHandle.c][463] Exit:[SQL_SUCCESS] Output Handle = 0xa1b470 [ODBC][15262][SQLDriverConnect.c][678] Entry: Connection = 0xa1b470 Window Hdl = (nil) Str In = [srvtst_02][length = 9] Str Out = 0x7fff17d2a7e0 Str Out Max = 512 Str Out Ptr = 0x7fff17d2a7de Completion = 0 [ODBC][15262][SQLDriverConnect.c][1085]Error: IM002 [ODBC][15262][SQLError.c][424] Entry: Connection = 0xa1b470 SQLState = 0x7fff17d2a530 Native = 0x7fff17d2a538 Message Text = 0x7fff17d2a540 Buffer Length = 511 Text Len Ptr = 0x7fff17d2a53e [ODBC][15262][SQLError.c][461] Exit:[SQL_SUCCESS] SQLState = IM002 Native = 0x7fff17d2a538 -> 0 Message Text = [[unixODBC][Driver Manager]Data source name not found, and no default driver specified] [ODBC][15262][SQLError.c][424] Entry: Connection = 0xa1b470 SQLState = 0x7fff17d2a530 Native = 0x7fff17d2a538 Message Text = 0x7fff17d2a540 Buffer Length = 511 Text Len Ptr = 0x7fff17d2a53e [ODBC][15262][SQLError.c][461] Exit:[SQL_NO_DATA] [ODBC][15262][SQLConnect.c][3549] Entry: Connection = 0xa1b470 Server Name = [srvtst_02][length = 9] User Name = [sa][length = 2] Authentication = [********][length = 8] UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE' [ODBC][15262][SQLConnect.c][4123] Exit:[SQL_SUCCESS] [ODBC][15262][SQLSetConnectAttr.c][318] Entry: Connection = 0xa1b470 Attribute = SQL_ATTR_AUTOCOMMIT Value = 0x1 StrLen = 0 [ODBC][15262][SQLSetConnectAttr.c][671] Exit:[SQL_SUCCESS] [ODBC][15262][SQLGetInfo.c][214] Entry: Connection = 0xa1b470 Info Type = SQL_DRIVER_ODBC_VER (77) Info Value = 0xe3f698 Buffer Length = 20 StrLen = 0x7fff17d2a7de [ODBC][15262][SQLGetInfo.c][528] Exit:[SQL_SUCCESS] [ODBC][15262][SQLGetInfo.c][214] Entry: Connection = 0xa1b470 Info Type = SQL_DRIVER_NAME (6) Info Value = 0xe3f73c Buffer Length = 80 StrLen = 0x7fff17d2a7de [ODBC][15262][SQLGetInfo.c][528] Exit:[SQL_SUCCESS] [ODBC][15262][SQLGetInfo.c][214] Entry: Connection = 0xa1b470 Info Type = SQL_DRIVER_VER (7) Info Value = 0xe3f78c Buffer Length = 20 StrLen = 0x7fff17d2a7de [ODBC][15262][SQLGetInfo.c][528] Exit:[SQL_SUCCESS] [ODBC][15262][SQLGetInfo.c][214] Entry: Connection = 0xa1b470 Info Type = SQL_MAX_COLUMN_NAME_LEN (30) Info Value = 0xe3f6ac Buffer Length = 2 StrLen = 0x7fff17d2a7de [ODBC][15262][SQLGetInfo.c][528] Exit:[SQL_SUCCESS] [ODBC][15262][SQLGetInfo.c][214] Entry: Connection = 0xa1b470 Info Type = SQL_DBMS_NAME (17) Info Value = 0xe3f6ae Buffer Length = 64 StrLen = 0x7fff17d2a7de [ODBC][15262][SQLGetInfo.c][528] Exit:[SQL_SUCCESS] [ODBC][15262][SQLGetFunctions.c][147] Entry: Connection = 0xa1b470 Id = SQLMoreResults Supported = 0x7fff17d2a7dc [ODBC][15262][SQLGetFunctions.c][182] Exit:[SQL_SUCCESS] Supported = 0x7fff17d2a7dc -> 1 [ODBC][15262][SQLGetFunctions.c][147] Entry: Connection = 0xa1b470 Id = SQLDescribeParam Supported = 0x7fff17d2a7dc [ODBC][15262][SQLGetFunctions.c][182] Exit:[SQL_SUCCESS] Supported = 0x7fff17d2a7dc -> 0 [ODBC][15262][SQLSetConnectOption.c][262] Entry: Connection = 0xa1b470 Option = SQL_ATTR_AUTOCOMMIT Value = 0 [ODBC][15262][SQLSetConnectOption.c][525] Exit:[SQL_SUCCESS] [ODBC][15262][SQLAllocHandle.c][510] Entry: Handle Type = 3 Input Handle = 0xa1b470 [ODBC][15262][SQLAllocHandle.c][872] Exit:[SQL_SUCCESS] Output Handle = 0xea8a80 [ODBC][15262][SQLPrepare.c][189] Entry: Statement = 0xea8a80 SQL = [SELECT Identifier, Value FROM freetds_test with(nolock) WHERE Identifier = ?][length = 76] [ODBC][15262][SQLPrepare.c][364] Exit:[SQL_SUCCESS] [ODBC][15262][SQLFreeStmt.c][140] Entry: Statement = 0xea8a80 Option = 3 [ODBC][15262][SQLFreeStmt.c][246] Exit:[SQL_SUCCESS] [ODBC][15262][SQLBindParameter.c][193] Entry: Statement = 0xea8a80 Param Number = 1 Param Type = 1 C Type = 1 SQL_C_CHAR SQL Type = 12 SQL_VARCHAR Col Def = 80 Scale = 0 Rgb Value = 0xeabe50 Value Max = 1 StrLen Or Ind = 0xeaac60 [ODBC][15262][SQLBindParameter.c][339] Exit:[SQL_SUCCESS] [ODBC][15262][SQLExecute.c][183] Entry: Statement = 0xea8a80 [ODBC][15262][SQLExecute.c][344] Exit:[SQL_SUCCESS] [ODBC][15262][SQLError.c][342] Entry: Statement = 0xea8a80 SQLState = 0x7fff17d2a8c0 Native = 0x7fff17d2a8c8 Message Text = 0x7fff17d2a8d0 Buffer Length = 1023 Text Len Ptr = 0x7fff17d2a8ce [ODBC][15262][SQLError.c][379] Exit:[SQL_NO_DATA] [ODBC][15262][SQLError.c][424] Entry: Connection = 0xa1b470 SQLState = 0x7fff17d2a8c0 Native = 0x7fff17d2a8c8 Message Text = 0x7fff17d2a8d0 Buffer Length = 1023 Text Len Ptr = 0x7fff17d2a8ce [ODBC][15262][SQLError.c][461] Exit:[SQL_NO_DATA] [ODBC][15262][SQLError.c][504] Entry: Environment = 0xe038a0 SQLState = 0x7fff17d2a8c0 Native = 0x7fff17d2a8c8 Message Text = 0x7fff17d2a8d0 Buffer Length = 1023 Text Len Ptr = 0x7fff17d2a8ce [ODBC][15262][SQLError.c][541] Exit:[SQL_NO_DATA] [ODBC][15262][SQLRowCount.c][166] Entry: Statement = 0xea8a80 Row Count = 0xea8638 [ODBC][15262][SQLRowCount.c][237] Exit:[SQL_SUCCESS] Row Count = 0xea8638 -> -1 [ODBC][15262][SQLNumResultCols.c][149] Entry: Statement = 0xea8a80 Column Count = 0x7fff17d2ad40 [ODBC][15262][SQLNumResultCols.c][234] Exit:[SQL_SUCCESS] Count = 0x7fff17d2ad40 -> 2 [ODBC][15262][SQLNumResultCols.c][149] Entry: Statement = 0xea8a80 Column Count = 0x7fff17d2ace6 [ODBC][15262][SQLNumResultCols.c][234] Exit:[SQL_SUCCESS] Count = 0x7fff17d2ace6 -> 2 [ODBC][15262][SQLDescribeCol.c][231] Entry: Statement = 0xea8a80 Column Number = 1 Column Name = 0xeac310 Buffer Length = 128 Name Length = 0xeabd20 Data Type = 0xeabd32 Column Size = 0xeabd28 Decimal Digits = 0xeabd30 Nullable = 0xeabd34 [ODBC][15262][SQLDescribeCol.c][474] Exit:[SQL_SUCCESS] Column Name = [Identifier] Data Type = 0xeabd32 -> 1 Column Size = 0xeabd28 -> 1 Decimal Digits = 0xeabd30 -> 0 Nullable = 0xeabd34 -> 0 [ODBC][15262][SQLColAttributes.c][267] Entry: Statement = 0xea8a80 Column Number = 1 Field Identifier = SQL_DESC_DISPLAY_SIZE Character Attr = (nil) Buffer Length = 0 String Length = (nil) Numeric Attribute = 0xeabd40 [ODBC][15262][SQLColAttributes.c][584] Exit:[SQL_SUCCESS] [ODBC][15262][SQLColAttributes.c][267] Entry: Statement = 0xea8a80 Column Number = 1 Field Identifier = SQL_COLUMN_LENGTH Character Attr = (nil) Buffer Length = 0 String Length = (nil) Numeric Attribute = 0xeabd38 [ODBC][15262][SQLColAttributes.c][584] Exit:[SQL_SUCCESS] [ODBC][15262][SQLDescribeCol.c][231] Entry: Statement = 0xea8a80 Column Number = 2 Column Name = 0xeac31b Buffer Length = 128 Name Length = 0xeabd90 Data Type = 0xeabda2 Column Size = 0xeabd98 Decimal Digits = 0xeabda0 Nullable = 0xeabda4 [ODBC][15262][SQLDescribeCol.c][474] Exit:[SQL_SUCCESS] Column Name = [Value] Data Type = 0xeabda2 -> 4 Column Size = 0xeabd98 -> 10 Decimal Digits = 0xeabda0 -> 0 Nullable = 0xeabda4 -> 1 [ODBC][15262][SQLColAttributes.c][267] Entry: Statement = 0xea8a80 Column Number = 2 Field Identifier = SQL_DESC_DISPLAY_SIZE Character Attr = (nil) Buffer Length = 0 String Length = (nil) Numeric Attribute = 0xeabdb0 [ODBC][15262][SQLColAttributes.c][584] Exit:[SQL_SUCCESS] [ODBC][15262][SQLColAttributes.c][267] Entry: Statement = 0xea8a80 Column Number = 2 Field Identifier = SQL_COLUMN_LENGTH Character Attr = (nil) Buffer Length = 0 String Length = (nil) Numeric Attribute = 0xeabda8 [ODBC][15262][SQLColAttributes.c][584] Exit:[SQL_SUCCESS] [ODBC][15262][SQLBindCol.c][165] Entry: Statement = 0xea8a80 Column Number = 1 Target Type = 1 SQL_CHAR Target Value = 0xe5a3c0 Buffer Length = 2 StrLen Or Ind = 0xeabd58 [ODBC][15262][SQLBindCol.c][251] Exit:[SQL_SUCCESS] [ODBC][15262][SQLBindCol.c][165] Entry: Statement = 0xea8a80 Column Number = 2 Target Type = 1 SQL_CHAR Target Value = 0xe5a3c4 Buffer Length = 12 StrLen Or Ind = 0xeabdc8 [ODBC][15262][SQLBindCol.c][251] Exit:[SQL_SUCCESS] [ODBC][15262][SQLFetch.c][158] Entry: Statement = 0xea8a80 [ODBC][15262][SQLFetch.c][340] Exit:[SQL_SUCCESS] [ODBC][15262][SQLFreeStmt.c][140] Entry: Statement = 0xea8a80 Option = 0 [ODBC][15262][SQLFreeStmt.c][246] Exit:[SQL_SUCCESS] [ODBC][15262][SQLFreeStmt.c][140] Entry: Statement = 0xea8a80 Option = 3 [ODBC][15262][SQLFreeStmt.c][246] Exit:[SQL_SUCCESS] [ODBC][15262][SQLBindParameter.c][193] Entry: Statement = 0xea8a80 Param Number = 1 Param Type = 1 C Type = 1 SQL_C_CHAR SQL Type = 12 SQL_VARCHAR Col Def = 80 Scale = 0 Rgb Value = 0xeabe50 Value Max = 1 StrLen Or Ind = 0xeaac60 [ODBC][15262][SQLBindParameter.c][339] Exit:[SQL_SUCCESS] [ODBC][15262][SQLExecute.c][183] Entry: Statement = 0xea8a80 [ODBC][15262][SQLExecute.c][344] Exit:[SQL_SUCCESS] [ODBC][15262][SQLError.c][342] Entry: Statement = 0xea8a80 SQLState = 0x7fff17d2a8c0 Native = 0x7fff17d2a8c8 Message Text = 0x7fff17d2a8d0 Buffer Length = 1023 Text Len Ptr = 0x7fff17d2a8ce [ODBC][15262][SQLError.c][379] Exit:[SQL_NO_DATA] [ODBC][15262][SQLError.c][424] Entry: Connection = 0xa1b470 SQLState = 0x7fff17d2a8c0 Native = 0x7fff17d2a8c8 Message Text = 0x7fff17d2a8d0 Buffer Length = 1023 Text Len Ptr = 0x7fff17d2a8ce [ODBC][15262][SQLError.c][461] Exit:[SQL_NO_DATA] [ODBC][15262][SQLError.c][504] Entry: Environment = 0xe038a0 SQLState = 0x7fff17d2a8c0 Native = 0x7fff17d2a8c8 Message Text = 0x7fff17d2a8d0 Buffer Length = 1023 Text Len Ptr = 0x7fff17d2a8ce [ODBC][15262][SQLError.c][541] Exit:[SQL_NO_DATA] [ODBC][15262][SQLRowCount.c][166] Entry: Statement = 0xea8a80 Row Count = 0xea8638 [ODBC][15262][SQLRowCount.c][237] Exit:[SQL_SUCCESS] Row Count = 0xea8638 -> -1 [ODBC][15262][SQLNumResultCols.c][149] Entry: Statement = 0xea8a80 Column Count = 0x7fff17d2ad40 [ODBC][15262][SQLNumResultCols.c][234] Exit:[SQL_SUCCESS] Count = 0x7fff17d2ad40 -> 2 [ODBC][15262][SQLFetch.c][158] Entry: Statement = 0xea8a80 [ODBC][15262][SQLFetch.c][340] Exit:[SQL_SUCCESS] [ODBC][15262][SQLFreeStmt.c][140] Entry: Statement = 0xea8a80 Option = 0 [ODBC][15262][SQLFreeStmt.c][246] Exit:[SQL_SUCCESS] [ODBC][15262][SQLGetConnectOption.c][219] Entry: Connection = 0xa1b470 Option = SQL_ATTR_AUTOCOMMIT Value = 0x7fff17d2ae64 [ODBC][15262][SQLGetConnectOption.c][499] Exit:[SQL_SUCCESS] [ODBC][15262][SQLTransact.c][175] Entry: Environment = 0xe038a0 Connection = 0xa1b470 Completion Type = 1 [ODBC][15262][SQLGetInfo.c][214] Entry: Connection = 0xa1b470 Info Type = SQL_CURSOR_ROLLBACK_BEHAVIOR (24) Info Value = 0x7fff17d2ad0e Buffer Length = 2 StrLen = 0x7fff17d2ad0c [ODBC][15262][SQLGetInfo.c][528] Exit:[SQL_SUCCESS] [ODBC][15262][SQLTransact.c][347] Exit:[SQL_SUCCESS] [ODBC][15262][SQLDisconnect.c][204] Entry: Connection = 0xa1b470 [ODBC][15262][SQLDisconnect.c][341] Exit:[SQL_SUCCESS] [ODBC][15262][SQLFreeHandle.c][268] Entry: Handle Type = 2 Input Handle = 0xa1b470 [ODBC][15262][SQLFreeHandle.c][317] Exit:[SQL_SUCCESS] [ODBC][15262][SQLFreeHandle.c][203] Entry: Handle Type = 1 Input Handle = 0xe038a0