I have my pagination query I am passing page and size ass ?page=0&size=5. But not getting any result. This is my query.
@Query(
    value = "SELECT *, 
            ( 6371 * acos( 
                cos( radians(:lat) ) 
                * cos( radians( latitude ) )
                * cos( radians( longitude ) 
                    - radians(:lng) ) 
                + sin( radians(:lat) ) 
                * sin( radians( latitude ) ) ) 
            ) AS distance 
        FROM stores 
            WHERE deleted = '0' 
            HAVING distance < 20000 
            ORDER BY distance ?#{#pageable}", 
    countQuery = "select count(*) from stores where deleted = 0",
    nativeQuery = true)
    public Page<Stores> getAllNearbyStores(
        @Param("lat") double lat, 
        @Param("lng") double lng, 
        Pageable pageable
    );
Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '_binary'¬í\0sr\0+org.springframework.data.domain.PageRequestÀùPÅÀÇ&\0' at line 1