From 3d142e144879e4bb6ea69b4eca81668df5f86768 Mon Sep 17 00:00:00 2001
From: win32 <none@none>
Date: Fri, 18 Dec 2009 12:09:53 +0200
Subject: sql updates for 3.2.2a

--HG--
branch : trunk
---
 sql/updates/6589_characters_characters.sql | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 sql/updates/6589_characters_characters.sql

(limited to 'sql/updates/6589_characters_characters.sql')

diff --git a/sql/updates/6589_characters_characters.sql b/sql/updates/6589_characters_characters.sql
new file mode 100644
index 00000000000..e43d7cc8271
--- /dev/null
+++ b/sql/updates/6589_characters_characters.sql
@@ -0,0 +1,15 @@
+UPDATE characters SET data = REPLACE(data,' ',' ');
+UPDATE characters SET data = CONCAT(TRIM(data),' ');
+ 
+UPDATE `characters` SET `data` = CONCAT(
+SUBSTRING_INDEX(`data`, ' ', 1167 + 1), ' ',
+'0 0 ',
+SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1246 + 1), ' ', -1246 + 1168 - 1), ' ',
+'0 0 0 ',
+SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1294 + 1), ' ', -1294 + 1247 - 1), ' ',
+'0 '
+)
+WHERE length(SUBSTRING_INDEX(data, ' ', 1294)) < length(data) and length(SUBSTRING_INDEX(data, ' ', 1294+1)) >= length(data);
+ 
+UPDATE characters SET data = REPLACE(data,' ',' ');
+UPDATE characters SET data = CONCAT(TRIM(data),' ');
\ No newline at end of file
-- 
cgit v1.2.3

