X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F28E5D6EDE for ; Mon, 22 Aug 2005 05:50:53 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 89643-01 for ; Mon, 22 Aug 2005 08:50:50 +0000 (GMT) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by svr1.postgresql.org (Postfix) with ESMTP id E27E1D7E25 for ; Mon, 22 Aug 2005 05:50:48 -0300 (ADT) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1E780e-0004wQ-VN for pgsql-odbc@postgresql.org; Mon, 22 Aug 2005 10:50:24 +0200 Received: from p5493908c.dip0.t-ipconnect.de ([84.147.144.140]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Aug 2005 10:50:24 +0200 Received: from mailinglists by p5493908c.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 22 Aug 2005 10:50:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-odbc@postgresql.org From: Hajo Kirchhoff Subject: Bug in SQLConnect, psqlodbc 08.00.00.04 Date: Mon, 22 Aug 2005 10:23:17 +0200 Lines: 104 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020000030904000407040204" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: p5493908c.dip0.t-ipconnect.de User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200508/188 X-Sequence-Number: 5827 This is a multi-part message in MIME format. --------------020000030904000407040204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi all, is there a list of open bugs for psqlodbc so I don't post unneccessary bug reports? I couldn't find one at http://www.postgresql.org/support/ Bug description: psqlodbc 08.00.00.04, psql 8.0.1, Windows XP SP2 After the first connection attempt with SQLConnect fails, for example due to a bad password (State 28000), any further attempts to connect with the same handle always return 'Cannot connect to server', state 08001, even if user name and password are correct. psqlodbc_ log attached. To be able to connect to the server again I have to SQLFree the handle and SQLAlloc a new handle. Hajo Sequence for reproducing the error: 1. allocate handle 2. SQLConnect with invalid username/password --> returns error State 28000, Authorization failed 3. SQLConnect with valid username/password --> returns error State 08001, Cannot connect to server This is the bug. A second attempt with the same handle and valid credentials should be able to connect to the server. Workaround 1. allocate handle 2. SQLConnect with invalid username/password --> returns error State 28000 3. SQLFreeHandle 4. allocate new handle SQLAllocHandle 5. SQLConnect with valid username/password --> success -- -------------------------------------------- Lit Window Library - Speed up GUI coding 10x http://www.litwindow.com/library?src=ml wxVisualSetup - integrate wxWidgets into Visual Studio .NET http://www.litwindow.com/Products/products.html?src=ml BugLister - Defect Tracker http://www.litwindow.com/buglister?src=ml Tips & Tricks for wxWidgets & MS Visual Studio http://www.litwindow.com/Knowhow/knowhow.html?src=ml --------------020000030904000407040204 Content-Type: text/plain; name="psqlodbc_7752.log" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="psqlodbc_7752.log" conn = 35212112, PGAPI_Connect(DSN='OPOS2', UID='Hajo Kirchhoff', PWD='xxxxx') Global Options: Version='08.00.0004', fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190 disable_optimizer=1, ksqo=1, unique_index=1, use_declarefetch=0 text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1 NAMEDATALEN=64 extra_systable_prefixes='dd_;', conn_settings='' conn_encoding='OTHER' ERROR from backend during authentication: 'FATAL: password authentication failed for user "Hajo Kirchhoff" ' CONN ERROR: func=PGAPI_Connect, desc='Error on CC_connect', errnum=210, errmsg='FATAL: password authentication failed for user "Hajo Kirchhoff" ' ------------------------------------------------------------ henv=35212056, conn=35212112, status=0, num_stmts=16 sock=35223128, stmts=35231408, lobj_type=-999 ---------------- Socket Info ------------------------------- socket=328, reverse=0, errornumber=0, errormsg='(NULL)' buffer_in=35223200, buffer_out=35227304 buffer_filled_in=67, buffer_filled_out=0, buffer_read_in=67 DSN info: DSN='OPOS2',server='localhost',port='5432',dbase='opos2-test',user='',passwd='xxxxx' onlyread='0',protocol='6.4',showoid='0',fakeoidindex='0',showsystable='0' conn_settings='',conn_encoding='OTHER' translation_dll='',translation_option='' conn = 35212112, PGAPI_Connect(DSN='OPOS2', UID='Hajo Kirchhoff', PWD='xxxxx') Global Options: Version='08.00.0004', fetch=100, socket=4096, unknown_sizes=0, max_varchar_size=254, max_longvarchar_size=8190 disable_optimizer=1, ksqo=1, unique_index=1, use_declarefetch=0 text_as_longvarchar=1, unknowns_as_longvarchar=0, bools_as_char=1 NAMEDATALEN=64 extra_systable_prefixes='dd_;', conn_settings='' conn_encoding='OTHER' CONN ERROR: func=PGAPI_Connect, desc='Error on CC_connect', errnum=101, errmsg='Could not connect to the server' ------------------------------------------------------------ henv=35212056, conn=35212112, status=0, num_stmts=16 sock=35223128, stmts=35231408, lobj_type=-999 ---------------- Socket Info ------------------------------- socket=328, reverse=0, errornumber=1, errormsg='Socket is already connected' buffer_in=35223200, buffer_out=35227304 buffer_filled_in=67, buffer_filled_out=0, buffer_read_in=67 --------------020000030904000407040204--