Hi,
this was found & fixed a while ago, in April 2009, somewhere between 5.22 and 5.24. So 5.22/00a does not have the fix. The latest 5.24 and 5.26 have it though.
Best regards,
-MF
Maximilien Fechner, PhD
CEA Saclay IRFU/SPP
91191 Gif-sur-Yvette Cedex
France
-----Original Message-----
From: owner-roottalk_at_root.cern.ch on behalf of Brett Viren
Sent: Fri 5/14/2010 6:40 PM
To: roottalk_at_cern.ch
Subject: [ROOT] Problem with TSQL on 64 bits
Hi RootTalk,
I've found a problem with TSQL that apparently has to do with running on 64 bit Linux. This is with ROOT 5.22/00a so maybe it has already been found and fixed. If so, please let me know which version has the fix.
The problem manifests itself with a value 0 being returned as a large number with the MSB garbage and the LSB all 0. The column in question is defined as "int(11)", "NOT NULL" and is a primary key. The database is MySQL 5.0.45.
I'm using a simple test like:
TSQLServer *db = TSQLServer::Connect("mysql://dybdb1.ihep.ac.cn/testdb","dayabay", "secret"); TSQLStatement *s = db->Statement("select * from CalibPmtSpec where SEQNO = 0 order by SEQNO");
cerr << "Process: " << s->Process() << endl; cerr << "StoreResult: " << s->StoreResult() << endl; cerr << "GetNumFields: " << s->GetNumFields() << endl; cerr << "GetFieldName(0): " << s->GetFieldName(0) << endl; cerr << "NextResultRow: " << s->NextResultRow() << endl; cerr << "GetString(0): " << s->GetString(0) << endl;
On 32 Bit Debian 5.0.4 the last line returns
GetString(0): 0
On 64 bit Sci. Linux 5.3 the last line returns:
GetString(0): 47871705481216
The correct value is 0 confirmed by doing a query through the mysql command line client.
You'll note this large number is 0x2B8A00000000. So, the bottom 32 bits are correctly 0. Each time I run the test on 64 bits I get a different number but the bottom 4 bytes are always 0.
Thanks,
-Brett.
Received on Fri May 14 2010 - 23:34:23 CEST
This archive was generated by hypermail 2.2.0 : Sat May 15 2010 - 11:50:02 CEST