Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
f7657f47
Commit
f7657f47
authored
Dec 01, 2006
by
istruewing@chilla.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge chilla.local:/home/mydev/mysql-5.0-axmrg
into chilla.local:/home/mydev/mysql-5.1-axmrg
parents
cc4e2a85
763fdea4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
0 deletions
+71
-0
mysql-test/r/federated.result
mysql-test/r/federated.result
+28
-0
mysql-test/t/federated.test
mysql-test/t/federated.test
+32
-0
storage/federated/ha_federated.cc
storage/federated/ha_federated.cc
+11
-0
No files found.
mysql-test/r/federated.result
View file @
f7657f47
...
...
@@ -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;
...
...
mysql-test/t/federated.test
View file @
f7657f47
...
...
@@ -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
;
storage/federated/ha_federated.cc
View file @
f7657f47
...
...
@@ -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
?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment