[MDEV-12902] Can not insert decimal into JSON type, CONNECT engine Created: 2017-05-24  Updated: 2020-12-01

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.1, 10.2.5, 10.2
Fix Version/s: 10.2

Type: Bug Priority: Major
Reporter: Alice Sherepa Assignee: Olivier Bertrand
Resolution: Unresolved Votes: 0
Labels: None
Environment:

Ubuntu 16.04



 Description   

Decimal values are inserted as NULL.

create table t3 (b decimal(10,2)) engine=CONNECT table_type=JSON ;
 
insert into t3 values  (5.28);
select * from t3;
+------+
| b    |
+------+
| NULL |
+------+

It worked as expected with other types of tables (CSV, DOS).

If decimal column is used in persistent column, results were correct (but NULL if column b1 is declared as decimal)

create table t1 
	(b decimal(10,2), b1 int as (b*100) persistent) engine=CONNECT table_type=JSON ;
 
insert into t1 values ( 8.59, default), ('5.28', default);
select * from t1;
+------+------+
| b    | b1   |
+------+------+
| NULL |  859 |
| NULL |  528 |
+------+------+


Generated at Thu Feb 08 08:01:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.