mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-07-30 17:57:13 +02:00
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:
@ -292,6 +292,12 @@
|
|||||||
$logto = 'OPTIMIZE';
|
$logto = 'OPTIMIZE';
|
||||||
$sql = str_replace( 'OPTIMIZE TABLE', 'VACUUM', $sql);
|
$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
|
// Load up upgrade and install functions as required
|
||||||
elseif( 0 === strpos( $sql, 'CREATE') || (defined('WP_INSTALLING') && WP_INSTALLING))
|
elseif( 0 === strpos( $sql, 'CREATE') || (defined('WP_INSTALLING') && WP_INSTALLING))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user