Optimization in MySQL version compatibility check