Leonardo Rodrigues,

>     When trying to create tables according to README.sql-mysql that
> ships with amavisd-2.6.0, i have some troubles. After some researching,
> i found that the problem was on the foreign key on msg table(sid field),
> which references maddr (id field).
>
>     maddr.id is created with bigint unsigned and msg.sid is created with
> integer unsigned. Columns being created with different data types do not
> allow them to be linked in foreign key.
>
>     interesting is that web documentation, located on
> http://www.ijs.si/software/amavisd/README.sql-mysql.txt
>
>     is different from README.sql-mysql shipped with 2.6.0. On the web
> document, everything is created with integer unsigned field .... but
> that document seems to be not updated, as table definitions have some
> differences from the 2.6.0 shipped one and the web available one.
>
>     on the 2.6.0 shipped, maddr has the partition_tag column, which does
> not exists on web available one. So, seems web document is not updated ....

You are right, the web document was not up to date.
Fixed now (also with some last minute changes).

>     Changing 'bigint unsigned' to 'integer unsigned' on msg table
> definition, all the rest works fine.
>
>     But i think bigint is there for some reason .....
>
>     could you investigate that please ??? the document, as shipped with
> 2.6.0, is not working because this bigint/integer difference thing.

Again you are right, there was a discrepancy between a data type
of maddr.id (used as a foreign key) and msgs.sid & msgrcpt.rid.
They all should be of the same type, either integer, or
integer unsigned, or bigint, or bigint unsigned.

I would use SERIAL for maddr.id, which it is just an alias
for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE,
which is the reason why bigint is there.

Only huge long-term amavisd SQL log databases could approach
a limitation on integer and would benefit from bigint.
For the rest of us, either would do.

  Mark

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to