Index: branches/REL1_17/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -936,8 +936,9 @@ |
937 | 937 | * Query whether a given table exists (in the given schema, or the default mw one if not given) |
938 | 938 | */ |
939 | 939 | function tableExists( $table ) { |
940 | | - $table = trim($this->tableName($table), '"'); |
941 | | - $SQL = "SELECT 1 FROM user_tables WHERE table_name='$table'"; |
| 940 | + $table = trim( $this->tableName($table), '"' ); |
| 941 | + $owner = strtoupper( $this->mDBname ); |
| 942 | + $SQL = "SELECT 1 FROM all_tables WHERE owner='$owner' AND table_name='$table'"; |
942 | 943 | $res = $this->doQuery( $SQL ); |
943 | 944 | if ( $res ) { |
944 | 945 | $count = $res->numRows(); |
— | — | @@ -945,7 +946,7 @@ |
946 | 947 | } else { |
947 | 948 | $count = 0; |
948 | 949 | } |
949 | | - return $count; |
| 950 | + return $count!=0; |
950 | 951 | } |
951 | 952 | |
952 | 953 | /** |