-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2273,13 +2273,13 @@ public void testUpdateWithPredicates() | |
assertUpdate("UPDATE " + tableName + " SET email = '[email protected]' WHERE id in(1, 2, 3)", 3); | ||
assertQuery("SELECT id, full_name, email FROM " + tableName, "VALUES (1, 'aaaa', '[email protected]'), (2, 'ssss', '[email protected]'), (3, 'ssss', '[email protected]'), (4, 'dddd', '[email protected]') "); | ||
|
||
// set values to null | ||
// set all values to null | ||
assertUpdate("UPDATE " + tableName + " SET email = NULL", 4); | ||
assertQuery("SELECT email FROM " + tableName + " WHERE email is NULL", "VALUES NULL"); | ||
assertQuery("SELECT email FROM " + tableName + " WHERE email is NULL", "VALUES NULL, NULL, NULL, NULL"); | ||
|
||
// update nulls to non-null | ||
assertUpdate("UPDATE " + tableName + " SET email = '[email protected]' WHERE full_name is NULL", 1); | ||
assertQuery("SELECT email FROM " + tableName + "WHERE email is NULL", "VALUES '[email protected]'"); | ||
assertUpdate("UPDATE " + tableName + " SET email = '[email protected]' WHERE email is NULL", 4); | ||
assertQuery("SELECT count(*) FROM " + tableName + " WHERE email is not NULL", "VALUES 4"); | ||
} | ||
|
||
@Test | ||
|