Closed (fixed)
Project:
Devel
Version:
8.x-1.x-dev
Component:
devel
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 May 2013 at 01:16 UTC
Updated:
3 Jun 2013 at 13:10 UTC
Jump to comment: Most recent file
Refer to #1993166: Postgres: db_insert()->from($query) with zero rows causes error with default options.
This is a Postgres edge-case, but when the return value is not utilised, there's no reason not to make the change.
@see devel_rebuild_node_comment_statistics()
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | devel-db_insert_return_null-1993200-1.patch | 442 bytes | jweowu |
Comments
Comment #1
jweowu commentedComment #2
salvisAgreed.
Comment #3
salvis#1: devel-db_insert_return_null-1993200-1.patch queued for re-testing.
Comment #4
salvisPushed to D8 and D7 — thank you, jweowu!
Could this work for D6 with dbtng module, too?
Comment #5
jweowu commentedI've never used D6 + DBTNG myself, so while I would imagine this would be the case, I can't confirm it.
However I can see that
InsertQuery::__construct()sets the same default return value using the same syntax in the D6 module's query.inc, andDatabase::RETURN_NULLis defined the same way in database.inc, so I'd be surprised if this wasn't applicable.Comment #6
salvisMakes sense, thanks.
Pushed to D6 as well.