In wpdb::get_col_length(), breaks are not necessary when a case returns

See #33491.

Built from https://develop.svn.wordpress.org/trunk@33701


git-svn-id: http://core.svn.wordpress.org/trunk@33668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-08-21 18:41:25 +00:00
parent 3982598305
commit 029c274b86
2 changed files with 7 additions and 7 deletions

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.4-alpha-33700'; $wp_version = '4.4-alpha-33701';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -2482,42 +2482,42 @@ class wpdb {
'type' => 'char', 'type' => 'char',
'length' => (int) $length, 'length' => (int) $length,
); );
break;
case 'binary': case 'binary':
case 'varbinary': case 'varbinary':
return array( return array(
'type' => 'byte', 'type' => 'byte',
'length' => (int) $length, 'length' => (int) $length,
); );
break;
case 'tinyblob': case 'tinyblob':
case 'tinytext': case 'tinytext':
return array( return array(
'type' => 'byte', 'type' => 'byte',
'length' => 255, // 2^8 - 1 'length' => 255, // 2^8 - 1
); );
break;
case 'blob': case 'blob':
case 'text': case 'text':
return array( return array(
'type' => 'byte', 'type' => 'byte',
'length' => 65535, // 2^16 - 1 'length' => 65535, // 2^16 - 1
); );
break;
case 'mediumblob': case 'mediumblob':
case 'mediumtext': case 'mediumtext':
return array( return array(
'type' => 'byte', 'type' => 'byte',
'length' => 16777215, // 2^24 - 1 'length' => 16777215, // 2^24 - 1
); );
break;
case 'longblob': case 'longblob':
case 'longtext': case 'longtext':
return array( return array(
'type' => 'byte', 'type' => 'byte',
'length' => 4294967295, // 2^32 - 1 'length' => 4294967295, // 2^32 - 1
); );
break;
default: default:
return false; return false;
} }