bug 1001159

This commit is contained in:
Marc Delisle
2004-08-01 16:45:02 +00:00
parent 1b6ec6b55e
commit b1fe7b3a21
3 changed files with 10 additions and 4 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-08-01 Marc Delisle <lem9@users.sourceforge.net>
* tbl_change.php, libraries/relation.lib.php: bug 1001159, Commands
out of sync on Insert
2004-07-31 Alexander M. Turek <me@derrabus.de>
* tbl_change.php, tbl_replace.php, libraries/relation.lib.php: Small
optimizations, freed some results (thanks to Marc for the one in

View File

@@ -6,7 +6,6 @@ error_reporting(E_ALL);
* Set of functions used with the relation and pdf feature
*/
/**
* Executes a query as controluser if possible, otherwise as normal user
*
@@ -293,6 +292,8 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both') {
$foreign[$field]['foreign_field'] = $relrow['foreign_field'];
$i++;
} // end while
PMA_DBI_free_result($relations);
unset($relations);
}
if (($source == 'both' || $source == 'innodb') && !empty($table)) {
@@ -300,7 +301,8 @@ function PMA_getForeigners($db, $table, $column = '', $source = 'both') {
. 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);
$analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
foreach ($analyzed_sql[0]['foreign_keys'] AS $one_key) {

View File

@@ -90,7 +90,7 @@ if (isset($primary_key)) {
$result = array();
foreach ($primary_key_array AS $rowcount => $primary_key) {
$local_query = 'SELECT * FROM ' . PMA_backquote($table) . ' WHERE ' . $primary_key . ';';
$result[$rowcount] = PMA_DBI_query($local_query);
$result[$rowcount] = PMA_DBI_query($local_query, NULL, PMA_DBI_QUERY_STORE);
$row[$rowcount] = PMA_DBI_fetch_assoc($result[$rowcount]);
PMA_DBI_free_result($result[$rowcount]);
$primary_keys[$rowcount] = $primary_key;
@@ -121,7 +121,7 @@ if (isset($primary_key)) {
} // end if (no record returned)
}
} else {
$result = PMA_DBI_query('SELECT * FROM ' . PMA_backquote($table) . ' LIMIT 1;');
$result = PMA_DBI_query('SELECT * FROM ' . PMA_backquote($table) . ' LIMIT 1;', NULL, PMA_DBI_QUERY_STORE);
unset($row);
}