Permalink
Browse files

mnet MDL-17863 increase length of portno field in the host table (so …

…443 works)
  • Loading branch information...
1 parent 6b97003 commit 5f3aa3c97a87991131e71c615ac0b5333c020ddf Penny Leach committed Feb 1, 2010
Showing with 11 additions and 2 deletions.
  1. +1 −1 lib/db/install.xml
  2. +9 −0 lib/db/upgrade.php
  3. +1 −1 version.php
View
2 lib/db/install.xml
@@ -1000,7 +1000,7 @@
<FIELD NAME="public_key" TYPE="text" LENGTH="medium" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="name" NEXT="public_key_expires"/>
<FIELD NAME="public_key_expires" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="public_key" NEXT="transport"/>
<FIELD NAME="transport" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="public_key_expires" NEXT="portno"/>
- <FIELD NAME="portno" TYPE="int" LENGTH="2" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="transport" NEXT="last_connect_time"/>
+ <FIELD NAME="portno" TYPE="int" LENGTH="5" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="transport" NEXT="last_connect_time"/>
<FIELD NAME="last_connect_time" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="portno" NEXT="last_log_id"/>
<FIELD NAME="last_log_id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="last_connect_time" NEXT="force_theme"/>
<FIELD NAME="force_theme" TYPE="int" LENGTH="1" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="last_log_id" NEXT="theme"/>
View
9 lib/db/upgrade.php
@@ -3319,6 +3319,15 @@ function xmldb_main_upgrade($oldversion=0) {
upgrade_main_savepoint($result, 2007101571.02);
}
+ /// MDL-17863. Increase the portno column length on mnet_host to handle any port number
+ if ($result && $oldversion < 2007101571.03) {
+ $table = new XMLDBTable('mnet_host');
+ $field = new XMLDBField('portno');
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '5', true, true, null, false, false, 0);
+ $result = change_field_precision($table, $field);
+ upgrade_main_savepoint($result, 2007101571.03);
+ }
+
return $result;
}
View
2 version.php
@@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2007101571.02; // YYYYMMDD = date of the 1.9 branch (don't change)
+ $version = 2007101571.03; // YYYYMMDD = date of the 1.9 branch (don't change)
// X = release number 1.9.[0,1,2,3,4,5...]
// Y.YY = micro-increments between releases

0 comments on commit 5f3aa3c

Please sign in to comment.