bug 1228862, creating a table under MySQL 5.x with wrong table type

This commit is contained in:
Marc Delisle
2005-06-29 11:17:17 +00:00
parent fac9071975
commit c486b807f5
2 changed files with 36 additions and 25 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-06-29 Marc Delisle <lem9@users.sourceforge.net>
* tbl_properties_table_info.php: bug #1228862, creating a table under
MySQL 5.x with wrong table type
2005-06-28 Marc Delisle <lem9@users.sourceforge.net>
* tbl_properties_operations.php: bug #1225635,
cannot change table's collation under MySQL 5.0.4

View File

@@ -28,6 +28,12 @@ PMA_DBI_select_db($db);
// The 'show table' statement works correct since 3.23.03
$table_info_result = PMA_DBI_query('SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\';');
// need this test because when we are creating a table, we get 0 rows
// from the SHOW TABLE query
// and we don't want to mess up the $tbl_type coming from the form
if ($table_info_result && PMA_DBI_num_rows($table_info_result) > 0) {
$showtable = PMA_DBI_fetch_assoc($table_info_result);
if (!isset($showtable['Type']) && isset($showtable['Engine'])) {
$showtable['Type'] =& $showtable['Engine'];
@@ -55,4 +61,5 @@ for ($i = 0; $i < $tmp_cnt; $i++) {
} // end for
PMA_DBI_free_result($table_info_result);
unset($tmp1, $tmp, $table_info_result);
} // end if
?>