Skip to Content.
Sympa Menu

freetds - [freetds] Application blocked when using FreeTDS with unixODBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Mark Junker <m.junker AT hm-software.de>
  • To: freetds AT lists.ibiblio.org
  • Subject: [freetds] Application blocked when using FreeTDS with unixODBC
  • Date: Fri, 28 Apr 2006 09:31:39 +0200

Hi,

I have a problem using FreeTDS/unixODBC that the application gets blocked when it tries to close the ODBC connection/result.

Tests were done with:
- SuSE Linux 9.3 x86_64
- FreeTDS 0.63
- unixODBC 2.2.11
- PHP 5.1.1 (test_odbc3.php)
- Mono 1.1.15, x86_64 (test_odbc3.bas)

To use the test application, please replace every occurrence of "hmlims" with the correct DSN name.

This behaviour is the same with PHP (5.1.1, test_odbc3.php) and Mono (1.1.15, x86_64, test_odbc3.bas).

The freetds log file is attached.

My assumption is that FreeTDS uses some kind of read-ahead mechanism which blocks closing the result when a row wasn't read completely (as you can see in the log file). However, when I change the "SELECT" statement to "SELECT table_id FROM SYS.SYSCOLUMN", everything works fine.

BTW: I'm somewhat confused because I got unixODBC/FreeTDS working on a x86_64 Linux system but failed on a i686 Linux system? The problem was - according to "isql" and the FreeTDS log file that SQLExecute failed because FreeTDS tried to create a temporary function with the same name twice. However, it's not a big problem because we can use the Sybase ODBC drivers on i686 systems instead but this is not an option on x86_64 systems ...

--
Kind regards,
Mark Junker
HM-Software

Attachment: freetds.log.gz
Description: application/gzip

imports system
imports system.data
imports system.data.odbc

module test
sub main
dim intIndex as integer
dim strConnection as string
strConnection = "DSN=hmlims;UID=DBA;PWD=sql"
dim dbcon as IDbConnection
dbcon = new OdbcConnection(strConnection)
dbcon.Open()
Dim dbcmd As IDbCommand = dbcon.CreateCommand()
Dim strSql as String = "SELECT * FROM SYS.SYSCOLUMN"
dbcmd.CommandText = strSql
Dim reader As IDataReader = dbcmd.ExecuteReader()
do while (reader.Read())
for intIndex=0 to reader.FieldCount-1
console.out.writeline("{0}:
{1}",reader.GetName(intIndex),reader(intIndex))
next
'console.out.writeline("got data")
'console.out.writeline(reader("tagebuchnummer"))
exit do
loop
console.out.writeline("close reader")
reader.Close()
console.out.writeline("close command")
dbcmd.Dispose()
console.out.writeline("close connection")
dbcon.Close()
console.out.writeline("done")
end sub
end module
begin:vcard
fn:Mark Junker
n:Junker;Mark
org:HM-Software
adr;dom:;;Rampenweg 1b;Adelheidsdorf;;29352
email;internet:m.junker AT hm-software.de
tel;work:+49-5085-9894-0
tel;fax:+49-5085-9894-44
x-mozilla-html:FALSE
url:http://www.hm-software.de
version:2.1
end:vcard



  • [freetds] Application blocked when using FreeTDS with unixODBC, Mark Junker, 04/28/2006

Archive powered by MHonArc 2.6.24.

Top of Page