varchar datatype accepting integer values
Your question relates to implicit type conversions. 

I searched the MariaDB documentation but their description is not very detailed except to show examples of this happening (see https://mariadb.com/kb/en/mariadb/type-conversion/). MySQL has a similar page which definitively states it implicitly converts to/from strings as required (see http://dev.mysql.com/doc/refman/5.7/en/type-conversion.html).


  For example, MySQL automatically converts numbers to strings as necessary, and vice versa. 


The ISO-92 standard allows for implicit conversions but doesn't define all of them, it's vendor specific. However you can't stop this happening in SQL Server, or Oracle, I suspect it's by convention and can't be avoided.