Taras Ledkov created IGNITE-16098:
-------------------------------------

             Summary: Key type and schema must be validated on a data inserttion
                 Key: IGNITE-16098
                 URL: https://issues.apache.org/jira/browse/IGNITE-16098
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 2.11
            Reporter: Taras Ledkov
            Assignee: Taras Ledkov
             Fix For: 2.13


There are two cases that breaks consistency between indexes and data and may be 
cause of break index tree.

*1. Put different entities that are logically same for SQL*
{{CREATE TABLE TEST(ID0 INT, ID1 INT, VAL int) WITH 
"KEY_TYPE=MyType,CACHE_NAME=test"}};

then create to keys with hidden field and put to cache test.
{code}
 BinaryObjectBuilder bobKey0 = grid(0).binary().builder("MyType");
            bobKey0.setField("ID0", 0);
            bobKey0.setField("ID1", 0);
            bobKey0.setField("hidden", 0);

 BinaryObjectBuilder bobKey1 = grid(0).binary().builder("MyType");
            bobKey0.setField("ID0", 0);
            bobKey0.setField("ID1", 0);
            bobKey0.setField("hidden", 1);
{code}
These key object are different  by hidden field and cache will contains two 
entries.
But (ID0, ID1) fields are same and sorted PK index will contain only one record.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to