Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Unpack mysql binary column data

by graff (Chancellor)
on Apr 23, 2013 at 01:41 UTC ( #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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1030019]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2018-05-27 00:39 GMT
Find Nodes?
    Voting Booth?