Merge "Do thumb attempt-failures limitting via sha1 instead of name."
[lhc/web/wiklou.git] / includes / db / DatabaseMysql.php
index 1821e20..dc4a67d 100644 (file)
@@ -29,8 +29,8 @@
  */
 class DatabaseMysql extends DatabaseMysqlBase {
        /**
-        * @param $sql string
-        * @return resource
+        * @param string $sql
+        * @return resource False on error
         */
        protected function doQuery( $sql ) {
                if ( $this->bufferResults() ) {
@@ -42,11 +42,19 @@ class DatabaseMysql extends DatabaseMysqlBase {
                return $ret;
        }
 
+       /**
+        * @param string $realServer
+        * @return bool|resource MySQL Database connection or false on failure to connect
+        * @throws DBConnectionError
+        */
        protected function mysqlConnect( $realServer ) {
                # Fail now
                # Otherwise we get a suppressed fatal error, which is very hard to track down
                if ( !extension_loaded( 'mysql' ) ) {
-                       throw new DBConnectionError( $this, "MySQL functions missing, have you compiled PHP with the --with-mysql option?\n" );
+                       throw new DBConnectionError(
+                               $this,
+                               "MySQL functions missing, have you compiled PHP with the --with-mysql option?\n"
+                       );
                }
 
                $connFlags = 0;
@@ -81,6 +89,7 @@ class DatabaseMysql extends DatabaseMysqlBase {
        }
 
        /**
+        * @param string $charset
         * @return bool
         */
        protected function mysqlSetCharset( $charset ) {
@@ -124,7 +133,7 @@ class DatabaseMysql extends DatabaseMysqlBase {
        }
 
        /**
-        * @param $db
+        * @param string $db
         * @return bool
         */
        function selectDB( $db ) {
@@ -168,6 +177,10 @@ class DatabaseMysql extends DatabaseMysqlBase {
                return mysql_field_name( $res, $n );
        }
 
+       protected function mysqlFieldType( $res, $n ) {
+               return mysql_field_type( $res, $n );
+       }
+
        protected function mysqlDataSeek( $res, $row ) {
                return mysql_data_seek( $res, $row );
        }