From: garvinhicking Date: Thu, 1 Jun 2006 12:30:26 +0000 (+0000) Subject: try to fix non-unique exits key problem X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=be9f18adb9bd03dd48617066a0e2619226af2f3c;p=s9y.git try to fix non-unique exits key problem --- diff --git a/docs/NEWS b/docs/NEWS index bf52a6e..8286cad 100644 --- 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() ------------------------------------------------------------------------ diff --git a/serendipity_config.inc.php b/serendipity_config.inc.php index a84352e..ca70fb3 100644 --- a/serendipity_config.inc.php +++ b/serendipity_config.inc.php @@ -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'; diff --git a/sql/db.sql b/sql/db.sql index 169ae0b..c9c0cf2 100644 --- a/sql/db.sql +++ b/sql/db.sql @@ -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 index 0000000..a370094 --- /dev/null +++ b/sql/db_update_1.1-alpha5_1.1-alpha6_mysql.sql @@ -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 index 0000000..3483633 --- /dev/null +++ b/sql/db_update_1.1-alpha5_1.1-alpha6_postgres.sql @@ -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 index 0000000..e69de29