Unify search for MySQL and DB2 , fix #1263