=== Other changes in 1.33 ===
* (T201747) Html::openElement() warns if given an element name with a space
in it.
+* The implementation of buildStringCast() in Wikimedia\Rdbms\Database has
+ changed to explicitly cast. Subclasses relying on the base-class
+ implementation should check whether they need to override it now.
== Compatibility ==
MediaWiki 1.33 requires PHP 7.0.13 or later. Although HHVM 3.18.5 or later is
}
public function buildStringCast( $field ) {
- return $field;
+ // In theory this should work for any standards-compliant
+ // SQL implementation, although it may not be the best way to do it.
+ return "CAST( $field AS CHARACTER )";
}
public function buildIntegerCast( $field ) {
return $old;
}
+
+ public function buildStringCast( $field ) {
+ return "CAST( $field AS NVARCHAR )";
+ }
+
}
/**
!preg_match( '/^SELECT\s+(GET|RELEASE|IS_FREE)_LOCK\(/', $sql );
}
+ public function buildStringCast( $field ) {
+ return "CAST( $field AS BINARY )";
+ }
+
/**
* @param string $field Field or column to cast
* @return string