In Drupal 7.21 i worked with this secondary database:
'target_name' =>
array (
'default' =>
array (
'database' => 'database_name',
'username' => 'postgres',
'password' => 'postgres',
'host' => 'localhost',
'port' => '',
'driver' => 'pgsql',
'prefix' => '',
),
),
wwith both target's and database's names set to 'comunità'.
<?php
db_set_active('comunità');
$result = db_query( "SELECT * FROM tab");
db_set_active();
?>
Since 7.22 every query that targets the secondary database failes and raises a PDOexception (schema/table doesn't exist).
Changing the target's name but leaving the database's name accented raises several:
Additional uncaught exception thrown while handling exception.
Original
PDOException: in eval() (line 8 of C:\Program Files\BitNami WAPPStack\apache2\htdocs\drupal\modules\php\php.module(80) : eval()'d code).
Additional
PDOException: in lock_may_be_available() (line 167 of C:\Program Files\BitNami WAPPStack\apache2\htdocs\drupal\includes\lock.inc).
Uncaught exception thrown in shutdown function.
PDOException: in db_delete() (line 2481 of C:\Program Files\BitNami WAPPStack\apache2\htdocs\drupal\includes\database\database.inc).
Uncaught exception thrown in session handler.
PDOException: in db_merge() (line 2445 of C:\Program Files\BitNami WAPPStack\apache2\htdocs\drupal\includes\database\database.inc).
I had to remove the accented letter from both target's and database's names
The problem itself wouln't be so bad if it was only about the database's name, I can just change it once.
This turns into a real issue when it affects even the string used inside db_set_active('') to target it, which means having to change every occurrence of said function... since i didn't think about setting a global variable and wrote 'comunità' directly in every calls.