Hi ...
problem is still here ... in 0.5-2 is upgrade file same as in 0.5-1. i correctly delete lines between 0.3 and 0.3.1-6 as you can see and attachment.

I tried following steps but for user roundcube seams to not be working.
mysql> show table status
    -> BEGIN
    -> source /usr/share/dbconfig-common/data/roundcube/upgrade/mysql/0.5-1
    -> show innodb status
    -> ROLLBACK
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BEGIN
source /usr/share/dbconfig-common/data/roundcube/upgrade/mysql/0.5-1
show ' at line 2

this output i get when i use only show innodb status
=====================================
110122 15:15:12 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 50 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 168, signal count 166
Mutex spin waits 0, rounds 496, OS waits 11
RW-shared spins 300, OS waits 150; RW-excl spins 6, OS waits 6
------------------------
LATEST FOREIGN KEY ERROR
------------------------
110122 15:09:32 Error in dropping of a foreign key constraint of table roundcube/messages,
in SQL command
ALTER TABLE `messages` DROP FOREIGN KEY `user_id_fk_messages`
Cannot find a constraint with the given id user_id_fk_messages.
------------
TRANSACTIONS
------------
Trx id counter 0 921
Purge done for trx's n:o < 0 920 undo n:o < 0 0
History list length 2
Total number of lock structs in row lock hash table 0
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 0, not started, process no 24283, OS thread id 2968697712
MySQL thread id 55, query id 610 localhost root
show innodb status
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
2093 OS file reads, 4546 OS file writes, 568 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2,
144 inserts, 144 merged recs, 2 merges
Hash table size 34679, used cells 39, node heap has 1 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 0 87476013
Log flushed up to   0 87476013
Last checkpoint at  0 87476013
0 pending log writes, 0 pending chkp writes
479 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 17414942; in additional pool allocated 935552
Buffer pool size   512
Free buffers       5
Database pages     506
Modified db pages  0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 2109, created 6404, written 9758
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 24283, id 2994273136, state: waiting for server activity
Number of rows inserted 38993, updated 1, deleted 0, read 2377
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

thanks
vlado

On 01/22/2011 11:05 AM, Vincent Bernat wrote:
OoO La nuit ayant déjà recouvert  d'encre ce jour du vendredi 21 janvier
2011, vers 23:30, bubulak<v...@radiolan.sk>  disait :

i tried that before but with this i get this error
applying upgrade sql for 0.3.1-6 ->  0.5-1.
error encountered processing
/usr/share/dbconfig-common/data/roundcube/upgrade/mysql/0.5-1:
mysql said: ERROR 1025 (HY000) at line 17: Error on rename of
./roundcube/messages' to './roundcube/#sql2-893-17e54' (errno: 152)

Ensure that you did not remove /*!40014 SET FOREIGN_KEY_CHECKS=0 */ that
is important to make the following DROP FOREIGN KEY work. If you did not
remove this comment, can you try the following steps :
  1. Connect to roundcube database  (mysql -u roundcube -p roundcube, you
     can find the password in /etc/roundcube/debian-db.php)
  2. Issue command the following commands :

show table status
BEGIN
source /usr/share/dbconfig-common/data/roundcube/upgrade/mysql/0.5-1
show innodb status
ROLLBACK
-- Ensure we are using InnoDB as engine.

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;

-- Updates from version 0.3-stable

-- Updates from version 0.3.1
-- WARNING: Make sure that all tables are using InnoDB engine!!!
--          If not, use: ALTER TABLE xxx ENGINE=InnoDB;

/* MySQL bug workaround: http://bugs.mysql.com/bug.php?id=46293 */
/*!40014 SET FOREIGN_KEY_CHECKS=0 */;

ALTER TABLE `messages` DROP FOREIGN KEY `user_id_fk_messages`;
ALTER TABLE `cache` DROP FOREIGN KEY `user_id_fk_cache`;
ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`;
ALTER TABLE `identities` DROP FOREIGN KEY `user_id_fk_identities`;

ALTER TABLE `messages` ADD CONSTRAINT `user_id_fk_messages` FOREIGN KEY 
(`user_id`)
 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `cache` ADD CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `contacts` ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY 
(`user_id`)
 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `identities` ADD CONSTRAINT `user_id_fk_identities` FOREIGN KEY 
(`user_id`)
 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE `contacts` ALTER `name` SET DEFAULT '';
ALTER TABLE `contacts` ALTER `firstname` SET DEFAULT '';
ALTER TABLE `contacts` ALTER `surname` SET DEFAULT '';

ALTER TABLE `identities` ADD INDEX `user_identities_index` (`user_id`, `del`);
ALTER TABLE `identities` ADD `changed` datetime NOT NULL DEFAULT '1000-01-01 
00:00:00' AFTER `user_id`;

CREATE TABLE `contactgroups` (
  `contactgroup_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `del` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY(`contactgroup_id`),
  CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`)
    REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  INDEX `contactgroups_user_index` (`user_id`,`del`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci 
*/;

CREATE TABLE `contactgroupmembers` (
  `contactgroup_id` int(10) UNSIGNED NOT NULL,
  `contact_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  PRIMARY KEY (`contactgroup_id`, `contact_id`),
  CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`)
    REFERENCES `contactgroups`(`contactgroup_id`) ON DELETE CASCADE ON UPDATE 
CASCADE,
  CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`)
    REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE
) /*!40000 ENGINE=INNODB */;

/*!40014 SET FOREIGN_KEY_CHECKS=1 */;

-- Updates from version 0.4-beta

ALTER TABLE `users` CHANGE `last_login` `last_login` datetime DEFAULT NULL;
UPDATE `users` SET `last_login` = NULL WHERE `last_login` = '1000-01-01 
00:00:00';

-- Updates from version 0.4.2

ALTER TABLE `users` DROP INDEX `username_index`;
ALTER TABLE `users` ADD UNIQUE `username` (`username`, `mail_host`);

ALTER TABLE `contacts` MODIFY `email` varchar(255) NOT NULL;

Reply via email to