ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Volkov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-7480) Select for BINARY type field returns 'strange' value.
Date Fri, 19 Jan 2018 14:58:00 GMT
Alex Volkov created IGNITE-7480:
-----------------------------------

             Summary: Select for BINARY type field returns 'strange' value.
                 Key: IGNITE-7480
                 URL: https://issues.apache.org/jira/browse/IGNITE-7480
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 2.2
            Reporter: Alex Volkov


Steps to reproduce:
 # Connect to grid using console client and dbc:ignite:thin driver.
 # Run these sql statements:

{code:java}
CREATE TABLE tmp_table_binary (key_field INT PRIMARY KEY,field1 BINARY);
INSERT INTO tmp_table_binary (key_field, field1) values(1, '00ffaa');
INSERT INTO tmp_table_binary (key_field, field1) values(2, 'ffccaa');
SELECT * FROM tmp_table_binary;
{code}
Here is output from H2:
{code:java}
SELECT * FROM tmp_table_binary;

KEY_FIELD  	FIELD1  
1			00ffaa
2			ffccaa
{code}
And this one is from grid:
{code}
 0: jdbc:ignite:thin://127.0.0.1/> CREATE TABLE tmp_table_binary (key_field INT PRIMARY
KEY,field1 BINARY);
No rows affected (0.155 seconds)
0: jdbc:ignite:thin://127.0.0.1/> INSERT INTO tmp_table_binary (key_field, field1) values(1,
'00ffaa');
1 row affected (0.089 seconds)
0: jdbc:ignite:thin://127.0.0.1/> INSERT INTO tmp_table_binary (key_field, field1) values(2,
'ffccaa');
1 row affected (0.009 seconds)
0: jdbc:ignite:thin://127.0.0.1/> SELECT * FROM tmp_table_binary;
+--------------------------------+--------------------------------+
|           KEY_FIELD            |             FIELD1             |
+--------------------------------+--------------------------------+
| 1                              | [B@6219232f                    |
| 2                              | [B@605514f9                    |
+--------------------------------+--------------------------------+
2 rows selected (0.09 seconds)
0: jdbc:ignite:thin://127.0.0.1/> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message