Forking from T260578
If you add many many IPs to an MWRestrictions object, such as via a BotPassword, it's possible to end up with a JSON string longer than BLOB will allow. This will result in truncated JSON being saved into the database, and as such, when it's retrieved, won't validate as JSON
Validation needs adding to check the length of bp_restrictions to be inserted is <= 65535 characters
And if it's longer... Some error should be thrown to the user, and the row not inserted
Technically blocks T108255: Enable MariaDB/MySQL's Strict Mode