Open
Bug 1202509
Opened 9 years ago
Updated 9 years ago
Force MySQL to use mode STRICT_ALL_TABLES
Categories
(Bugzilla :: Database, enhancement)
Bugzilla
Database
Tracking
()
NEW
People
(Reporter: LpSolit, Unassigned)
Details
Attachments
(1 file)
12.56 KB,
patch
|
Details | Diff | Splinter Review |
We currently disable the MySQL strict mode for bad reasons; see bug 321645 for details. This has the side-effect to put MySQL in a lenient mode, where too long strings are truncated before being inserted into the DB instead of throwing an error like PostgreSQL does. This can have dramatic consequences, such as bug 1202447.
The right fix is to force MySQL strict mode using STRICT_ALL_TABLES and to fix our DB schema and upgrade tools accordingly. This way, when a too long string is inserted into the DB, you get:
DBD::mysql::db do failed: Data too long for column '...' at row 1 [for Statement "INSERT INTO ..."
and the whole DB transaction is reverted. This is much better and safer than to insert truncated data (data corruption).
Reporter | ||
Comment 1•9 years ago
|
||
Very early work. But this lets you create a new DB with strict mode enabled.
You need to log in
before you can comment on or make changes to this bug.
Description
•