Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-7480

Select for BINARY type field returns 'strange' value.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.2
    • None
    • sql
    • None

    Description

      Steps to reproduce:

      1. Connect to grid using console client and dbc:ignite:thin driver.
      2. Run these sql statements:
      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;
      

      Here is output from H2:

      SELECT * FROM tmp_table_binary;
      
      KEY_FIELD  	FIELD1  
      1			00ffaa
      2			ffccaa
      

      And this one is from grid:

       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/> 

      Attachments

        Activity

          People

            Unassigned Unassigned
            avolkov Alex Volkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: