strmake() called with wrong parameters: 5.1-specific fixes. sql/sql_db.cc: fix off-by-one buffer-length