You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Ilya Kasnacheev (Jira)" <ji...@apache.org> on 2020/09/08 10:53:00 UTC
[jira] [Created] (IGNITE-13413) PHP using ODBC corrupts decimal
numbers
Ilya Kasnacheev created IGNITE-13413:
----------------------------------------
Summary: PHP using ODBC corrupts decimal numbers
Key: IGNITE-13413
URL: https://issues.apache.org/jira/browse/IGNITE-13413
Project: Ignite
Issue Type: Bug
Components: odbc
Affects Versions: 2.8.1
Reporter: Ilya Kasnacheev
Assignee: Igor Sapego
Attachments: update.php
Please see mailing list thread. Basically, when we update 1.85 into DECIMAL column (maybe some other too), we're getting -0.57 in it instead:
{code}
sqlline> !connect jdbc:ignite:thin://localhost
0: jdbc:ignite:thin://localhost> create table i_price (id int primary key, price decimal);
0: jdbc:ignite:thin://localhost> insert into i_price (id, price) values (1, 1.00);
Then:
~/Downloads/apache-ignite-2.8.1-bin% isql -vvv Apache\ Ignite
SQL> SELECT * FROM i_price;
+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ID | PRICE |
+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 1 | 1 |
+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
SQLRowCount returns 0
1 rows fetched
SQL> %
~/Downloads/apache-ignite-2.8.1-bin% php update.php ## Should put 1.85 as PRICE value for ID=1
~/Downloads/apache-ignite-2.8.1-bin% bin/sqlline.sh
sqlline> !connect jdbc:ignite:thin://localhost
0: jdbc:ignite:thin://localhost> select * from i_price;
+--------------------------------+--------------------------------+
| ID | PRICE |
+--------------------------------+--------------------------------+
| 1 | -0.57 |
+--------------------------------+--------------------------------+
1 row selected (0,101 seconds)
{code}
I will attach the php file as well.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)