SQLServer2005LimitHandler uncapable of handle subquery in column list

Description

Hi guys,

I just stumbled across the default SQLServer2005LimitHandler which is the default limit handler for SQL server. We have queries with a subquery in the column list like this one:

When the limit handler trys to get the position of the FROM-clause (in method fillAliasInSelectClause) it uses a regular expression:

to determine the actual column aliases in the select. This will match the first FROM-clause in the subquery thus yielding to a wrong select list of the limit clause like this for the example above:

Environment

None

Activity

Show:
Sebastian Götz
December 22, 2016, 12:57 PM

Am I right that there will be no fix for the 5.1.x branch?
Just curious because I will have to adopt the fix manually then.

Gail Badner
May 4, 2017, 5:11 AM

Fixed in 5.1 branch as well.

Gail Badner
May 4, 2017, 5:11 AM

, this will be fixed in 5.1.6 to be released later this week.

Assignee

Chris Cranford

Reporter

Sebastian Götz

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure