2 require_once(dirname(__FILE__
) . DIRECTORY_SEPARATOR
. 'mysql_pdo_test.inc');
4 /* Connect to mysql to determine the current charset so we can diffinate it */
5 $link = MySQLPDOTest
::factory();
6 $charset = $link->query("SHOW VARIABLES LIKE 'character_set_connection'")->fetchObject()->value
;
8 /* Make sure that we don't attempt to set the current character set to make this case useful */
9 $new_charset = ($charset == 'latin1' ?
'ascii' : 'latin1');
11 /* Done with the original connection, create a second link to test the character set being defined */
14 $link = MySQLPDOTest
::factory('PDO', false, null, Array('charset' => $new_charset));
15 $conn_charset = $link->query("SHOW VARIABLES LIKE 'character_set_connection'")->fetchObject()->value
;
17 if ($charset !== $conn_charset) {