Bug#15811: extremely long time for mysql client to execute long INSERT
Bug#15811: extremely long time for mysql client to execute long INSERT

The problem was in redundant calls to strlen() in string functions,
where we may then return after checking only the small number of characters.

No test case is provided since it's a performance fix.


strings/ctype-mb.c:
  Do not use strlen() where arbitrary horizon of at least
  CHARSET_INFO::mbmaxlen character is sufficient.

flynn1973/mariadb-aix,natsys/mariadb_10.2,natsys/mariadb_10.2,natsys/mariadb_10.2,slanterns/server,davidl-zend/zenddbi,ollie314/server,ollie314/server,davidl-zend/zenddbi,natsys/mariadb_10.2,davidl-zend/zenddbi,davidl-zend/zenddbi,ollie314/server,ollie314/server,ollie314/server,ollie314/server,davidl-zend/zenddbi,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,ollie314/server,flynn1973/mariadb-aix,flynn1973/mariadb-aix,davidl-zend/zenddbi,flynn1973/mariadb-aix,davidl-zend/zenddbi,natsys/mariadb_10.2,natsys/mariadb_10.2,flynn1973/mariadb-aix,flynn1973/mariadb-aix,flynn1973/mariadb-aix,natsys/mariadb_10.2,ollie314/server,flynn1973/mariadb-aix,natsys/mariadb_10.2,davidl-zend/zenddbi,natsys/mariadb_10.2,ollie314/server,natsys/mariadb_10.2,davidl-zend/zenddbi,flynn1973/mariadb-aix