From aa546e17887931ccaf6390c2d6a31e028db70aaf Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Mon, 07 Nov 2011 06:03:45 -0500 Subject: [PATCH] - Fix handling of DB connection failures. Detect failure on connection level instead of on query level. Fixes issue when one write query failed, next queries were not executed. - Changed 'var' to 'public'. --- SQL/mysql.update.sql | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql index fee18d6..6604539 100644 --- a/SQL/mysql.update.sql +++ b/SQL/mysql.update.sql @@ -145,7 +145,7 @@ TRUNCATE TABLE `messages`; TRUNCATE TABLE `cache`; --- Updates from version 0.6-stable +-- Updates from version 0.6 ALTER TABLE `users` CHANGE `alias` `alias` varchar(128) BINARY NOT NULL; ALTER TABLE `users` CHANGE `username` `username` varchar(128) BINARY NOT NULL; @@ -177,6 +177,7 @@ `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0', `mailbox` varchar(255) BINARY NOT NULL, `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', + `valid` tinyint(1) NOT NULL DEFAULT '0', `data` longtext NOT NULL, CONSTRAINT `user_id_fk_cache_index` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE, @@ -201,12 +202,7 @@ `uid` int(11) UNSIGNED NOT NULL DEFAULT '0', `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `data` longtext NOT NULL, - `seen` tinyint(1) NOT NULL DEFAULT '0', - `deleted` tinyint(1) NOT NULL DEFAULT '0', - `answered` tinyint(1) NOT NULL DEFAULT '0', - `forwarded` tinyint(1) NOT NULL DEFAULT '0', - `flagged` tinyint(1) NOT NULL DEFAULT '0', - `mdnsent` tinyint(1) NOT NULL DEFAULT '0', + `flags` int(11) NOT NULL DEFAULT '0', CONSTRAINT `user_id_fk_cache_messages` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE, INDEX `changed_index` (`changed`), -- Gitblit v1.9.1