mariadb/storage
Monty 34eb10e406 MDEV-10138 Support for decimals up to 38 digits
Decimals with float, double and decimal now works the following way:

- DECIMAL_NOT_SPECIFIED is used when declaring DECIMALS without a firm number
  of decimals.  It's only used in asserts and my_decimal_int_part.
- FLOATING_POINT_DECIMALS (31) is used to mark that a FLOAT or DOUBLE
  was defined without decimals. This is regarded as a floating point value.
- Max decimals allowed for FLOAT and DOUBLE is FLOATING_POINT_DECIMALS-1
- Clients assumes that float and double with decimals >= NOT_FIXED_DEC are
  floating point values (no decimals)
- In the .frm decimals=FLOATING_POINT_DECIMALS are used to define
  floating point for float and double (31, like before)

To ensure compatibility with old clients we do:

- When storing float and double, we change NOT_FIXED_DEC to
  FLOATING_POINT_DECIMALS.
- When creating fields from .frm we change for float and double
  FLOATING_POINT_DEC to NOT_FIXED_DEC
- When sending definition for a float/decimal field without decimals
  to the client as part of a result set we convert NOT_FIXED_DEC to
  FLOATING_POINT_DECIMALS.
- variance() and std() has changed to limit the decimals to
  FLOATING_POINT_DECIMALS -1 to not get the double converted floating point.
  (This was to preserve compatiblity)
- FLOAT and DOUBLE still have 30 as max number of decimals.

Bugs fixed:

variance() printed more decimals than we support for double values.

New behaviour:
- Strings now have 38 decimals instead of 30 when converted to decimal
- CREATE ... SELECT with a decimal with > 30 decimals will create a column
  with a smaller range than before as we are trying to preserve the number of
  decimals.


Other changes
- We are now using the obsolete bit FIELDFLAG_LEFT_FULLSCREEN to specify
  decimals > 31
- NOT_FIXED_DEC is now declared in one place
- For clients, NOT_FIXED_DEC is always 31 (to ensure compatibility).
  On the server NOT_FIXED_DEC is DECIMAL_NOT_SPECIFIED (39)
- AUTO_SEC_PART_DIGITS is taken from DECIMAL_NOT_SPECIFIED
- DOUBLE conversion functions are now using DECIMAL_NOT_SPECIFIED instead of
  NOT_FIXED_DEC
2016-06-22 22:04:55 +03:00
..
archive General spell fixing in comments and strings 2016-06-08 14:17:23 +03:00
blackhole MDEV-5120 Test suite test maria-no-logging fails 2014-09-30 20:31:14 +03:00
cassandra Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
connect General spell fixing in comments and strings 2016-06-08 14:17:23 +03:00
csv Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
example 5.5.40+ merge 2014-10-09 10:30:11 +02:00
federated MDEV-6353 my_ismbchar() and my_mbcharlen() refactoring 2016-05-17 15:27:10 +04:00
federatedx MDEV-6353 my_ismbchar() and my_mbcharlen() refactoring 2016-05-17 15:27:10 +04:00
heap MDEV-8360 Clean-up CHARSET_INFO: strnncollsp: diff_if_only_endspace_difference 2016-03-31 11:04:48 +04:00
innobase Fixed compiler warnings 2016-06-22 22:04:55 +03:00
maria General spell fixing in comments and strings 2016-06-08 14:17:23 +03:00
mroonga General spell fixing in comments and strings 2016-06-08 14:17:23 +03:00
myisam General spell fixing in comments and strings 2016-06-08 14:17:23 +03:00
myisammrg MDEV-8715 - Obsolete sql_alloc() in favor of THD::alloc() and thd_alloc() 2015-11-26 11:34:17 +04:00
oqgraph Code cleanups 2016-06-10 17:37:12 +04:00
perfschema MDEV-9857 - CACHE_LINE_SIZE in innodb should be 128 on POWER 2016-06-07 13:02:31 +04:00
sequence MDEV-9550 COUNT(NULL) returns incorrect result with sequence storage engine 2016-02-23 10:54:35 +01:00
sphinx Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
spider MDEV-5535: Cannot reopen temporary table 2016-06-10 18:39:43 -04:00
test_sql_discovery MDEV-3929 Add system variable explicit_defaults_for_timestamp for compatibility with MySQL 2015-09-22 14:01:54 +04:00
tokudb MDEV-10138 Support for decimals up to 38 digits 2016-06-22 22:04:55 +03:00
xtradb Fixed compiler warnings 2016-06-22 22:04:55 +03:00