Author Topic: Problem with groups in 0.4beta  (Read 4334 times)

Offline bagu

  • Full Member
  • ***
  • Posts: 109
    • Bagu.biz
Problem with groups in 0.4beta
« on: April 24, 2010, 12:54:41 PM »
Helle, i can't create groups on this version, i receive this error in logs :

[24-Apr-2010 18:43:38 +0200]: DB Error: MDB2 Error: constraint violation Query: _doQuery: [Error message: Could not execute statement] [Last executed query: INSERT INTO contactgroups (user_id, changed, name) VALUES (20, now(), 'test')] [Native code: 1452] [Native message: Cannot add or update a child row: a foreign key constraint fails (`roundcubemail`.`contactgroups`, CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE)]  in \roundcube\program\include\rcube_mdb2.php on line 658 (POST /webmail/?_task=addressbook&_action=group-create?_task=&_action=)

I use mysql 5.1.46, php 5.2.13 and apache 2.2.15

EDIT : there is a problem with the mysql files...Because, i make a backup of my database, i drop everything, then reload mysql.initial.sql and then some updates of  mysql.update.sql and everything work well now...
« Last Edit: April 24, 2010, 01:13:05 PM by bagu »

Offline Paul

  • Jr. Member
  • **
  • Posts: 12
Problem with groups in 0.4beta
« Reply #1 on: May 25, 2010, 08:32:42 AM »
Quote from: bagu;27008


EDIT : there is a problem with the mysql files...Because, i make a backup of my database, i drop everything, then reload mysql.initial.sql and then some updates of  mysql.update.sql and everything work well now...


I'm having the same problem. I did execute the SQL statements in mysql.update.sql.
My users and contacts tables are myISAM. It seems they changed the storage engine between 0.1.1 and 0.2 stable in the mysql.initial.sql file, but there's no 'alter table ... engine=innodb' in the mysql.update.sql files. So unless I'm missing something, there is a problem with the mysql files.

Offline Nick Lock

  • Newbie
  • *
  • Posts: 1
Problem with groups in 0.4beta
« Reply #2 on: June 15, 2010, 05:21:41 AM »
I've just had this problem myself, and after opening a ticket (#1486794) alec pointed me in the right direction to solve it. If you're upgrading from an older version, your tables might be using the MyISAM engine - and RC requires InnoDB. Having tables using different engines causes all sorts of exciting problems!


This can be fixed by using:

ALTER TABLE {tablename} TYPE=InnoDB;

replacing {tablename} with each table in your RC database in turn to convert them all to InnoDB.

(do it on a copy of the DB first, just to be safe!)

Offline aless

  • Newbie
  • *
  • Posts: 1
Problem with groups in 0.4beta
« Reply #3 on: September 06, 2010, 06:28:28 AM »
same problem, i have solved with:

ALTER TABLE `cache` ENGINE=InnoDB;
ALTER TABLE `session` ENGINE=InnoDB;
ALTER TABLE `messages` ENGINE=InnoDB;
ALTER TABLE `users` ENGINE=InnoDB;
ALTER TABLE `contacts` ENGINE=InnoDB;
ALTER TABLE `identities` ENGINE=InnoDB;