mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
BUG# 17044 Federated Storage Engine not UTF8 clean
- Added 'SET NAMES <charset>" upon ::open - Added test and results for simple UTF test federated.test: BUG #17044 Federated Storage Engine not UTF8 clean New test. Using hex - pasting various charsets in the terminal doesn't work. federated.result: BUG# 17044 Federated Storage Engine not UTF8 clean New test results ha_federated.cc: BUG# 17044 Federated Storage Engine not UTF8 clean Upon ::open, set names to table's charset sql/ha_federated.cc: BUG# 17044 Federated Storage Engine not UTF8 clean Upon ::open, set names to table's charset mysql-test/t/federated.test: BUG #17044 Federated Storage Engine not UTF8 clean New test. Using hex - pasting various charsets in the terminal doesn't work. federated.result: BUG# 17044 Federated Storage Engine not UTF8 clean New test results mysql-test/r/federated.result: BUG# 17044 Federated Storage Engine not UTF8 clean New test results
This commit is contained in:
parent
0e3c030558
commit
16a0bdd7da
3 changed files with 70 additions and 0 deletions
|
|
@ -1435,6 +1435,16 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked)
|
|||
|
||||
/* Connect to foreign database mysql_real_connect() */
|
||||
mysql= mysql_init(0);
|
||||
|
||||
/*
|
||||
BUG# 17044 Federated Storage Engine is not UTF8 clean
|
||||
Add set names to whatever charset the table is at open
|
||||
of table
|
||||
*/
|
||||
/* this sets the csname like 'set names utf8' */
|
||||
mysql_options(mysql,MYSQL_SET_CHARSET_NAME,
|
||||
this->table->s->table_charset->csname);
|
||||
|
||||
if (!mysql || !mysql_real_connect(mysql,
|
||||
share->hostname,
|
||||
share->username,
|
||||
|
|
@ -1451,6 +1461,7 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked)
|
|||
API silently reconnect. For future versions, we will need more logic to
|
||||
deal with transactions
|
||||
*/
|
||||
|
||||
mysql->reconnect= 1;
|
||||
|
||||
ref_length= (table->s->primary_key != MAX_KEY ?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue