From b8e321fc9d020d22978573a7dde3f7e8ffb2fe32 Mon Sep 17 00:00:00 2001 From: SJ Date: Tue, 6 Dec 2011 11:29:36 +0100 Subject: [PATCH] improved the format of the attachment pointer --- etc/sphinx.conf | 4 +++- src/parser.c | 2 +- util/db-mysql.sql | 18 +++++++++++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/etc/sphinx.conf b/etc/sphinx.conf index 7962be82..dff3aea8 100644 --- a/etc/sphinx.conf +++ b/etc/sphinx.conf @@ -50,7 +50,9 @@ source tag sql_pass = sphinx sql_query_pre = SET NAMES utf8 - sql_query = SELECT id, `tag` FROM `tag` + sql_query = SELECT id, `uid`, `tag` FROM `tag` + + sql_attr_uint = uid } diff --git a/src/parser.c b/src/parser.c index e0412672..ef2d71bf 100644 --- a/src/parser.c +++ b/src/parser.c @@ -135,7 +135,7 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, stru } else { - snprintf(puf, sizeof(puf)-1, "ATTACHMENT_POINTER_%s.a%d", sdata->ttmpfile, state->n_attachments); + snprintf(puf, sizeof(puf)-1, "ATTACHMENT_POINTER_%s.a%d_XXX_PILER", sdata->ttmpfile, state->n_attachments); write(state->mfd, puf, strlen(puf)); //printf("%s", puf); } diff --git a/util/db-mysql.sql b/util/db-mysql.sql index 38156d76..e8c1a819 100644 --- a/util/db-mysql.sql +++ b/util/db-mysql.sql @@ -77,8 +77,9 @@ create index `attachment_idx2` on `attachment`(`sig`); drop table if exists `tag`; create table if not exists `tag` ( `id` bigint not null unique, + `uid` int not null, `tag` char(255) default null -); +) ENGINE=InnoDB; drop table if exists `archiving_rule`; @@ -95,6 +96,20 @@ create table if not exists `archiving_rule` ( primary key (`id`) ) ENGINE=InnoDB; + +drop table if exists `retention_rule`; +create table if not exists `retention_rule` ( + `id` bigint unsigned not null auto_increment, + + `subject` char(255) default null, + + `days` int not null, + + primary key (`id`) + +) ENGINE=InnoDB; + + drop table if exists `counter`; create table if not exists `counter` ( `rcvd` bigint unsigned default 0, @@ -104,6 +119,7 @@ create table if not exists `counter` ( insert into `counter` values(0, 0, 0); + drop table if exists `search`; create table if not exists `search` ( `email` char(128) not null,