Just killed the most annoying bug.
Uncategorized
1
Posts
1
Posters
1
Views
-
Just killed the most annoying bug. I was doing
SELECT v FROM t WHERE k = ?
and then
UPDATE t SET v = ? WHERE k = ? AND v = ?
and the UPDATE was not applying?
Turns out I was storing nil → NULL, and then reading []byte(stmt.GetText("v")) → []byte("").
NULL and the empty BLOB don't compare equal.
https://github.com/FiloSottile/sunlight/pull/52/commits/96fb74be886a471f9f7a2121fd5d64ff708ff2d2
-
undefined cybersecurity@poliverso.org shared this topic on