Index: trunk/phase3/includes/db/DatabaseOracle.php |
— | — | @@ -276,9 +276,9 @@ |
277 | 277 | |
278 | 278 | function doQuery($sql) { |
279 | 279 | wfDebug("SQL: [$sql]\n"); |
280 | | - if (!mb_check_encoding($sql)) { |
281 | | - throw new MWException("SQL encoding is invalid"); |
282 | | - } |
| 280 | +// if (!mb_check_encoding($sql)) { |
| 281 | +// throw new MWException("SQL encoding is invalid\n$sql"); |
| 282 | +// } |
283 | 283 | |
284 | 284 | //handle some oracle specifics |
285 | 285 | //remove AS column/table/subquery namings |
— | — | @@ -478,8 +478,8 @@ |
479 | 479 | throw new DBUnexpectedError($this, "Cannot create LOB descriptor: " . $e['message']); |
480 | 480 | } |
481 | 481 | |
482 | | - if (is_object($val)) { |
483 | | - $lob[$col]->writeTemporary($val->getData()); |
| 482 | + if ($col_type == 'BLOB') { //is_object($val)) { |
| 483 | + $lob[$col]->writeTemporary($val); //->getData()); |
484 | 484 | oci_bind_by_name($stmt, ":$col", $lob[$col], -1, SQLT_BLOB); |
485 | 485 | } else { |
486 | 486 | $lob[$col]->writeTemporary($val); |
— | — | @@ -952,13 +952,14 @@ |
953 | 953 | return str_replace("'", "''", $s); |
954 | 954 | } |
955 | 955 | |
| 956 | +/* |
956 | 957 | function encodeBlob($b) { |
957 | | - return new ORABlob($b); |
| 958 | + return $b; //new ORABlob($b); |
958 | 959 | } |
959 | 960 | function decodeBlob($b) { |
960 | 961 | return $b; //return $b->load(); |
961 | 962 | } |
962 | | - |
| 963 | +*/ |
963 | 964 | function addQuotes( $s ) { |
964 | 965 | global $wgLang; |
965 | 966 | if (isset($wgLang->mLoaded) && $wgLang->mLoaded) |