diff --git a/tbl_alter.php b/tbl_alter.php index db792a978..e33b9979b 100644 --- a/tbl_alter.php +++ b/tbl_alter.php @@ -186,18 +186,12 @@ if ($abort == FALSE) { // We also need this to correctly learn if a TIMESTAMP is NOT NULL, since // SHOW FULL FIELDS says NULL and SHOW CREATE TABLE says NOT NULL (tested - // in MySQL 4.0.25). I was able to find that SHOW CREATE TABLE existed - // at least in MySQL 3.23.51. + // in MySQL 4.0.25). - if (PMA_MYSQL_INT_VERSION >= 32351) { - $show_create_table_query = 'SHOW CREATE TABLE ' - . PMA_backquote($db) . '.' . PMA_backquote($table); - $show_create_table_res = PMA_DBI_query($show_create_table_query); - list(,$show_create_table) = PMA_DBI_fetch_row($show_create_table_res); - PMA_DBI_free_result($show_create_table_res); - unset($show_create_table_res, $show_create_table_query); - $analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table)); - } + $show_create_table = PMA_DBI_fetch_value( + 'SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table), + 0, 1 ); + $analyzed_sql = PMA_SQP_analyze( PMA_SQP_parse( $show_create_table ) ); require('./tbl_properties.inc.php'); } diff --git a/tbl_properties_structure.php b/tbl_properties_structure.php index 91debc0df..70267ec43 100644 --- a/tbl_properties_structure.php +++ b/tbl_properties_structure.php @@ -87,15 +87,12 @@ $fields_cnt = PMA_DBI_num_rows($fields_rs); // // We also need this to correctly learn if a TIMESTAMP is NOT NULL, since // SHOW FULL FIELDS says NULL and SHOW CREATE TABLE says NOT NULL (tested -// in MySQL 4.0.25). I was able to find that SHOW CREATE TABLE existed -// at least in MySQL 3.23.51. +// in MySQL 4.0.25). -if (PMA_MYSQL_INT_VERSION >= 32351) { - $show_create_table = PMA_DBI_fetch_value( +$show_create_table = PMA_DBI_fetch_value( 'SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table), 0, 1 ); - $analyzed_sql = PMA_SQP_analyze( PMA_SQP_parse( $show_create_table ) ); -} +$analyzed_sql = PMA_SQP_analyze( PMA_SQP_parse( $show_create_table ) ); /** * Displays the table structure ('show table' works correct since 3.23.03)