Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter raptorz

    (@raptorz)

    I fixed it.

    Replace the line 40-41:

    // SHOW INDEX emulation
    		if( 0 === strpos( $sql, 'SHOW INDEX'))

    to:

    if ( 0 == strpos( $sql, 'SHOW FULL COLUMNS')) {
    			$logto = 'SHOWCOLUMN';
    			$pattern = '/SHOW FULL COLUMNS.+ [<code>]?(\w+)[</code>]?$/';
    			preg_match($pattern, $sql, $matches);
    			$table = $matches[1];
    $sql = 'SELECT column_name as Field, data_type as Type, NULL as Collation, is_nullable as Null,
                \'\' as Key, \'\' as Default, \'\' as Extra, \'\' as Privileges, \'\' as Comment
                FROM information_schema.columns WHERE table_name =\''.$table.'\';';
            }
    		// SHOW INDEX emulation
    		elseif( 0 === strpos( $sql, 'SHOW INDEX'))

    Now database upgraded successful.

    Hi when i update to 4.2.1 i remplace that line but i have this error ! help me pls

    Warning: pg_query(): Query failed: ERROR: missing FROM-clause entry for table “session” LINE 1: SELECT @@SESSION.sql_mode ^ in /home/wgcv/www/php/wordpress/wp-content/pg4wp/driver_pgsql.php on line 136
    WordPress

    Database Update Required

    Warning: pg_query(): Query failed: ERROR: missing FROM-clause entry for table "session" LINE 1: SELECT @@SESSION.sql_mode ^ in /home/wgcv/www/php/wordpress/wp-content/pg4wp/driver_pgsql.php on line 136
    WordPress
    
    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/wgcv/www/php/wordpress/wp-admin/includes/upgrade.php on line 1459
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Upgrade to WP4.2.1 fail’ is closed to new replies.