Maksim Zhuravkov created IGNITE-22015:
-----------------------------------------
Summary: Sql. NOT NULL constraint is ignored by UPDATE statement
Key: IGNITE-22015
URL: https://issues.apache.org/jira/browse/IGNITE-22015
Project: Ignite
Issue Type: Bug
Components: sql
Reporter: Maksim Zhuravkov
NOT NULL constraint is ignored by UPDATE statement and it is possible to set
null value to not null column.
{code:java}
@Test
public void test() {
sql("CREATE TABLE t (id INTEGER PRIMARY KEY, int_col INTEGER NOT NULL)");
try {
sql("INSERT INTO t VALUES(1, NULL)");
fail();
} catch (Exception e) {
System.err.println(e.getMessage());// Column 'INT_COL' does not allow
NULLs
}
sql("INSERT INTO t VALUES(1, 42)");
sql("UPDATE t SET int_col = NULL");
for (var row : sql("SELECT id, int_col FROM t")) {
System.err.println(row);
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)