Commit f7657f47 authored by istruewing@chilla.local's avatar istruewing@chilla.local

Merge chilla.local:/home/mydev/mysql-5.0-axmrg

into  chilla.local:/home/mydev/mysql-5.1-axmrg
parents cc4e2a85 763fdea4
......@@ -1815,6 +1815,34 @@ engine = federated
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/test';
drop table federated.test1, federated.test2;
drop table federated.test;
set names utf8;
create table federated.t1 (a varchar(64)) DEFAULT CHARSET=utf8;
insert into federated.t1 values (0x6DC3A56E6164);
select hex(a) from federated.t1;
hex(a)
6DC3A56E6164
create table federated.t1 (a varchar(64))
ENGINE=FEDERATED
connection='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'
DEFAULT CHARSET=utf8;
set names utf8;
select hex(a) from federated.t1;
hex(a)
6DC3A56E6164
insert into federated.t1 values (0xC3A4C3B6C3BCC39F);
insert into federated.t1 values (0xD18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E);
select hex(a) from federated.t1;
hex(a)
6DC3A56E6164
C3A4C3B6C3BCC39F
D18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E
select hex(a) from federated.t1;
hex(a)
6DC3A56E6164
C3A4C3B6C3BCC39F
D18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E
drop table federated.t1;
drop table federated.t1;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
DROP TABLE IF EXISTS federated.t1;
......
......@@ -1598,4 +1598,36 @@ drop table federated.test1, federated.test2;
connection slave;
drop table federated.test;
#
# BUG# 17044 Federated Storage Engine not UTF8 clean
#
connection slave;
set names utf8;
create table federated.t1 (a varchar(64)) DEFAULT CHARSET=utf8;
insert into federated.t1 values (0x6DC3A56E6164);
select hex(a) from federated.t1;
connection master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
eval create table federated.t1 (a varchar(64))
ENGINE=FEDERATED
connection='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'
DEFAULT CHARSET=utf8;
set names utf8;
select hex(a) from federated.t1;
insert into federated.t1 values (0xC3A4C3B6C3BCC39F);
insert into federated.t1 values (0xD18DD184D184D0B5D0BAD182D0B8D0B2D0BDD183D18E);
select hex(a) from federated.t1;
connection slave;
select hex(a) from federated.t1;
connection master;
drop table federated.t1;
connection slave;
drop table federated.t1;
source include/federated_cleanup.inc;
......@@ -1450,6 +1450,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,
......@@ -1466,6 +1476,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 ?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment