Commit 7efa1939 authored by unknown's avatar unknown

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


mysql-test/r/federated.result:
  test results for SHOW CREATE TABLE
mysql-test/t/federated.test:
  added test for SHOW CREATE TABLE
sql/sql_show.cc:
  added connect_string for SHOW CREATE TABLE
parent 62d62278
......@@ -74,6 +74,12 @@ CREATE TABLE federated.t2 (
)
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
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 (2, 'fee');
SELECT * FROM federated.t2;
......
......@@ -75,6 +75,8 @@ eval CREATE TABLE federated.t2 (
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
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 (2, 'fee');
......
......@@ -1023,6 +1023,11 @@ store_create_info(THD *thd, TABLE_LIST *table_list, String *packet)
packet->append(" COMMENT=", 9);
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)
{
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