[
https://issues.apache.org/jira/browse/IGNITE-11563?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16813563#comment-16813563
]
Pavel Kuznetsov commented on IGNITE-11563:
------------------------------------------
Fast update conversion is fixed. Got another delete issue: if double (or
string) argument is passed, only in partitioned mode, delete operation could do
nothing.
{code:java}
execute("CREATE TABLE TEST_TABLE (" +
"ID DECIMAL(19,1)," +
"VALUE VARCHAR2(255 CHAR)," +
"PRIMARY KEY (ID))with \"template=partitioned\"");
execute("INSERT INTO TEST_TABLE (id, value) VALUES (1, 'this row should
be deleted'), (2, 'value')");
Object one = 1.0d;
execute("DELETE FROM TEST_TABLE WHERE ID = ? AND VALUE = 'this row
should be deleted'", one);
List<List<?>> expRows = Collections.singletonList(asList(new
BigDecimal(2), "value"));
assertEqualsCollections("Argument of class " +
one.getClass().getSimpleName() + " is converted incorrectly",
expRows, execute("SELECT * FROM TEST_TABLE ORDER BY ID"));
{code}
research shown that select generated for this delete also doesn't work.
> DELETE WHERE does not work in prepared statements
> -------------------------------------------------
>
> Key: IGNITE-11563
> URL: https://issues.apache.org/jira/browse/IGNITE-11563
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 2.7
> Reporter: Stefan
> Assignee: Pavel Kuznetsov
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> With SQL I cannot delete a row using a prepared statement. The following
> statement is simply ignored:
> {{DELETE}} {{FROM}} {{AnyTable WHERE}} {{id = ?}}
> This happens with JDBC-Thin and with ODBC so I suspect that the cluster gets
> the correct data but handles it wrong. By adding an always-true-condition it
> works as expected:
> {{DELETE}} {{FROM}} {{AnyTable WHERE}} {{id = id AND}} {{id = ?}}
> I tested with a very simple table that was created with:
> {{CREATE TABLE testtable (}}
> {{ "ID" NUMBER(19,0),}}
> {{ "VALUE" VARCHAR2(255 CHAR),}}
> {{ PRIMARY KEY (ID)}}
> {{) WITH "template=replicated,cache_name=testtable"}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)