Given the following table, backed by MySQL 5.7/InnoDB:

CREATE TABLE mytable(mydouble DOUBLE) SELECT 0.005 `mydouble`;

how can I find what exactly InnoDB is storing on the disk for the value 0.005?

I know that this varies depending on the architecture, so I'm looking for a methodology rather than a certain value. I'm a programmer/dba, so I'm handy with any tool, if required.

1 Answer 1


A (very) poor man's strategy is to simply:

  • create a table with a known float value
  • perform a hex dump of the table ibd file
  • test against a hypothesis of how the value is stored

I've tested against the IEEE754 format value, but couldn't identify the value.

I've created the table adding a string value in the same record as the float, and I've actually found that the float storage format is actually IEEE754, but it's little endian.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.