Commit 215ecd33 authored by eric@mysql.com's avatar eric@mysql.com

BUG#13724 conditionally added CONNECTION='connect string' for SHOW CREATE TABLE

parent bef189cc
...@@ -74,6 +74,12 @@ CREATE TABLE federated.t2 ( ...@@ -74,6 +74,12 @@ CREATE TABLE federated.t2 (
) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
SHOW CREATE TABLE federated.t2;
Table Create Table
t2 CREATE TABLE `t2` (
`id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default ''
) ENGINE=FEDERATED DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:9308/federated/t1'
INSERT INTO federated.t2 (id, name) VALUES (1, 'foo'); INSERT INTO federated.t2 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t2 (id, name) VALUES (2, 'fee'); INSERT INTO federated.t2 (id, name) VALUES (2, 'fee');
SELECT * FROM federated.t2; SELECT * FROM federated.t2;
......
...@@ -75,6 +75,8 @@ eval CREATE TABLE federated.t2 ( ...@@ -75,6 +75,8 @@ eval CREATE TABLE federated.t2 (
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1'; CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
SHOW CREATE TABLE federated.t2;
INSERT INTO federated.t2 (id, name) VALUES (1, 'foo'); INSERT INTO federated.t2 (id, name) VALUES (1, 'foo');
INSERT INTO federated.t2 (id, name) VALUES (2, 'fee'); INSERT INTO federated.t2 (id, name) VALUES (2, 'fee');
......
...@@ -1023,6 +1023,11 @@ store_create_info(THD *thd, TABLE_LIST *table_list, String *packet) ...@@ -1023,6 +1023,11 @@ store_create_info(THD *thd, TABLE_LIST *table_list, String *packet)
packet->append(" COMMENT=", 9); packet->append(" COMMENT=", 9);
append_unescaped(packet, share->comment, strlen(share->comment)); append_unescaped(packet, share->comment, strlen(share->comment));
} }
if (share->connect_string.length)
{
packet->append(" CONNECTION=", 12);
append_unescaped(packet, share->connect_string.str, share->connect_string.length);
}
if (file->raid_type) if (file->raid_type)
{ {
uint length; uint length;
......
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