>>>>> Ivan Shmakov writes: >>>>> Roger Binns writes:
[…] >> Consequently if you had a trigger pulling a stunt like this, your >> code could try to insert a blob and silently (wrongly) end up with a >> string. SQLite won't even complain if the blob isn't a valid text >> encoding producing an invalid string. > I don't have any triggers (at least, it wasn't my intent to add > them.) My code is roughly as shown below. > And I don't seem to understand where's the problem. Silly mistake on my part, as I've just found. Namely, I've had /two/ functions to alter the table in question. One of them INSERT's the tuple, and uses sqlite3_bind_blob (). The other, that UPDATE's the tuple, however, uses sqlite3_bind_text (). Before I saw that there's sound support for blobs in the current SQLite, I've planned to use Base64 for these fields; after, I've changed one of the functions, but not the other. And yes, code duplication is clearly a bad thing. Now that the discrepancy is fixed, the problem is gone. Thanks. […] -- FSF associate member #7257 Coming soon: Software Freedom Day http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en) _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users