Page MenuHomePhabricator

fix-pgsql-lock-in-shared-mode.patch

Authored By
bzimport
Nov 22 2014, 1:08 AM
Size
952 B
Referenced Files
None
Subscribers
None

fix-pgsql-lock-in-shared-mode.patch

--- Database.php 2012-08-24 18:49:53.431527570 -0500
+++ _backup_Database.php 2012-08-24 18:50:25.721527516 -0500
@@ -1378,6 +1378,17 @@
}
$options = (array)$options;
+
+ if ($this->getType() == 'postgres' and
+ (in_array('LOCK IN SHARE MODE', $options, true) or
+ isset($options['LOCK IN SHARE MODE'])))
+ {
+ // just fail...
+ //throw new Exception('Cannot use LOCK IN SHARE MODE with Postgresql');
+ // or maybe just remove the option
+ unset($options['LOCK IN SHARE MODE']);
+ unset($options[array_search('LOCK IN SHARE MODE', $options, true)]);
+ }
if ( is_array( $table ) ) {
$useIndex = ( isset( $options['USE INDEX'] ) && is_array( $options['USE INDEX'] ) )

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
9613
Default Alt Text
fix-pgsql-lock-in-shared-mode.patch (952 B)

Event Timeline