ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya Kasnacheev (Jira)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-13413) PHP using ODBC corrupts decimal numbers
Date Tue, 08 Sep 2020 10:53:00 GMT
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)

Mime
View raw message