logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Bug in BLOB on 64bit AMD: msg#00158

db.mysql.c++

Subject: Bug in BLOB on 64bit AMD

Hello,

I've found a bug in mysql++, when a BLOB field is used which is not the
only field returned from a query. This happens only when the query is
run on a 64bit machine (AMD64 in my case). To demonstrate, use the following
table with the load_file and cgi_image examples:

CREATE TABLE fax ( id INTEGER AUTO_INCREMENT PRIMARY KEY,
fax BLOB );

execute load_file as usual.

Change cgi_image to return id and fax as a result of the select.

query << "SELECT " << MY_KEY << "," << MY_FIELD << " FROM " << MY_TABLE
<< " WHERE " << MY_KEY << " = " << argv[1];
ResUse res = query.use();
Row row = res.fetch_row();
long unsigned int *jj = res.fetch_lengths();
cout << "Content-length: " << jj[1] << endl << endl;
fwrite(row.raw_data(1), 1, jj[1], stdout);

jj[1] returns a proper length, but raw_data is not correct, and it looks
like a memory dump. I'm having difficulty debugging this, as I cannot
quite find where things go wrong.

Any ideas?

Grtz
Erwin

--
erwin@xxxxxxxxxxxxxx
I pledge allegiance to the form of science fiction and fantasy and to
the promise for which it stands: one world, polycultural, genetically
engineered, with Internet access for all. -- Tonio Roque

--
MySQL++ Mailing List
For list archives: http://lists.mysql.com/plusplus
To unsubscribe:
http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx







Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

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

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo