Is this a bug (I could manually create a PK for it), or is this a feature?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I took a look at the current mysql.sql from the ejabberd 2.1.x branch for additional context at https://github.com/processone/ejabberd/blob/2.1.x/src/odbc/mysql.sql .
It looks like the “seq” column is a unique identifier that can be used the same way as a primary key except that no foreign key references can be made to it. I expect this is unimportant because there is never a time in ejabberd when you need to reference a particular offline message by its sequence number in another mysql table by way of a foreign key constraint.
I’m sure someone at processone had an opinion about this that resulted in a unique constraint instead of a primary key. Having worked extensively with mod_offline_odbc I can assure you that it won’t make a difference to ejabberd if you add “primary_key(seq)” to the spool table definition and remove the redundant unique constraint on the seq column.