Allow work on temporary tables (bug #864984).
This commit is contained in:
@@ -35,6 +35,8 @@ $Source$
|
||||
* libraries/zip.lib.php: Drop unneed part of header which causes troubles
|
||||
to some programs (bug #1037737).
|
||||
* index.php: Add frame spacing (RFE #1036013).
|
||||
* libraries/db_table_exists.lib.php: Allow work on temporary tables (bug
|
||||
#864984).
|
||||
|
||||
2004-10-17 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* lang/turkish update, thanks to boralioglu.
|
||||
|
@@ -25,10 +25,22 @@ if (!isset($is_table) || !$is_table) {
|
||||
}
|
||||
if (empty($table)
|
||||
|| !($is_table && @PMA_DBI_num_rows($is_table))) {
|
||||
$redirect = TRUE;
|
||||
if (!isset($is_transformation_wrapper)) {
|
||||
$redirect = TRUE;
|
||||
if (!empty($table)) {
|
||||
PMA_DBI_free_result($is_table);
|
||||
// SHOW TABLES doesn't show temporary tables, so try select (as it can happen just in case temporary table, it should be fast):
|
||||
$is_table2 = PMA_DBI_try_query('SELECT COUNT(*) FROM `' . PMA_sqlAddslashes($table, TRUE) . '`;', NULL, PMA_DBI_QUERY_STORE);
|
||||
$redirect = !($is_table2 && @PMA_DBI_num_rows($is_table2));
|
||||
PMA_DBI_free_result($is_table2);
|
||||
}
|
||||
|
||||
if ($redirect) {
|
||||
PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . 'db_details.php?' . PMA_generate_common_url($db, '', '&') . (isset($message) ? '&message=' . urlencode($message) : '') . '&reload=1');
|
||||
}
|
||||
exit;
|
||||
}
|
||||
if ($redirect) exit;
|
||||
} else if (isset($is_table)) {
|
||||
PMA_DBI_free_result($is_table);
|
||||
}
|
||||
|
Reference in New Issue
Block a user