Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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.)


Comment on Re: Unpack mysql binary column data
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
Node Status?
node history
Node Type: note [id://1030019]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (11)
As of 2014-09-22 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (198 votes), past polls