From fcaa0f48b10f88f94e411ab3d1280ba42ea81088 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 8 May 2014 07:13:25 +0200 Subject: [PATCH] Remove code related to older MySQL version (minimum supported is 5.5) Signed-off-by: Marc Delisle --- db_datadict.php | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/db_datadict.php b/db_datadict.php index fd42976f1a..bf63986a5f 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -121,21 +121,6 @@ foreach ($tables as $table) { */ $columns = $GLOBALS['dbi']->getColumns($db, $table); - if (PMA_MYSQL_INT_VERSION < 50025) { - // We need this to correctly learn if a TIMESTAMP is NOT NULL, since - // SHOW FULL COLUMNS or INFORMATION_SCHEMA incorrectly says NULL - // and SHOW CREATE TABLE says NOT NULL - // http://bugs.mysql.com/20910. - - $show_create_table_query = 'SHOW CREATE TABLE ' - . PMA_Util::backquote($db) . '.' - . PMA_Util::backquote($table); - $show_create_table = $GLOBALS['dbi']->fetchValue( - $show_create_table_query, 0, 1 - ); - $analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table)); - } - // Check if we can use Relations if (!empty($cfgRelation['relation'])) { // Find which tables are related with the current one and write it in @@ -207,23 +192,6 @@ foreach ($tables as $table) { } $column_name = $row['Field']; - $tmp_column = $analyzed_sql[0]['create_table_fields'][$column_name]; - if (PMA_MYSQL_INT_VERSION < 50025 - && ! empty($tmp_column['type']) - && $tmp_column['type'] == 'TIMESTAMP' - && $tmp_column['timestamp_not_null'] - ) { - // here, we have a TIMESTAMP that SHOW FULL COLUMNS reports as - // having the NULL attribute, but SHOW CREATE TABLE says the - // contrary. Believe the latter. - /** - * @todo merge this logic with the one in tbl_structure.php - * or move it in a function similar to $GLOBALS['dbi']->getColumnsFull() - * but based on SHOW CREATE TABLE because information_schema - * cannot be trusted in this case (MySQL bug) - */ - $row['Null'] = 'NO'; - } echo '';