Added a handler for "SET NAMES ... COLLATE ..."

git-svn-id: https://plugins.svn.wordpress.org/postgresql-for-wordpress/trunk@429260 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
hawk__
2011-08-26 21:57:44 +00:00
parent 0b771d4fbe
commit 2ed7e56337

View File

@ -292,6 +292,12 @@
$logto = 'OPTIMIZE';
$sql = str_replace( 'OPTIMIZE TABLE', 'VACUUM', $sql);
}
// Handle 'SET NAMES ... COLLATE ...'
elseif( false !== strpos($sql, 'COLLATE'))
{
$logto = 'SETNAMES';
$sql = "SET NAMES 'utf8'";
}
// Load up upgrade and install functions as required
elseif( 0 === strpos( $sql, 'CREATE') || (defined('WP_INSTALLING') && WP_INSTALLING))
{