diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-08-09 13:14:08 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-08-09 13:14:08 +0200 |
commit | f03a003bea0071617fe11d9313e117c33100c570 (patch) | |
tree | d13dccd4195ac594d39e29b87cb67e296bcbb99e /phpBB/phpbb/db/tools.php | |
parent | 7d44995f1659cf654bf8d05b5f6315de2eda7925 (diff) | |
download | forums-f03a003bea0071617fe11d9313e117c33100c570.tar forums-f03a003bea0071617fe11d9313e117c33100c570.tar.gz forums-f03a003bea0071617fe11d9313e117c33100c570.tar.bz2 forums-f03a003bea0071617fe11d9313e117c33100c570.tar.xz forums-f03a003bea0071617fe11d9313e117c33100c570.zip |
[ticket/12710] Do not try to match the uniqueness in the query
PHPBB3-12710
Diffstat (limited to 'phpBB/phpbb/db/tools.php')
-rw-r--r-- | phpBB/phpbb/db/tools.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/phpBB/phpbb/db/tools.php b/phpBB/phpbb/db/tools.php index 434568d01a..556b162061 100644 --- a/phpBB/phpbb/db/tools.php +++ b/phpBB/phpbb/db/tools.php @@ -2661,19 +2661,21 @@ class tools break; case 'oracle': - $sql = "SELECT ix.index_name AS phpbb_index_name + $sql = "SELECT ix.index_name AS phpbb_index_name, ix.uniqueness AS is_unique FROM all_ind_columns ixc, all_indexes ix WHERE ix.index_name = ixc.index_name AND ixc.table_name = '" . strtoupper($table_name) . "' - AND ixc.column_name = '" . strtoupper($column_name) . "' - AND ix.uniqueness = " . ($unique) ? "'UNIQUE'" : "'NONUNIQUE'"; + AND ixc.column_name = '" . strtoupper($column_name) . "'"; break; } $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) { - $existing_indexes[$row['phpbb_index_name']] = array(); + if (!isset($row['is_unique']) || ($unique && $row['is_unique'] == 'UNIQUE') || (!$unique && $row['is_unique'] == 'NONUNIQUE')) + { + $existing_indexes[$row['phpbb_index_name']] = array(); + } } $this->db->sql_freeresult($result); |