List:Internals« Previous MessageNext Message »
From:Olaf van der Spek Date:May 24 2005 10:00am
Subject:Re: Storageformat of Decimal values ...
View as plain text  
On 5/24/05, Hagen Höpfner <hoepfner@stripped> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Dear List,
> 
> I currently try to figure out, how decimal values are stored in MySQL. I
> read about the changes in 5.0.3 but could not comprehend it under 5.0.4
> beta. However,
> 
> http://dev.mysql.com/doc/mysql/en/precision-math-decimal-changes.html
> 
> mentioned, that 9 digits of a decimal value are stored in 4 byte. That
> means, that Decimal(18,9) as well as Decimal(1,0) requires 8 Byte (4 for
> the integer part and 4 for the fractional part). A Decimal (20,10)

Is the fractional part stored by itself?
Maybe the integer and fractional parts are combined such that 0.0013
is simply stored as 13 and 1 is stored as 10000.
Thread
Storageformat of Decimal values ...Hagen Höpfner24 May
  • Re: Storageformat of Decimal values ...Olaf van der Spek24 May
    • Re: Storageformat of Decimal values ...Hagen Höpfner24 May
  • Re: Storageformat of Decimal values ...Sergei Golubchik24 May
    • Re: Storageformat of Decimal values ...Hagen Höpfner24 May
      • Re: Storageformat of Decimal values ...Sergei Golubchik25 May
        • Re: Storageformat of Decimal values ...Hagen Höpfner25 May
          • Re: Storageformat of Decimal values ...Sergei Golubchik25 May