#474 ✓resolved
Mayo Jordanov

Float should not require scale

Reported by Mayo Jordanov | July 20th, 2008 @ 07:26 PM

Currently, DM requires all floating point numbers to specify scale, but scale should not be required for floating point numbers.

Generally, floating point numbers don't have scale, as the scale changes depending on the number. (eg. If precision is 15, scale will be (precision - integral). If precision = 4 and number is 1.123, scale is 3; if precision = 4 and number is 123.4, scale = 1). The SQL/ANSI 92 standard does not specify scale for floating point numbers either (for the above reason).

The scale parameter is however required, as MySQL allows scale to be specified on floating point numbers.

The attached patches should solve the issue. Modifies type map not to require scale, and modifies validations to be able to handle case where scale is not specified.

Dan, if you don't have time to push this in, let me know, I can always push, just want somebody to review this before committing. Doesn't seem to break any specs locally.

Thanks!

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Pages