Merge branch 'QA_3_5'

This commit is contained in:
Piotr Przybylski 2012-02-17 19:27:43 +01:00
commit d9ffb35663
2 changed files with 13 additions and 23 deletions

View File

@ -1,10 +1,12 @@
<?php
/**
* Column types and functions supported by MySQL
* Column types and functions supported by Drizzle
*
* @package PhpMyAdmin
*/
$auto_column_types = empty($cfg['ColumnTypes']);
// VARCHAR, TINYINT, TEXT and DATE are listed first, based on estimated popularity
$cfg['ColumnTypes'] = !empty($cfg['ColumnTypes']) ? $cfg['ColumnTypes'] : array(
// most used
@ -39,12 +41,20 @@ $cfg['ColumnTypes'] = !empty($cfg['ColumnTypes']) ? $cfg['ColumnTypes'] : array(
'STRING' => array(
'VARCHAR',
'TEXT',
'-',
'VARBINARY',
'BLOB',
'-',
'ENUM',
),
);
if ($auto_column_types && PMA_MYSQL_INT_VERSION >= 20120130) {
$cfg['ColumnTypes']['STRING'][] = '-';
$cfg['ColumnTypes']['STRING'][] = 'IPV6';
}
unset($auto_column_types);
$cfg['AttributeTypes'] = !empty($cfg['AttributeTypes']) ? $cfg['AttributeTypes'] : array(
'',
'on update CURRENT_TIMESTAMP',
@ -89,6 +99,7 @@ if ($cfg['ShowFunctionFields']) {
'QUOTE',
'REVERSE',
'RTRIM',
'SCHEMA',
'SPACE',
'TRIM',
'UNCOMPRESS',
@ -169,27 +180,6 @@ if ($cfg['ShowFunctionFields']) {
'WEEKOFYEAR',
'YEARWEEK',
),
'FUNC_SPATIAL' => array(
'GeomFromText',
'GeomFromWKB',
'GeomCollFromText',
'LineFromText',
'MLineFromText',
'PointFromText',
'MPointFromText',
'PolyFromText',
'MPolyFromText',
'GeomCollFromWKB',
'LineFromWKB',
'MLineFromWKB',
'PointFromWKB',
'MPointFromWKB',
'PolyFromWKB',
'MPolyFromWKB',
),
);
$cfg_default_restrict_funcs = empty($cfg['RestrictFunctions']);
if ($cfg_default_restrict_funcs) {

View File

@ -1847,7 +1847,7 @@ function PMA_DBI_formatError($error_number, $error_message)
function PMA_is_system_schema($schema_name, $test_for_mysql_schema = false)
{
return strtolower($schema_name) == 'information_schema'
|| strtolower($schema_name) == 'performance_schema'
|| (!PMA_DRIZZLE && strtolower($schema_name) == 'performance_schema')
|| (PMA_DRIZZLE && strtolower($schema_name) == 'data_dictionary')
|| ($test_for_mysql_schema && !PMA_DRIZZLE && $schema_name == 'mysql');
}