[MDEV-9167] [PATCH] COLUMN_CHECK fails on valid decimal data Created: 2015-11-23  Updated: 2015-12-16  Resolved: 2015-12-16

Status: Closed
Project: MariaDB Server
Component/s: Dynamic Columns
Affects Version/s: 10.0.20, 10.1.8
Fix Version/s: 10.0.24, 10.1.10

Type: Bug Priority: Critical
Reporter: Adam Johnson Assignee: Oleksandr Byelkin
Resolution: Fixed Votes: 0
Labels: contribution
Environment:

Used OS X 10.0.20 and Ubuntu 10.1.8


Issue Links:
Relates
relates to MDEV-8565 [PATCH] COLUMN_CHECK fails on valid data Closed
Sprint: 10.1.10

 Description   

Similar to MDEV-8565 , COLUMN_CHECK can fail with valid Decimal values:

select column_check(column_create('0', '0' as decimal, '1', '0' as decimal));
Result: 0 (failed)

I think the patch for MDEV-8565 simply missed that decimal 0 is also stored in 0 bytes, as in:

/* Store decimal zero as empty string */
  if (precision == 0)
    return ER_DYNCOL_OK;



 Comments   
Comment by Adam Johnson [ 2015-11-23 ]

Made a PR: https://github.com/MariaDB/server/pull/121 . I haven't been able to run it though.

Comment by Oleksandr Byelkin [ 2015-12-16 ]

fix moved to 10.0

Generated at Thu Feb 08 07:32:38 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.