[unixODBC-support] FreeTDS, unixODBC, GENTOO and DBD::ODBC

Michael Higgins linux at evolone.org
Tue Jun 2 18:55:48 BST 2009


On Tue, 02 Jun 2009 17:37:23 +0100
Nick Gorham <nick at lurcher.org> wrote:

> As there is no DRIVER= entry, the driver manager must (and can only)
> try loading the default first DSN in the odbc.ini and then passing
> control to whatever driver that references. After that I don't know,
> and can't say.


odbcinst -q -d

[Default]
[FreeTDS]

Adding DRIVER=FreeTDS, at least it dumps some data:

10:34:49.021099 24522 (util.c:162):Changed query state from QUERYING to PENDING
10:34:49.021135 24522 (net.c:779):Sending packet
0000 01 01 00 2e 00 00 00 00-73 00 65 00 74 00 20 00 |........ s.e.t. .|
0010 74 00 65 00 78 00 74 00-73 00 69 00 7a 00 65 00 |t.e.x.t. s.i.z.e.|
0020 20 00 36 00 34 00 35 00-31 00 32 00 20 00       | .6.4.5. 1.2. .|

10:34:49.021417 24522 (token.c:495):tds_process_tokens(0x82a0f10, 0xbfca58c8, 0xbfca58c4, 0x100)
10:34:49.021469 24522 (util.c:162):Changed query state from PENDING to READING
10:34:49.063959 24522 (net.c:592):Received header
0000 04 01 00 11 00 35 01 00-                        |.....5..|

10:34:49.064109 24522 (net.c:671):Received packet
0000 fd 00 00 be 00 00 00 00-00                      |........ .|

10:34:49.064171 24522 (token.c:510):processing result tokens.  marker is  fd(DONE)
10:34:49.064211 24522 (token.c:2201):tds_process_end: more_results = 0
		was_cancelled = 0
		error = 0
		done_count_valid = 0
10:34:49.064249 24522 (token.c:2217):tds_process_end() state set to TDS_IDLE
10:34:49.064300 24522 (util.c:162):Changed query state from READING to IDLE
10:34:49.064338 24522 (token.c:2232):                rows_affected = 0
10:34:49.064375 24522 (util.c:110):logic error: cannot change query state from IDLE to PENDING
10:34:49.064412 24522 (token.c:495):tds_process_tokens(0x82a0f10, 0xbfca58c8, 0xbfca58c4, 0x100)
10:34:49.064451 24522 (token.c:498):tds_process_tokens() state is COMPLETED
10:34:49.064495 24522 (odbc.c:4672):SQLGetFunctions: fFunction is 999
10:34:49.064542 24522 (odbc.c:5587):SQLGetInfo(0x829fce8, 77, 0xbfca5bc4, 20, (nil))
10:34:49.064587 24522 (odbc.c:4841):_SQLGetInfo(0x829fce8, 77, 0xbfca5bc4, 20, (nil)
10:34:49.064631 24522 (odbc.c:5587):SQLGetInfo(0x829fce8, 10000, 0xbfca5bc4, 5, (nil))
10:34:49.064672 24522 (odbc.c:4841):_SQLGetInfo(0x829fce8, 10000, 0xbfca5bc4, 5, (nil)
10:34:49.064729 24522 (odbc.c:5918):SQLSetConnectOption(0x828c738, 102, 1)
10:34:49.064783 24522 (error.c:574):SQLError(0x823d4b8, 0x828c738, (nil), 0xbfca8d4e, 0xbfca8d54, 0xbfca894e, 1023, 0xbfca8d5a)
10:34:49.064873 24522 (error.c:510):_SQLGetDiagRec(2, 0x828c738, 1, 0xbfca8d4e, 0xbfca8d54, 0xbfca894e, 1023, 0xbfca8d5a)

And the strace ends with:

gettimeofday({1243964284, 602611}, NULL) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
write(3, "10:38:04.602611 24528 (odbc.c:591"..., 75) = 75
gettimeofday({1243964284, 603184}, NULL) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
write(3, "10:38:04.603184 24528 (error.c:57"..., 128) = 128
gettimeofday({1243964284, 603347}, NULL) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2819, ...}) = 0
write(3, "10:38:04.603347 24528 (error.c:51"..., 122) = 122
--- SIGSEGV (Segmentation fault) @ 0 (0) ---

What is happening now... the FreeTDS driver appears to be engaged, as I'm getting a dump. 

So, thanks for the hint... does this dump say anything to you? The only Google hits were like "SQLSetConnectOption() has been deprecated and replaced with SQLSetConnectAttr(). "

Is that a clue? :-)

Cheers,

-- 
 |\  /|        |   |          ~ ~  
 | \/ |        |---|          `|` ?
 |    |ichael  |   |iggins    \^ /
 michael.higgins[at]evolone[dot]org


More information about the unixODBC-support mailing list