Database hook enabling traditional mode at MySQL

The MySQL server can operate in different SQL modes, and can apply these
modes differently for different clients, depending on the value of the
sql_mode system variable. Traditional mode makes MySQL behave like a
"traditional" SQL database system. A simple description of this mode is
"give an error instead of a warning" when inserting an incorrect value
into a column including the case when the input string is surpassing the
maximum data length of the field.

Closes-Bug: #1224898
Change-Id: I2960435c81d21f5a65ea7fa4dc5c100880cf6aef