2 ms·
I'm not sure which is worse: not validating your data, or silently truncating invalid data. It seems that the fix [1] was to limit the length of email addresse
by kijin 11y ago
I'm not sure which is worse: not validating your data, or silently truncating invalid data.
It seems that the fix [1] was to limit the length of email addresses to 127 characters. That'll do for the time being, but they really should pay more attention to database warnings. MySQL does all sorts of stupid things, but at least it tends to emit warnings when it's being stupid. Catching those warnings and turning them into exceptions should go a long way toward preventing bugs like this.
[1] https://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commitdiff;h=9d64d15 https://git.mozilla.org/?p=bugzilla/bugzilla.git;a=commitdif...
- DCoder 11y agoMySQL can turn those warnings to exceptions on its own, via sql_mode [1]. New installations of MySQL 5.6 have this behaviour enabled by default on InnoDB tables. [1] http://www.tocker.ca/2014/01/14/making-strict-sql_mode-the-default.html http://www.tocker.ca/2014/01/14/making-strict-sql_mode-the-d...
- harshal 11y agoIt looks like the devs are doing exactly the right thing: Fixing the immediate problem quickly on released branches and following up by stricter checking in the development version (which looks like it will need a lot more changes) See: https://bugzilla.mozilla.org/show_bug.cgi?id=1202447#c17 https://bugzilla.mozilla.org/show_bug.cgi?id=1202447#c17 https://bugzilla.mozilla.org/show_bug.cgi?id=1202509 https://bugzilla.mozilla.org/show_bug.cgi?id=1202509