Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Unpack mysql binary column data

by graff (Chancellor)
on Apr 23, 2013 at 01:41 UTC ( [id://1030019]=note: print w/replies, xml ) Need Help??


in reply to Unpack mysql binary column data

How much do you know about (and do you have access to) the process that puts these kinds of values into the database?

Also, I'm curious: are you saying that there is a single "binary(8)" column that is being used to store doubles in some rows and uint64 in other rows? If so, is there some other column in each row that tells you which data type is being stored there?

Since you seem to have some other way of knowing what "unpacked" value you should get for a given row, maybe it would help to look at the "raw" bits for that known field value (e.g. as a 16-digit hex numeric string). For uint64 values, that should clear up any problem involving endianness. (Working out the bit fields for doubles will be a little trickier.)

Replies are listed 'Best First'.
Re^2: Unpack mysql binary column data
by prashanthch (Novice) on Apr 24, 2013 at 00:52 UTC

    Thanks for your reply

    Unfortunately, I do not have access to the underlying routines that insert data into the database, I tried to get access but was denied, I am still trying

    yes, there is a single binary(8) column that is used to store doubles for some rows and uint64 for others, another table in the database lists the type of data, I look up the type and run unpack appropriately

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1030019]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-18 21:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found