bug #2090002 [display] Cannot edit row in VIEW

This commit is contained in:
Marc Delisle
2008-09-08 16:43:36 +00:00
parent 0d975d64f7
commit 09a4be3b74
2 changed files with 6 additions and 1 deletions

View File

@@ -1935,7 +1935,11 @@ function PMA_getUniqueCondition($handle, $fields_cnt, $fields_meta, $row, $force
//
// But orgtable is present only with mysqli extension so the
// fix is only for mysqli.
if (isset($meta->orgtable) && $meta->table != $meta->orgtable) {
// Also, do not use the original table name if we are dealing with
// a view because this view might be updatable.
// (The isView() verification should not be costly in most cases
// because there is some caching in the function).
if (isset($meta->orgtable) && $meta->table != $meta->orgtable && ! PMA_Table::isView($GLOBALS['db'], $meta->table)) {
$meta->table = $meta->orgtable;
}