summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-10-02 11:31:35 +0000
committerDries Buytaert <dries@buytaert.net>2006-10-02 11:31:35 +0000
commit241cb08d830c94ee2160a09be93eb3ee2391a302 (patch)
treef53a85b5ba0d076d2ed610602d61c8c81479877d
parentd54ccd4f848351135cfff2bc210646255d803f8a (diff)
downloadbrdo-241cb08d830c94ee2160a09be93eb3ee2391a302.tar.gz
brdo-241cb08d830c94ee2160a09be93eb3ee2391a302.tar.bz2
- Patch #78732 by dopry: made it possible to use sha1 session ids
-rw-r--r--modules/system/system.install18
1 files changed, 16 insertions, 2 deletions
diff --git a/modules/system/system.install b/modules/system/system.install
index fc83907fa..4a6f988ae 100644
--- a/modules/system/system.install
+++ b/modules/system/system.install
@@ -391,7 +391,7 @@ function system_install() {
db_query("CREATE TABLE {sessions} (
uid int unsigned NOT NULL,
- sid varchar(32) NOT NULL default '',
+ sid varchar(64) NOT NULL default '',
hostname varchar(128) NOT NULL default '',
timestamp int NOT NULL default '0',
cache int NOT NULL default '0',
@@ -822,7 +822,7 @@ function system_install() {
db_query("CREATE TABLE {sessions} (
uid int_unsigned NOT NULL,
- sid varchar(32) NOT NULL default '',
+ sid varchar(64) NOT NULL default '',
hostname varchar(128) NOT NULL default '',
timestamp int NOT NULL default '0',
cache int NOT NULL default '0',
@@ -3323,6 +3323,20 @@ function system_update_1012() {
return $ret;
}
+function system_update_1013() {
+ $ret = array();
+ switch ($GLOBALS['db_type']) {
+ case 'mysql':
+ case 'mysqli':
+ $ret[] = update_sql('ALTER TABLE {sessions} CHANGE COLUMN sid sid varchar(64)');
+ break;
+ case 'pgsql':
+ $ret[] = update_sql('ALTER TABLE {sessions} ALTER COLUMN sid TYPE varchar(64)');
+ break;
+ }
+ return $ret;
+}
+
/**
* @} End of "defgroup updates-4.7-to-x.x"
* The next series of updates should start at 2000.