[jadmin] issue fix for xdb_sql not keeping more than 1 message in
history
George H
george.dma at gmail.com
Mon Jul 23 03:26:10 CDT 2007
Hi,
I installed versin 1.4.4 of jabberd on Gentoo/Linux box. I am using
the xdb_sql thing to store everything on mysql. I basically used the
create table statements and the handlers found in the README.sql file.
They work pretty well. Except for one thing, the "messages" table only
allows for the storage of 1 offline message per jabberid. You can't
send more than 1 message to another jabber clinet while they are
offline.
I modified the table script and added an extra column "msgid INT
UNSIGNED AUTO_INCREMENT NOT NULL" and made "PRIMARY KEY(msgid)" and
made the INDEX on jid non-unique.
I tested it and it worked fine. I was able to send many offline
messages to other clients.
--- snip
CREATE TABLE messages
(
msgid INT UNSIGNED AUTO_INCREMENT NOT NULL,
jid TEXT NOT NULL,
correspondent TEXT NOT NULL,
type ENUM('offline','recv','sent') NOT NULL,
storetime datetime NOT NULL,
delivertime datetime,
subject TINYTEXT,
body TEXT NOT NULL,
xml TEXT NOT NULL,
PRIMARY KEY(msgid)
);
CREATE INDEX jid ON messages(jid(16));
---
hope this probably helps others who encountered the same issue
--
"Nothing is impossible for the person that doesn't have to do it"
"The probability of anything happening is in inverse ratio to its desirability"
"The problem is not freedom of choice, it is about the choices you
have. Choice is always limited by the number of alternatives presented
to you"
--
George H
george.dma at gmail.com
More information about the JAdmin
mailing list