optimized for mysql(test under mariadb)