?
avatar sovainfo
sovainfo
20 Oct 2014

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.

avatar sovainfo sovainfo - open - 20 Oct 2014
avatar jissues-bot jissues-bot - change - 20 Oct 2014
Labels Added: ?
avatar Bakual
Bakual - comment - 21 Oct 2014

Please see #4870

avatar brianteeman brianteeman - change - 21 Oct 2014
Category MS SQL
avatar Bakual
Bakual - comment - 3 Dec 2014

Closing as fixed with #5293

avatar Bakual Bakual - close - 3 Dec 2014
avatar Bakual Bakual - change - 3 Dec 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-12-03 07:55:53

Add a Comment

Login with GitHub to post a comment