private ResultSet retryResult(String query) {
		Boolean passed = false;
		
		while (!passed) {
			try {
				Connection connection = getConnection();
			    Statement statement = connection.createStatement();
			    
			    ResultSet result = statement.executeQuery(query);
			    
			    passed = true;
			    
			    return result;
			} catch (SQLException ex) {
				
				if (ex.getMessage().toLowerCase().contains("locking") || ex.getMessage().toLowerCase().contains("locked")) {
					passed = false;
				}else{
					core.writeError("Error at SQL Query: " + ex.getMessage(), false);
				}
			}
		}
		
		return null;
	}