Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: users

Segfault in the git

 

 

DBMail users RSS feed   Index | Next | Previous | View Threaded


joan.moreau at m4x

Feb 14, 2009, 11:42 AM

Post #1 of 21 (1265 views)
Permalink
Segfault in the git

Dear all,

How to fix the current segfault (since 2.3.5) in the git version ?

Please, do answer me.

Thanks

JM
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


paul at nfg

Feb 15, 2009, 4:34 AM

Post #2 of 21 (1225 views)
Permalink
Re: Segfault in the git [In reply to]

Joan Moreau wrote:
>
> Dear all,
>
> How to fix the current segfault (since 2.3.5) in the git version ?

Joan,

A bit more patience would be nice. I have received your logfiles and
will investigate them.

--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


joan.moreau at m4x

Feb 15, 2009, 9:05 AM

Post #3 of 21 (1223 views)
Permalink
Re: Segfault in the git [In reply to]

The issue seems coming from accounts with mutipple sub-folders below INBOX.

Accounts with only INBOX, Sent .etc... do not segfaults
Accounts withmore than one sub folder do segfault



On Sun, 15 Feb 2009 13:34:23 +0100, Paul J Stevens <paul[at]nfg.nl> wrote:
> Joan Moreau wrote:
>>
>> Dear all,
>>
>> How to fix the current segfault (since 2.3.5) in the git version ?
>
> Joan,
>
> A bit more patience would be nice. I have received your logfiles and
> will investigate them.


_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


paul at nfg

Feb 15, 2009, 10:43 AM

Post #4 of 21 (1219 views)
Permalink
Re: Segfault in the git [In reply to]

Joan Moreau wrote:
> The issue seems coming from accounts with mutipple sub-folders below INBOX.
>
> Accounts with only INBOX, Sent .etc... do not segfaults
> Accounts withmore than one sub folder do segfault

In the logs you sent me there were no folders below INBOX. Also, looking
at them, I'm starting to suspect your subscription table lacks the
foreign key restraints against the users and mailboxes tables. But I
couldn't tell for sure.

I'll test the INBOX.folder scenario.


>
>
>
> On Sun, 15 Feb 2009 13:34:23 +0100, Paul J Stevens <paul[at]nfg.nl> wrote:
>> Joan Moreau wrote:
>>> Dear all,
>>>
>>> How to fix the current segfault (since 2.3.5) in the git version ?
>> Joan,
>>
>> A bit more patience would be nice. I have received your logfiles and
>> will investigate them.
>
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>


--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


joan.moreau at m4x

Feb 15, 2009, 11:20 AM

Post #5 of 21 (1219 views)
Permalink
Re: Segfault in the git [In reply to]

> at them, I'm starting to suspect your subscription table lacks the
> foreign key restraints against the users and mailboxes tables. But I
> couldn't tell for sure.
>

Maybe can you update the "fix foreign keys" script in sql/mysql/ , so I
can see if this is the case ?

> I'll test the INBOX.folder scenario.
>
>
ok
>
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


mysql.jorge at decimal

Feb 15, 2009, 11:24 AM

Post #6 of 21 (1219 views)
Permalink
RE: Segfault in the git [In reply to]

>
> Maybe can you update the "fix foreign keys" script in sql/mysql/ , so I
> can see if this is the case ?

Show us the output of:


show create table dbmail_subscription;

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


joan.moreau at m4x

Feb 15, 2009, 11:29 AM

Post #7 of 21 (1219 views)
Permalink
Re: Segfault in the git [In reply to]

CREATE TABLE `dbmail_subscription` (
`user_id` bigint(21) NOT NULL DEFAULT '0',
`mailbox_id` bigint(21) NOT NULL,
PRIMARY KEY (`user_id`,`mailbox_id`),
KEY `user_id_index` (`user_id`),
KEY `mailbox_id_index` (`mailbox_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED


Jorge Bastos wrote:
>> Maybe can you update the "fix foreign keys" script in sql/mysql/ , so I
>> can see if this is the case ?
>>
>
> Show us the output of:
>
>
> show create table dbmail_subscription;
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>


mysql.jorge at decimal

Feb 15, 2009, 11:39 AM

Post #8 of 21 (1219 views)
Permalink
RE: Segfault in the git [In reply to]

When you created the tables something went wrong or you created them in MyISAM and convert to InnoDB.

The foreign keys are on the create_tables.sql



Alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id) REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE CASCADE;

Alter table dbmail_subsctiption add FOREIGN KEY mailbox_id_fk (mailbox_id) REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE CASCADE ON UPDATE CASCADE;







From: dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org] On Behalf Of Joan Moreau
Sent: domingo, 15 de Fevereiro de 2009 19:29
To: DBMail mailinglist
Subject: Re: [Dbmail] Segfault in the git



CREATE TABLE `dbmail_subscription` (
`user_id` bigint(21) NOT NULL DEFAULT '0',
`mailbox_id` bigint(21) NOT NULL,
PRIMARY KEY (`user_id`,`mailbox_id`),
KEY `user_id_index` (`user_id`),
KEY `mailbox_id_index` (`mailbox_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED


Jorge Bastos wrote:

Maybe can you update the "fix foreign keys" script in sql/mysql/ , so I
can see if this is the case ?



Show us the output of:


show create table dbmail_subscription;

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


joan.moreau at m4x

Feb 15, 2009, 11:42 AM

Post #9 of 21 (1221 views)
Permalink
Re: Segfault in the git [In reply to]

thanks, I will try that.

Is it possible to fix the "fix foreign key' script ? I may not be the
only one with the issue...

Jorge Bastos wrote:
>
> When you created the tables something went wrong or you created them
> in MyISAM and convert to InnoDB.
>
> The foreign keys are on the create_tables.sql
>
>
>
> Alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id)
> REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE CASCADE;
>
> Alter table dbmail_subsctiption add FOREIGN KEY mailbox_id_fk
> (mailbox_id) REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE
> CASCADE ON UPDATE CASCADE;
>
>
>
>
>
>
>
> *From:* dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org]
> *On Behalf Of *Joan Moreau
> *Sent:* domingo, 15 de Fevereiro de 2009 19:29
> *To:* DBMail mailinglist
> *Subject:* Re: [Dbmail] Segfault in the git
>
>
>
> CREATE TABLE `dbmail_subscription` (
> `user_id` bigint(21) NOT NULL DEFAULT '0',
> `mailbox_id` bigint(21) NOT NULL,
> PRIMARY KEY (`user_id`,`mailbox_id`),
> KEY `user_id_index` (`user_id`),
> KEY `mailbox_id_index` (`mailbox_id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED
>
>
> Jorge Bastos wrote:
>
> Maybe can you update the "fix foreign keys" script in sql/mysql/ , so I
>
> can see if this is the case ?
>
>
>
>
> Show us the output of:
>
>
> show create table dbmail_subscription;
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org <mailto:DBmail[at]dbmail.org>
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


mysql.jorge at decimal

Feb 15, 2009, 11:45 AM

Post #10 of 21 (1220 views)
Permalink
RE: Segfault in the git [In reply to]

Foreign key script?

The create_tables.sql is correct, you did something wrong when created the tables!!



> -----Original Message-----
> From: dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org] On
> Behalf Of Joan Moreau
> Sent: domingo, 15 de Fevereiro de 2009 19:42
> To: DBMail mailinglist
> Subject: Re: [Dbmail] Segfault in the git
>
> thanks, I will try that.
>
> Is it possible to fix the "fix foreign key' script ? I may not be the
> only one with the issue...
>
> Jorge Bastos wrote:
> >
> > When you created the tables something went wrong or you created them
> > in MyISAM and convert to InnoDB.
> >
> > The foreign keys are on the create_tables.sql
> >
> >
> >
> > Alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id)
> > REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE
> CASCADE;
> >
> > Alter table dbmail_subsctiption add FOREIGN KEY mailbox_id_fk
> > (mailbox_id) REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE
> > CASCADE ON UPDATE CASCADE;
> >
> >
> >
> >
> >
> >
> >
> > *From:* dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org]
> > *On Behalf Of *Joan Moreau
> > *Sent:* domingo, 15 de Fevereiro de 2009 19:29
> > *To:* DBMail mailinglist
> > *Subject:* Re: [Dbmail] Segfault in the git
> >
> >
> >
> > CREATE TABLE `dbmail_subscription` (
> > `user_id` bigint(21) NOT NULL DEFAULT '0',
> > `mailbox_id` bigint(21) NOT NULL,
> > PRIMARY KEY (`user_id`,`mailbox_id`),
> > KEY `user_id_index` (`user_id`),
> > KEY `mailbox_id_index` (`mailbox_id`)
> > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED
> >
> >
> > Jorge Bastos wrote:
> >
> > Maybe can you update the "fix foreign keys" script in sql/mysql/
> , so I
> >
> > can see if this is the case ?
> >
> >
> >
> >
> > Show us the output of:
> >
> >
> > show create table dbmail_subscription;
> >
> > _______________________________________________
> > DBmail mailing list
> > DBmail[at]dbmail.org <mailto:DBmail[at]dbmail.org>
> > https://mailman.fastxs.nl/mailman/listinfo/dbmail
> >
> > ---------------------------------------------------------------------
> ---
> >
> > _______________________________________________
> > DBmail mailing list
> > DBmail[at]dbmail.org
> > https://mailman.fastxs.nl/mailman/listinfo/dbmail
> >
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


joan.moreau at m4x

Feb 15, 2009, 11:46 AM

Post #11 of 21 (1219 views)
Permalink
Re: Segfault in the git [In reply to]

this is the output:

(user_id) REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON
UPDATE CASCADE;
ERROR 1452 (23000): Cannot add or update a child row: a foreign key
constraint fails (`services_dbmail`.`#sql-f3e_8b08`, CONSTRAINT
`#sql-f3e_8b08_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `dbmail_users`
(`user_idnr`) ON DELETE CASCADE ON UPDATE CASCADE)
(mailbox_id) REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE
CASCADE ON UPDATE CASCADE;
ERROR 1452 (23000): Cannot add or update a child row: a foreign key
constraint fails (`services_dbmail`.`#sql-f3e_8b08`, CONSTRAINT
`#sql-f3e_8b08_ibfk_1` FOREIGN KEY (`mailbox_id`) REFERENCES
`dbmail_mailboxes` (`mailbox_idnr`) ON DELETE CASCADE ON UPDATE CASCADE)


I would love to be able to run the "fix foreign keys" script :-)

Jorge Bastos wrote:
>
> When you created the tables something went wrong or you created them
> in MyISAM and convert to InnoDB.
>
> The foreign keys are on the create_tables.sql
>
>
>
> Alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id)
> REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE CASCADE;
>
> Alter table dbmail_subsctiption add FOREIGN KEY mailbox_id_fk
> (mailbox_id) REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE
> CASCADE ON UPDATE CASCADE;
>
>
>
>
>
>
>
> *From:* dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org]
> *On Behalf Of *Joan Moreau
> *Sent:* domingo, 15 de Fevereiro de 2009 19:29
> *To:* DBMail mailinglist
> *Subject:* Re: [Dbmail] Segfault in the git
>
>
>
> CREATE TABLE `dbmail_subscription` (
> `user_id` bigint(21) NOT NULL DEFAULT '0',
> `mailbox_id` bigint(21) NOT NULL,
> PRIMARY KEY (`user_id`,`mailbox_id`),
> KEY `user_id_index` (`user_id`),
> KEY `mailbox_id_index` (`mailbox_id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED
>
>
> Jorge Bastos wrote:
>
> Maybe can you update the "fix foreign keys" script in sql/mysql/ , so I
>
> can see if this is the case ?
>
>
>
>
> Show us the output of:
>
>
> show create table dbmail_subscription;
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org <mailto:DBmail[at]dbmail.org>
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>


mysql.jorge at decimal

Feb 15, 2009, 11:46 AM

Post #12 of 21 (1220 views)
Permalink
RE: Segfault in the git [In reply to]

Sorry a typo:


Alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id) REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE CASCADE;

Alter table dbmail_subscription add FOREIGN KEY mailbox_id_fk (mailbox_id) REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE CASCADE ON UPDATE CASCADE;




> -----Original Message-----
> From: dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org] On
> Behalf Of Joan Moreau
> Sent: domingo, 15 de Fevereiro de 2009 19:42
> To: DBMail mailinglist
> Subject: Re: [Dbmail] Segfault in the git
>
> thanks, I will try that.
>
> Is it possible to fix the "fix foreign key' script ? I may not be the
> only one with the issue...
>
> Jorge Bastos wrote:
> >
> > When you created the tables something went wrong or you created them
> > in MyISAM and convert to InnoDB.
> >
> > The foreign keys are on the create_tables.sql
> >
> >
> >
> > Alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id)
> > REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE
> CASCADE;
> >
> > Alter table dbmail_subsctiption add FOREIGN KEY mailbox_id_fk
> > (mailbox_id) REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE
> > CASCADE ON UPDATE CASCADE;
> >
> >
> >
> >
> >
> >
> >
> > *From:* dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org]
> > *On Behalf Of *Joan Moreau
> > *Sent:* domingo, 15 de Fevereiro de 2009 19:29
> > *To:* DBMail mailinglist
> > *Subject:* Re: [Dbmail] Segfault in the git
> >
> >
> >
> > CREATE TABLE `dbmail_subscription` (
> > `user_id` bigint(21) NOT NULL DEFAULT '0',
> > `mailbox_id` bigint(21) NOT NULL,
> > PRIMARY KEY (`user_id`,`mailbox_id`),
> > KEY `user_id_index` (`user_id`),
> > KEY `mailbox_id_index` (`mailbox_id`)
> > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED
> >
> >
> > Jorge Bastos wrote:
> >
> > Maybe can you update the "fix foreign keys" script in sql/mysql/
> , so I
> >
> > can see if this is the case ?
> >
> >
> >
> >
> > Show us the output of:
> >
> >
> > show create table dbmail_subscription;
> >
> > _______________________________________________
> > DBmail mailing list
> > DBmail[at]dbmail.org <mailto:DBmail[at]dbmail.org>
> > https://mailman.fastxs.nl/mailman/listinfo/dbmail
> >
> > ---------------------------------------------------------------------
> ---
> >
> > _______________________________________________
> > DBmail mailing list
> > DBmail[at]dbmail.org
> > https://mailman.fastxs.nl/mailman/listinfo/dbmail
> >
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


joan.moreau at m4x

Feb 15, 2009, 11:47 AM

Post #13 of 21 (1218 views)
Permalink
Re: Segfault in the git [In reply to]

> Foreign key script?
>
>
yes, : dbmail/sql/mysql/fix_foreign_keys.mysql

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


mysql.jorge at decimal

Feb 15, 2009, 11:49 AM

Post #14 of 21 (1219 views)
Permalink
RE: Segfault in the git [In reply to]

Hum didn't saw that,

But what's inside is correct:

---
SET FOREIGN_KEY_CHECKS=0;
alter table dbmail_subscription drop foreign key user_id_fk;
alter table dbmail_subscription drop foreign key mailbox_id_fk;
alter table dbmail_subscription drop foreign key dbmail_subscription_ibfk_1;
alter table dbmail_subscription drop foreign key dbmail_subscription_ibfk_2;
alter table dbmail_subscription drop foreign key dbmail_subscription_ibfk_3;
alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id)
REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE
CASCADE;
alter table dbmail_subscription add FOREIGN KEY mailbox_id_fk (mailbox_id)
REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE CASCADE ON
UPDATE CASCADE;
SET FOREIGN_KEY_CHECKS=1;
---

> -----Original Message-----
> From: dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org] On
> Behalf Of Joan Moreau
> Sent: domingo, 15 de Fevereiro de 2009 19:47
> To: DBMail mailinglist
> Subject: Re: [Dbmail] Segfault in the git
>
>
> > Foreign key script?
> >
> >
> yes, : dbmail/sql/mysql/fix_foreign_keys.mysql
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


joan.moreau at m4x

Feb 15, 2009, 11:54 AM

Post #15 of 21 (1220 views)
Permalink
Re: Segfault in the git [In reply to]

but does not work :-(

Query OK, 0 rows affected (0.00 sec)

ERROR 1025 (HY000): Error on rename of
'./services_dbmail/dbmail_subscription' to
'./services_dbmail/#sql2-f3e-8d22' (errno: 152)



Jorge Bastos wrote:
> Hum didn't saw that,
>
> But what's inside is correct:
>
> ---
> SET FOREIGN_KEY_CHECKS=0;
> alter table dbmail_subscription drop foreign key user_id_fk;
> alter table dbmail_subscription drop foreign key mailbox_id_fk;
> alter table dbmail_subscription drop foreign key dbmail_subscription_ibfk_1;
> alter table dbmail_subscription drop foreign key dbmail_subscription_ibfk_2;
> alter table dbmail_subscription drop foreign key dbmail_subscription_ibfk_3;
> alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id)
> REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE
> CASCADE;
> alter table dbmail_subscription add FOREIGN KEY mailbox_id_fk (mailbox_id)
> REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE CASCADE ON
> UPDATE CASCADE;
> SET FOREIGN_KEY_CHECKS=1;
> ---
>
>
>> -----Original Message-----
>> From: dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org] On
>> Behalf Of Joan Moreau
>> Sent: domingo, 15 de Fevereiro de 2009 19:47
>> To: DBMail mailinglist
>> Subject: Re: [Dbmail] Segfault in the git
>>
>>
>>
>>> Foreign key script?
>>>
>>>
>>>
>> yes, : dbmail/sql/mysql/fix_foreign_keys.mysql
>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail[at]dbmail.org
>> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


mysql.jorge at decimal

Feb 15, 2009, 11:57 AM

Post #16 of 21 (1221 views)
Permalink
RE: Segfault in the git [In reply to]

Never mind, if you don't have that key it's normal



> -----Original Message-----
> From: dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org] On
> Behalf Of Joan Moreau
> Sent: domingo, 15 de Fevereiro de 2009 19:55
> To: DBMail mailinglist
> Subject: Re: [Dbmail] Segfault in the git
>
> but does not work :-(
>
> mysql> SET FOREIGN_KEY_CHECKS=0;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> alter table dbmail_subscription drop foreign key user_id_fk;
> ERROR 1025 (HY000): Error on rename of
> './services_dbmail/dbmail_subscription' to
> './services_dbmail/#sql2-f3e-8d22' (errno: 152)
>
>
>
> Jorge Bastos wrote:
> > Hum didn't saw that,
> >
> > But what's inside is correct:
> >
> > ---
> > SET FOREIGN_KEY_CHECKS=0;
> > alter table dbmail_subscription drop foreign key user_id_fk;
> > alter table dbmail_subscription drop foreign key mailbox_id_fk;
> > alter table dbmail_subscription drop foreign key
> dbmail_subscription_ibfk_1;
> > alter table dbmail_subscription drop foreign key
> dbmail_subscription_ibfk_2;
> > alter table dbmail_subscription drop foreign key
> dbmail_subscription_ibfk_3;
> > alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id)
> > REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE
> ON UPDATE
> > CASCADE;
> > alter table dbmail_subscription add FOREIGN KEY mailbox_id_fk
> (mailbox_id)
> > REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE
> CASCADE ON
> > UPDATE CASCADE;
> > SET FOREIGN_KEY_CHECKS=1;
> > ---
> >
> >
> >> -----Original Message-----
> >> From: dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org]
> On
> >> Behalf Of Joan Moreau
> >> Sent: domingo, 15 de Fevereiro de 2009 19:47
> >> To: DBMail mailinglist
> >> Subject: Re: [Dbmail] Segfault in the git
> >>
> >>
> >>
> >>> Foreign key script?
> >>>
> >>>
> >>>
> >> yes, : dbmail/sql/mysql/fix_foreign_keys.mysql
> >>
> >> _______________________________________________
> >> DBmail mailing list
> >> DBmail[at]dbmail.org
> >> https://mailman.fastxs.nl/mailman/listinfo/dbmail
> >>
> >
> > _______________________________________________
> > DBmail mailing list
> > DBmail[at]dbmail.org
> > https://mailman.fastxs.nl/mailman/listinfo/dbmail
> >
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail

_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


joan.moreau at m4x

Feb 15, 2009, 12:57 PM

Post #17 of 21 (1217 views)
Permalink
Re: Segfault in the git [In reply to]

ok, this prevent the segfaults :-)

would be very nice to have the "fix keys" script updated for 2.3.6


Jorge Bastos wrote:
> Never mind, if you don't have that key it's normal
>
>
>
>
>> -----Original Message-----
>> From: dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org] On
>> Behalf Of Joan Moreau
>> Sent: domingo, 15 de Fevereiro de 2009 19:55
>> To: DBMail mailinglist
>> Subject: Re: [Dbmail] Segfault in the git
>>
>> but does not work :-(
>>
>> mysql> SET FOREIGN_KEY_CHECKS=0;
>> Query OK, 0 rows affected (0.00 sec)
>>
>> mysql> alter table dbmail_subscription drop foreign key user_id_fk;
>> ERROR 1025 (HY000): Error on rename of
>> './services_dbmail/dbmail_subscription' to
>> './services_dbmail/#sql2-f3e-8d22' (errno: 152)
>>
>>
>>
>> Jorge Bastos wrote:
>>
>>> Hum didn't saw that,
>>>
>>> But what's inside is correct:
>>>
>>> ---
>>> SET FOREIGN_KEY_CHECKS=0;
>>> alter table dbmail_subscription drop foreign key user_id_fk;
>>> alter table dbmail_subscription drop foreign key mailbox_id_fk;
>>> alter table dbmail_subscription drop foreign key
>>>
>> dbmail_subscription_ibfk_1;
>>
>>> alter table dbmail_subscription drop foreign key
>>>
>> dbmail_subscription_ibfk_2;
>>
>>> alter table dbmail_subscription drop foreign key
>>>
>> dbmail_subscription_ibfk_3;
>>
>>> alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id)
>>> REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE
>>>
>> ON UPDATE
>>
>>> CASCADE;
>>> alter table dbmail_subscription add FOREIGN KEY mailbox_id_fk
>>>
>> (mailbox_id)
>>
>>> REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE
>>>
>> CASCADE ON
>>
>>> UPDATE CASCADE;
>>> SET FOREIGN_KEY_CHECKS=1;
>>> ---
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org]
>>>>
>> On
>>
>>>> Behalf Of Joan Moreau
>>>> Sent: domingo, 15 de Fevereiro de 2009 19:47
>>>> To: DBMail mailinglist
>>>> Subject: Re: [Dbmail] Segfault in the git
>>>>
>>>>
>>>>
>>>>
>>>>> Foreign key script?
>>>>>
>>>>>
>>>>>
>>>>>
>>>> yes, : dbmail/sql/mysql/fix_foreign_keys.mysql
>>>>
>>>> _______________________________________________
>>>> DBmail mailing list
>>>> DBmail[at]dbmail.org
>>>> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>>>
>>>>
>>> _______________________________________________
>>> DBmail mailing list
>>> DBmail[at]dbmail.org
>>> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>>
>>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail[at]dbmail.org
>> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


paul at nfg

Feb 15, 2009, 1:57 PM

Post #18 of 21 (1219 views)
Permalink
Re: Segfault in the git [In reply to]

Joan,

The 'foreign keys' update failed because the data is inconsistent. How
old is that database? There are subscriptions on mailboxes that don't
belong there. Possibly a mailbox belonging to user-A pointing to a
non-existant user-B.

A simple join should expose the culprit.

Joan Moreau wrote:
> this is the output:
>
> mysql> Alter table dbmail_subscription add FOREIGN KEY user_id_fk
> (user_id) REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON
> UPDATE CASCADE;
> ERROR 1452 (23000): Cannot add or update a child row: a foreign key
> constraint fails (`services_dbmail`.`#sql-f3e_8b08`, CONSTRAINT
> `#sql-f3e_8b08_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `dbmail_users`
> (`user_idnr`) ON DELETE CASCADE ON UPDATE CASCADE)
> mysql> Alter table dbmail_subscription add FOREIGN KEY mailbox_id_fk
> (mailbox_id) REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE
> CASCADE ON UPDATE CASCADE;
> ERROR 1452 (23000): Cannot add or update a child row: a foreign key
> constraint fails (`services_dbmail`.`#sql-f3e_8b08`, CONSTRAINT
> `#sql-f3e_8b08_ibfk_1` FOREIGN KEY (`mailbox_id`) REFERENCES
> `dbmail_mailboxes` (`mailbox_idnr`) ON DELETE CASCADE ON UPDATE CASCADE)
> mysql>
>
>
> I would love to be able to run the "fix foreign keys" script :-)
>
> Jorge Bastos wrote:
>>
>> When you created the tables something went wrong or you created them
>> in MyISAM and convert to InnoDB.
>>
>> The foreign keys are on the create_tables.sql
>>
>>
>>
>> Alter table dbmail_subscription add FOREIGN KEY user_id_fk (user_id)
>> REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE CASCADE;
>>
>> Alter table dbmail_subsctiption add FOREIGN KEY mailbox_id_fk
>> (mailbox_id) REFERENCES dbmail_mailboxes (mailbox_idnr) ON DELETE
>> CASCADE ON UPDATE CASCADE;
>>
>>
>>
>>
>>
>>
>>
>> *From:* dbmail-bounces[at]dbmail.org [mailto:dbmail-bounces[at]dbmail.org]
>> *On Behalf Of *Joan Moreau
>> *Sent:* domingo, 15 de Fevereiro de 2009 19:29
>> *To:* DBMail mailinglist
>> *Subject:* Re: [Dbmail] Segfault in the git
>>
>>
>>
>> CREATE TABLE `dbmail_subscription` (
>> `user_id` bigint(21) NOT NULL DEFAULT '0',
>> `mailbox_id` bigint(21) NOT NULL,
>> PRIMARY KEY (`user_id`,`mailbox_id`),
>> KEY `user_id_index` (`user_id`),
>> KEY `mailbox_id_index` (`mailbox_id`)
>> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED
>>
>>
>> Jorge Bastos wrote:
>>
>> Maybe can you update the "fix foreign keys" script in sql/mysql/ , so I
>>
>> can see if this is the case ?
>>
>>
>>
>>
>> Show us the output of:
>>
>>
>> show create table dbmail_subscription;
>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail[at]dbmail.org <mailto:DBmail[at]dbmail.org>
>> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> DBmail mailing list
>> DBmail[at]dbmail.org
>> https://mailman.fastxs.nl/mailman/listinfo/dbmail
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> DBmail mailing list
> DBmail[at]dbmail.org
> https://mailman.fastxs.nl/mailman/listinfo/dbmail


--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


paul at nfg

Feb 15, 2009, 1:58 PM

Post #19 of 21 (1217 views)
Permalink
Re: Segfault in the git [In reply to]

Joan Moreau wrote:
> ok, this prevent the segfaults :-)
>
> would be very nice to have the "fix keys" script updated for 2.3.6

Please submit a patch.


--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


joan.moreau at m4x

Feb 15, 2009, 10:33 PM

Post #20 of 21 (1203 views)
Permalink
Re: Segfault in the git [In reply to]

I will provide the updated file in the evening,
You will have to transform it into a patch as I do not know how to make it


Paul J Stevens wrote:
>
> Please submit a patch.
>
>
>
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail


marc at electronics-design

Feb 16, 2009, 1:13 AM

Post #21 of 21 (1200 views)
Permalink
Re: Segfault in the git [In reply to]

Joan Moreau schreef:
> I will provide the updated file in the evening,
> You will have to transform it into a patch as I do not know how to
> make it
If you're using git, try :
git diff <filename>

Just email the output.

Regards,

Marc
_______________________________________________
DBmail mailing list
DBmail[at]dbmail.org
https://mailman.fastxs.nl/mailman/listinfo/dbmail

DBMail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.