previous fix was incompatible with mysql extension

This commit is contained in:
Marc Delisle
2007-07-05 12:26:42 +00:00
parent 19476e5639
commit 7cc52459f6

View File

@@ -1939,8 +1939,14 @@ function PMA_getUniqueCondition($handle, $fields_cnt, $fields_meta, $row, $force
}
}
// do not use a table alias in a condition
if ($meta->table != $meta->orgtable) {
// Do not use a table alias in a condition.
// Test case is:
// select * from galerie x WHERE
//(select count(*) from galerie y where y.datum=x.datum)>1
//
// But orgtable is present only with mysqli extension so the
// fix is only for mysqli.
if (isset($meta->orgtable) && $meta->table != $meta->orgtable) {
$meta->table = $meta->orgtable;
}