]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Added table locking and disabling keys for the UTF8 database upgrade.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 28 Oct 2009 19:05:11 +0000 (19:05 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 28 Oct 2009 19:05:11 +0000 (19:05 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@3594 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/schema/upgrades/2009100701.sql

index f84096a945009de7a11a8d1ea253277920888607..1ba083416d537bd93acfa61b141e37f13b585199 100644 (file)
@@ -1,19 +1,35 @@
 SET NAMES utf8;
 
+LOCK TABLES `prefix_metastrings` WRITE;
+/*!40000 ALTER TABLE `prefix_metastrings` DISABLE KEYS */;
 REPLACE INTO `prefix_metastrings` (id, string) 
        SELECT id, unhex(hex(convert(string using latin1))) 
        FROM `prefix_metastrings`;
+/*!40000 ALTER TABLE `prefix_metastrings` ENABLE KEYS */;
+UNLOCK TABLES;
 
+LOCK TABLES `prefix_groups_entity` WRITE;
+/*!40000 ALTER TABLE `prefix_groups_entity` DISABLE KEYS */;
 REPLACE INTO `prefix_groups_entity` (guid, name, description) 
        SELECT guid, unhex(hex(convert(name using latin1))), unhex(hex(convert(description using latin1)))
        FROM `prefix_groups_entity`;
+/*!40000 ALTER TABLE `prefix_groups_entity` ENABLE KEYS */;
+UNLOCK TABLES;
 
+LOCK TABLES `prefix_objects_entity` WRITE;
+/*!40000 ALTER TABLE `prefix_objects_entity` DISABLE KEYS */;  
 REPLACE INTO `prefix_objects_entity` (guid, title, description)
        SELECT guid, unhex(hex(convert(title using latin1))), unhex(hex(convert(description using latin1)))
        FROM `prefix_objects_entity`;
+/*!40000 ALTER TABLE `prefix_objects_entity` ENABLE KEYS */;
+UNLOCK TABLES;
 
+LOCK TABLES `prefix_users_entity` WRITE;
+/*!40000 ALTER TABLE `prefix_users_entity` DISABLE KEYS */;
 REPLACE INTO `prefix_users_entity` (guid, name, username, password, salt, email, language, code, 
        banned, last_action, prev_last_action, last_login, prev_last_login)
                SELECT guid, unhex(hex(convert(name using latin1))), username, password, salt, email, language, code,
                        banned, last_action, prev_last_action, last_login, prev_last_login
                FROM `prefix_users_entity`;
+/*!40000 ALTER TABLE `prefix_users_entity` ENABLE KEYS */;
+UNLOCK TABLES;