Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSSQL: Joomla! update for test fails #4869

Closed
sovainfo opened this issue Oct 20, 2014 · 2 comments
Closed

MSSQL: Joomla! update for test fails #4869

sovainfo opened this issue Oct 20, 2014 · 2 comments

Comments

@sovainfo
Copy link
Contributor

Running J336 wanting to use Joomla! Update to test 337-dev it will fail.

Error: 42000 [Microsoft][SQL Server Native Client 11.0][SQL Server]A nested INSERT, UPDATE, DELETE, or MERGE statement must have an OUTPUT clause.SQL=SELECT * FROM ( UPDATE [j336_extensions] SET [params] = '{"mediaversion":"a0029d5a3035565db1f2f0ddb93da8a6"}' WHERE [type] = 'library' AND [element] = 'joomla') _myResults WHERE RowNumber BETWEEN 1 AND 0

Again a problem due to processLimit in libraries/joomla/database/query.php. Applies to all RDBMS's but only MSSQL has this complex implementation.

FIX: Make sure to only processLimit for SELECT statements! Move the lines:
if ($this instanceof JDatabaseQueryLimitable)
{
$query = $this->processLimit($query, $this->limit, $this->offset);
}
from just before: return $query
to the case "select" just before the break.
Don't forget to add " && ($this->limit > 0 || $this->offset > 0)" to the condition in the if. Between the e and ).

Applying these changes should allow you to refresh on the .finalise error.

@Bakual
Copy link
Contributor

Bakual commented Oct 21, 2014

Please see #4870

@Bakual
Copy link
Contributor

Bakual commented Dec 3, 2014

Closing as fixed with #5293

@Bakual Bakual closed this as completed Dec 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants