bearophile can say "i told you so" (re uint->int implicit conv)

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Thu Mar 28 14:29:53 PDT 2013


On Thu, 28 Mar 2013 21:03:07 +0100
"Adam D. Ruppe" <destructionator at gmail.com> wrote:
>
> which then got truncated by the database,

While I won't necessarily disagree with the rest, that right there is
"the real WTF". A database that silently alters data is unreliable,
and therefore fundamentally broken as a database. It should have raised
an error instead.

Is this MySQL, by any chance? And if so, are you making sure to use
strict-mode? That might help. From what I can tell, having strict mode
disabled is basically MySQL's "please fuck up half of my data" feature.
Not that I necessarily trust its strict mode to always be right
(which could very well be unfounded pessimism on my part), but it should
at least help.



More information about the Digitalmars-d mailing list