core: Fix Postgres messagesNewerThan wrong buffer 276/head
authorShane Synan <digitalcircuit36939@gmail.com>
Sun, 5 Mar 2017 19:39:38 +0000 (13:39 -0600)
committerShane Synan <digitalcircuit36939@gmail.com>
Sun, 5 Mar 2017 20:53:34 +0000 (14:53 -0600)
commita5b9d7f3893413771b77172db819118571b084e0
tree7f38b3141bc67cb1ddccae915c8b0cee74408285
parent570fe57edab50ce8acee57843b233354b6fc1c83
core: Fix Postgres messagesNewerThan wrong buffer

Make the inner SELECT statement use the buffer ID for bufferid, NOT
the messageid.

This fixes select_messagesNewerThan using the wrong variable for the
buffer ID, causing more recent messages to not show up when fetching
backlog with the "Unread messages" method.

Fixes regression in pull request #273, missed by pull request #274.

NOTE: The client still needs fixed to stop sending invalid IDs.  That
should be addressed with another set of commits.

See https://github.com/quassel/quassel/pull/274#issuecomment-284205802
src/core/SQL/PostgreSQL/20/select_messagesNewerThan.sql