Commit 1f0f46e4 authored by acurtis/antony@ltamd64.xiphis.org's avatar acurtis/antony@ltamd64.xiphis.org

Merge xiphis.org:/anubis/antony/work/p2-bug25679.3

into  xiphis.org:/anubis/antony/work/p2-bug25679.3.merge-5.1
parents 5c83b14b fbcd70a4
...@@ -40,17 +40,18 @@ CREATE TABLE federated.t1 ( ...@@ -40,17 +40,18 @@ CREATE TABLE federated.t1 (
) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t3'; CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t3';
ERROR HY000: Can't create federated table. Foreign data src error: error: 1146 'Table 'federated.t3' doesn't exist' SELECT * FROM federated.t1;
ERROR HY000: The foreign data source you are trying to reference does not exist. Data source error: error: 1146 'Table 'federated.t3' doesn't exist'
DROP TABLE federated.t1;
CREATE TABLE federated.t1 ( CREATE TABLE federated.t1 (
`id` int(20) NOT NULL, `id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default '' `name` varchar(32) NOT NULL default ''
) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://user:pass@127.0.0.1:SLAVE_PORT/federated/t1'; CONNECTION='mysql://user:pass@127.0.0.1:SLAVE_PORT/federated/t1';
ERROR HY000: Unable to connect to foreign data source: database: 'federated' username: 'user' hostname: '127.0.0.1' SELECT * FROM federated.t1;
DROP TABLE IF EXISTS federated.t1; ERROR HY000: Unable to connect to foreign data source: Access denied for user 'user'@'localhost' (using password: YES)
Warnings: DROP TABLE federated.t1;
Note 1051 Unknown table 't1'
CREATE TABLE federated.t1 ( CREATE TABLE federated.t1 (
`id` int(20) NOT NULL, `id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default '' `name` varchar(32) NOT NULL default ''
......
...@@ -32,25 +32,28 @@ CREATE TABLE federated.t1 ( ...@@ -32,25 +32,28 @@ CREATE TABLE federated.t1 (
# test non-existant table # test non-existant table
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
--error 1434
eval CREATE TABLE federated.t1 ( eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL, `id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default '' `name` varchar(32) NOT NULL default ''
) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t3'; CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t3';
--error 1431
SELECT * FROM federated.t1;
DROP TABLE federated.t1;
# test bad user/password # test bad user/password
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
--error 1429
eval CREATE TABLE federated.t1 ( eval CREATE TABLE federated.t1 (
`id` int(20) NOT NULL, `id` int(20) NOT NULL,
`name` varchar(32) NOT NULL default '' `name` varchar(32) NOT NULL default ''
) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 ENGINE="FEDERATED" DEFAULT CHARSET=latin1
CONNECTION='mysql://user:pass@127.0.0.1:$SLAVE_MYPORT/federated/t1'; CONNECTION='mysql://user:pass@127.0.0.1:$SLAVE_MYPORT/federated/t1';
--error 1429
SELECT * FROM federated.t1;
DROP TABLE federated.t1;
DROP TABLE IF EXISTS federated.t1;
# # correct connection, same named tables # # correct connection, same named tables
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 ( eval CREATE TABLE federated.t1 (
......
This diff is collapsed.
...@@ -113,6 +113,8 @@ private: ...@@ -113,6 +113,8 @@ private:
uint key_len, uint key_len,
ha_rkey_function find_flag, ha_rkey_function find_flag,
MYSQL_RES **result); MYSQL_RES **result);
int real_query(const char *query, uint length);
int real_connect();
public: public:
ha_federated(handlerton *hton, TABLE_SHARE *table_arg); ha_federated(handlerton *hton, TABLE_SHARE *table_arg);
~ha_federated() {} ~ha_federated() {}
......
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