You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CASSGO-42: don't panic if no applied column is returned
I also added checks against MapScan failing which could also trigger this bug.
Several integration tests were added to validate various edge cases.
Patch by James Hartig; reviewed by João Reis for CASSGO-42
t.Fatal("insert should have returned not found:", err)
533
+
}
534
+
535
+
failBatch=session.Batch(LoggedBatch)
536
+
failBatch.Query("UPDATE cas_table SET last_modified = DATEOF(NOW()) WHERE title='_foo' AND revid=3e4ad2f1-73a4-11e5-9381-29463d90c3f0 IF last_modified = ?", modified)
// make sure MapScanCAS does not panic when MapScan fails
541
+
casMap=make(map[string]interface{})
542
+
casMap["last_modified"] =false
543
+
if_, err:=session.Query(`UPDATE cas_table SET last_modified = DATEOF(NOW()) WHERE title='_foo' AND revid=3e4ad2f1-73a4-11e5-9381-29463d90c3f0 IF last_modified = ?`,
544
+
modified).MapScanCAS(casMap); err==nil {
545
+
t.Fatal("update should hvae errored", err)
546
+
}
547
+
548
+
// make sure MapExecuteBatchCAS does not panic when MapScan fails
549
+
failBatch=session.Batch(LoggedBatch)
550
+
failBatch.Query("UPDATE cas_table SET last_modified = DATEOF(NOW()) WHERE title='_foo' AND revid=3e4ad2f1-73a4-11e5-9381-29463d90c3f0 IF last_modified = ?", modified)
0 commit comments