]> git.mjollnir.org Git - s9y.git/commitdiff
try to fix non-unique exits key problem
authorgarvinhicking <garvinhicking>
Thu, 1 Jun 2006 12:30:26 +0000 (12:30 +0000)
committergarvinhicking <garvinhicking>
Thu, 1 Jun 2006 12:30:26 +0000 (12:30 +0000)
docs/NEWS
serendipity_config.inc.php
sql/db.sql
sql/db_update_1.1-alpha5_1.1-alpha6_mysql.sql [new file with mode: 0644]
sql/db_update_1.1-alpha5_1.1-alpha6_postgres.sql [new file with mode: 0644]
sql/db_update_1.1-alpha5_1.1-alpha6_sqlite.sql [new file with mode: 0644]

index bf52a6e2af25442cd8f2cfe1dbf3df8e31555471..8286cade59351700a946ddb992c17336bf7e4961 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -1,5 +1,11 @@
 # $Id$
 
+Version 1.1-alpha6()
+------------------------------------------------------------------------
+
+    * Fix bug #1494653: Non-Unique index constraint for 'exits' table.
+      Thanks to Markus Brueckner! (garvinhicking)
+      
 Version 1.1-alpha5()
 ------------------------------------------------------------------------
 
index a84352e28f9c838dff097e7e0af4bb7bdd756be9..ca70fb3ba79925edd2af226f0309063780423302 100644 (file)
@@ -27,7 +27,7 @@ if (IS_installed === true && !defined('IN_serendipity')) {
 include(S9Y_INCLUDE_PATH . 'include/compat.inc.php');
 
 // The version string
-$serendipity['version']         = '1.1-alpha5';
+$serendipity['version']         = '1.1-alpha6';
 
 // Name of folder for the default theme
 $serendipity['defaultTemplate'] = 'carl_contest';
index 169ae0b23a5c5ed09200e6a189e4974b648b620e..c9c0cf289f83863bae1a6b6e3375c953f4769ae0 100644 (file)
@@ -140,10 +140,10 @@ CREATE TABLE {PREFIX}exits (
   port varchar(5),
   path varchar(255),
   query varchar(255),
-  PRIMARY KEY  (host,day,entry_id)
+  PRIMARY KEY  (host(64),path(64),day,entry_id)
 ) {UTF_8};
 
-CREATE INDEX exits_idx ON {PREFIX}exits (entry_id,day);
+CREATE INDEX exits_idx ON {PREFIX}exits (entry_id,day,host);
 
 #
 # Table structure for table '{PREFIX}referrers'
diff --git a/sql/db_update_1.1-alpha5_1.1-alpha6_mysql.sql b/sql/db_update_1.1-alpha5_1.1-alpha6_mysql.sql
new file mode 100644 (file)
index 0000000..a370094
--- /dev/null
@@ -0,0 +1,2 @@
+@ALTER TABLE {PREFIX}exits DROP PRIMARY KEY;
+@ALTER TABLE {PREFIX}exits ADD PRIMARY KEY (entry_id, day , host(64), path(64));
diff --git a/sql/db_update_1.1-alpha5_1.1-alpha6_postgres.sql b/sql/db_update_1.1-alpha5_1.1-alpha6_postgres.sql
new file mode 100644 (file)
index 0000000..3483633
--- /dev/null
@@ -0,0 +1,3 @@
+@ALTER TABLE {PREFIX}exits DROP PRIMARY KEY;
+@ALTER TABLE {PREFIX}exits DROP CONSTRAINT "{prefix}exits_pkey";
+@ALTER TABLE {PREFIX}exits ADD PRIMARY KEY (entry_id, day, host(64), path(64));
diff --git a/sql/db_update_1.1-alpha5_1.1-alpha6_sqlite.sql b/sql/db_update_1.1-alpha5_1.1-alpha6_sqlite.sql
new file mode 100644 (file)
index 0000000..e69de29