From bb1d783466ca6de1c3e95cd523b838773f31c35f Mon Sep 17 00:00:00 2001 From: Piotr Przybylski Date: Wed, 25 Apr 2012 21:47:32 +0200 Subject: [PATCH] More concise descriptions for MySQL column types --- libraries/data_mysql.inc.php | 63 ++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/libraries/data_mysql.inc.php b/libraries/data_mysql.inc.php index bb7c6a7a03..bb5830b73a 100644 --- a/libraries/data_mysql.inc.php +++ b/libraries/data_mysql.inc.php @@ -295,38 +295,39 @@ if ($cfg['ShowFunctionFields']) { */ function PMA_supportedDataTypesDescriptions() { + // if possible, for easy translation these strings should be the same as for Drizzle return array( - 'TINYINT' => __('A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255.'), - 'SMALLINT' => __('A small integer. The signed range is -32,768 to 32,767. The unsigned range is 0 to 65,535.'), - 'MEDIUMINT' => __('A medium-sized integer. The signed range is -8,388,608 to 8,388,607. The unsigned range is 0 to 16,777,215.'), - 'INT' => __('A normal-size integer. The signed range is -2,147,483,648 to 2,147,483,647. The unsigned range is 0 to 4,294,967,295.'), - 'BIGINT' => __('A large integer. The signed range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. The unsigned range is 0 to 18,446,744,073,709,551,615.'), - 'DECIMAL' => __('A packed "exact" fixed-point number. The maximum number of digits (M) for DECIMAL is 65. The maximum number of supported decimals (D) is 30. If D is omitted, the default is 0. If M is omitted, the default is 10.'), - 'FLOAT' => __('A small (single-precision) floating-point number. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38.'), - 'DOUBLE' => __('A normal-size (double-precision) floating-point number. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308.'), - 'REAL' => __('Synonyms for DOUBLE. Exception: If the REAL_AS_FLOAT SQL mode is enabled, REAL is a synonym for FLOAT rather than DOUBLE.'), - 'BIT' => __('A bit-field type. M indicates the number of bits per value, from 1 to 64. The default is 1 if M is omitted.'), - 'BOOLEAN' => __('These types are synonyms for TINYINT(1). A value of zero is considered false. Nonzero values are considered true.'), - 'SERIAL' => __('An alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE.'), - 'DATE' => __("A date. The supported range is '1000-01-01' to '9999-12-31'. MySQL displays DATE values in 'YYYY-MM-DD' format, but allows assignment of values to DATE columns using either strings or numbers."), - 'DATETIME' => __("A date and time combination. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'. MySQL displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format, but allows assignment of values to DATETIME columns using either strings or numbers."), - 'TIMESTAMP' => __("A timestamp. The range is '1970-01-01 00:00:01' UTC to '2038-01-09 03:14:07' UTC. TIMESTAMP values are stored as the number of seconds since the epoch ('1970-01-01 00:00:00' UTC)."), - 'TIME' => __("A time. The range is '-838:59:59' to '838:59:59'. MySQL displays TIME values in 'HH:MM:SS' format, but allows assignment of values to TIME columns using either strings or numbers."), - 'YEAR' => __("A year in two-digit or four-digit format. The default is four-digit format. In four-digit format, the allowable values are 1901 to 2155, and 0000. In two-digit format, the allowable values are 70 to 69, representing years from 1970 to 2069."), - 'CHAR' => __('A fixed-length string that is always right-padded with spaces to the specified length when stored. M represents the column length in characters. The range of M is 0 to 255. If M is omitted, the length is 1.'), - 'VARCHAR' => __('A variable-length string. M represents the maximum column length in characters. The range of M is 0 to 65,535.'), - 'TINYTEXT' => __('A TEXT column with a maximum length of 255 (2^8 - 1) characters. Each TINYTEXT value is stored using a one-byte length prefix that indicates the number of bytes in the value.'), - 'TEXT' => __('A TEXT column with a maximum length of 65,535 (2^16 - 1) characters. Each TEXT value is stored using a two-byte length prefix that indicates the number of bytes in the value.'), - 'MEDIUMTEXT' => __('A TEXT column with a maximum length of 16,777,215 (2^24 - 1) characters. Each MEDIUMTEXT value is stored using a three-byte length prefix that indicates the number of bytes in the value.'), - 'LONGTEXT' => __('A TEXT column with a maximum length of 4,294,967,295 or 4GB (2^32 - 1) characters. Each LONGTEXT value is stored using a four-byte length prefix that indicates the number of bytes in the value.'), - 'BINARY' => __('The BINARY type is similar to the CHAR type, but stores binary byte strings rather than non-binary character strings. M represents the column length in bytes.'), - 'VARBINARY' => __('The VARBINARY type is similar to the VARCHAR type, but stores binary byte strings rather than non-binary character strings. M represents the maximum column length in bytes.'), - 'TINYBLOB' => __('A BLOB column with a maximum length of 255 (2^8 - 1) bytes. Each TINYBLOB value is stored using a one-byte length prefix that indicates the number of bytes in the value.'), - 'MEDIUMBLOB' => __('A BLOB column with a maximum length of 16,777,215 (2^24 - 1) bytes. Each MEDIUMBLOB value is stored using a three-byte length prefix that indicates the number of bytes in the value.'), - 'BLOB' => __('A BLOB column with a maximum length of 65,535 (2^16 - 1) bytes. Each BLOB value is stored using a two-byte length prefix that indicates the number of bytes in the value.'), - 'LONGBLOB' => __('A BLOB column with a maximum length of 4,294,967,295 or 4GB (2^32 - 1) bytes. Each LONGBLOB value is stored using a four-byte length prefix that indicates the number of bytes in the value.'), - 'ENUM' => __("An enumeration. A string object that can have only one value, chosen from the list of values 'value1', 'value2', ..., NULL or the special '' error value. An ENUM column can have a maximum of 65,535 distinct values."), - 'SET' => __("A set. A string object that can have zero or more values, each of which must be chosen from the list of values 'value1', 'value2', ... A SET column can have a maximum of 64 members."), + 'TINYINT' => __('A 1-byte integer, signed range is -128 to 127, unsigned range is 0 to 255'), + 'SMALLINT' => __('A 2-byte integer, signed range is -32,768 to 32,767, unsigned range is 0 to 65,535'), + 'MEDIUMINT' => __('A 3-byte integer, signed range is -8,388,608 to 8,388,607, unsigned range is 0 to 16,777,215'), + 'INT' => __('A 4-byte integer, signed range is -2,147,483,648 to 2,147,483,647, unsigned range is 0 to 4,294,967,295.'), + 'BIGINT' => __('An 8-byte integer, signed range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807, unsigned range is 0 to 18,446,744,073,709,551,615'), + 'DECIMAL' => __('A fixed-point number (M, D) - the maximum number of digits (M) is 65 (default 10), the maximum number of decimals (D) is 30 (default 0)'), + 'FLOAT' => __('A small floating-point number, allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38'), + 'DOUBLE' => __('A double-precision floating-point number, allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308'), + 'REAL' => __('Synonym for DOUBLE (exception: in REAL_AS_FLOAT SQL mode it is a synonym for FLOAT)'), + 'BIT' => __('A bit-field type (M), storing M of bits per value (default is 1, maximum is 64)'), + 'BOOLEAN' => __('A synonym for TINYINT(1), a value of zero is considered false, nonzero values are considered true'), + 'SERIAL' => __('An alias for BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE'), + 'DATE' => __("A date, supported range is '1000-01-01' to '9999-12-31'"), + 'DATETIME' => __("A date and time combination, supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'"), + 'TIMESTAMP' => __("A timestamp, range is '1970-01-01 00:00:01' UTC to '2038-01-09 03:14:07' UTC, stored as the number of seconds since the epoch ('1970-01-01 00:00:00' UTC)"), + 'TIME' => __("A time, range is '-838:59:59' to '838:59:59'"), + 'YEAR' => __("A year in four-digit (4, default) or two-digit (2) format, the allowable values are 70 (1970) to 69 (2069) or 1901 to 2155 and 0000"), + 'CHAR' => __('A fixed-length (0-255, default 1) string that is always right-padded with spaces to the specified length when stored'), + 'VARCHAR' => __('A variable-length (0-65,535) string, the effective maximum length is subject to the maximum row size (65,535 bytes)'), + 'TINYTEXT' => __('A TEXT column with a maximum length of 255 (2^8 - 1) characters, stored with a one-byte prefix indicating the length of the value in bytes'), + 'TEXT' => __('A TEXT column with a maximum length of 65,535 (2^16 - 1) characters, stored with a two-byte prefix indicating the length of the value in bytes'), + 'MEDIUMTEXT' => __('A TEXT column with a maximum length of 16,777,215 (2^24 - 1) characters, stored with a three-byte prefix indicating the length of the value in bytes'), + 'LONGTEXT' => __('A TEXT column with a maximum length of 4,294,967,295 or 4GB (2^32 - 1) characters, stored with a four-byte prefix indicating the length of the value in bytes'), + 'BINARY' => __('Similar to the CHAR type, but stores binary byte strings rather than non-binary character strings'), + 'VARBINARY' => __('Similar to the VARCHAR type, but stores binary byte strings rather than non-binary character strings'), + 'TINYBLOB' => __('A BLOB column with a maximum length of 255 (2^8 - 1) bytes, stored with a one-byte prefix indicating the length of the value'), + 'MEDIUMBLOB' => __('A BLOB column with a maximum length of 16,777,215 (2^24 - 1) bytes, stored with a three-byte prefix indicating the length of the value'), + 'BLOB' => __('A BLOB column with a maximum length of 65,535 (2^16 - 1) bytes, stored with a four-byte prefix indicating the length of the value'), + 'LONGBLOB' => __('A BLOB column with a maximum length of 4,294,967,295 or 4GB (2^32 - 1) bytes, stored with a two-byte prefix indicating the length of the value'), + 'ENUM' => __("An enumeration, chosen from the list of up to 65,535 values or the special '' error value"), + 'SET' => __("A single value chosen from a set of up to 64 members"), 'GEOMETRY' => '', 'POINT' => __('Constructs a WKB Point using its coordinates.'), 'LINESTRING' => __('Constructs a WKB LineString value from a number of WKB Point arguments. If any argument is not a WKB Point, the return value is NULL. If the number of Point arguments is less than two, the return value is NULL.'), -- 2.11.4.GIT