Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: db-lib does not get PRINT data: msg#00248

db.tds.freetds

Subject: Re: db-lib does not get PRINT data

"Lowden, James K" <LowdenJK@xxxxxxxxxxxxx> wrote:
> What is the difference between tds_socket::current_results and
> tds_socket::res_info? They're both TDSRESULTINFO structures. Why two?

(I still don't understand why, but that turns out not to be important to
honoring EED packets.)

tds_process_msg() in src/tds/token.c discarded messages whose message
number was zero. In db-lib, EED packets are routed to the client's
installed message handler, with a message number of zero. Because
tds_process_msg() discarded them, db-lib never got them.

I removed the "if (msg.msg_number > 0)" test. I don't know what effect
that will have on the other libraries yet.

The problem behind the problem: db-lib clients will attempt to process a
result set whenever an EED packet arrives, using the previous result set's
metadata. This can lead to bad things.

The reason?

dbresults() calls
tds_process_result_tokens() calls
tds_process_default_tokens() calls
tds_process_msg()

which winds up fetching the EED packet. tds_process_msg() returns
TDS_SUCCEED, and the return code is propogated all the way back to the
application. The application interprets that as, um, success, and
attempts to fetch a row. It does not often find what it's looking for.

I'm too tired now to design a good solution. The token-reading code has
always seemed clumsy to me. I don't know if there will ever be results to
process once tds_process_result_tokens() calls
tds_process_default_tokens(). I would guess it should always return
TDS_NO_MORE_RESULTS.

This looks like a serious bug to me. I'm hoping we can fix it for the
release.

--jkl


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe