Ip2CountryLookup::getCountry() runs two database queries each time instead of just one

Created on 22 January 2025, 1 day ago

Problem/Motivation

There is an issue in Ip2CountryLookup::getCountry() where two database queries are ran each time, instead of one. It looks like as part of another previous issue πŸ› Fails in MSSql due to limit, must use Range on object Fixed the range query was added instead of passing in LIMIT to the SQL, but the original line calling ->query() was left around, instead of being replaced by the new line that was added that calls ->queryRange().

Steps to reproduce

Inspect the code / Call the getCountry() method of the Ip2CountryLookup service.

Proposed resolution

Two queries are present here, one with ->query() and another with ->queryRange(). Remove the non range based one.

Remaining tasks

Code the fix.

User interface changes

N/A

API changes

N/A

Data model changes

N/A

πŸ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom rossb89 Bristol

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024