John Simpson wrote:
howdy-
while answering a question for somebody on another mailing list i
happened to notice that, at least as of vpopmail 5.4.10, the structure
of the "valias" table created in a mysql database does not have any
provision for sequencing the entries attached to a given alias.
Correct.
first, how does the vdelivermail program decide in which order to
process the entries when there are multiple records?
It doesn't.
does it use them in the order that mysql delivers them?
Yes.
and if so, does mysql have any guaranteed order that it will present
> the records with an explicit ORDER BY clause in the query?
There is no ORDER BY clause in the query, so the order the records is
random. They may appear to follow the order they were entered in, but
adds and deletes can change the order.
second, if a user has one or more existing valias records, the "valias
-i" command would seem to work by sending an INSERT query with the new
line. is the new line added to the beginning of the sequence, the end
of the sequence, or is there in fact no guaranteed sequence at all?
If there is no ORDER BY clause in a query the order the records are
returned in is random, and subject to change without notice. We need to
add an order field, and an ORDER BY clause, but it hasn't happened yet.
--------------------------------------------------
| Mac OS X proves that it's easier to make UNIX |
| pretty than it is to make Windows secure. |
--------------------------------------------------
<grin>