1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-20706 Store scale in Column_definition::decimals rather than Column_definition::pack_flag

This commit is contained in:
Alexander Barkov
2019-10-01 13:12:46 +04:00
parent 1ae09ec863
commit 02dea3ffd5
7 changed files with 293 additions and 15 deletions

View File

@ -2920,12 +2920,11 @@ bool Column_definition::prepare_stage2_typelib(const char *type_name,
}
uint Column_definition::pack_flag_numeric(uint dec) const
uint Column_definition::pack_flag_numeric() const
{
return (FIELDFLAG_NUMBER |
(flags & UNSIGNED_FLAG ? 0 : FIELDFLAG_DECIMAL) |
(flags & ZEROFILL_FLAG ? FIELDFLAG_ZEROFILL : 0) |
(dec << FIELDFLAG_DEC_SHIFT));
(flags & ZEROFILL_FLAG ? FIELDFLAG_ZEROFILL : 0));
}