mirror of
https://github.com/MariaDB/server.git
synced 2025-04-18 21:44:20 +03:00
Allow 'mariadb' as a connection wrapper name for FederatedX.
One can now use 'mariadb' and/or 'mysql' asr wrapper name to connect to MariaDB or MySQL.
This commit is contained in:
parent
aea440d3e7
commit
7b59a4dbc2
@ -79,7 +79,7 @@ CREATE TABLE federated.t1 (
|
||||
`name` varchar(32) NOT NULL default ''
|
||||
)
|
||||
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
|
||||
CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
|
||||
CONNECTION='mariadb://root@127.0.0.1:SLAVE_PORT/federated/t1';
|
||||
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
|
||||
INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
|
||||
INSERT INTO federated.t1 (id, `group`) VALUES (3, 42);
|
||||
|
@ -92,7 +92,7 @@ eval CREATE TABLE federated.t1 (
|
||||
`name` varchar(32) NOT NULL default ''
|
||||
)
|
||||
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
|
||||
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
|
||||
CONNECTION='mariadb://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
|
||||
|
||||
INSERT INTO federated.t1 (id, name) VALUES (1, 'foo');
|
||||
INSERT INTO federated.t1 (id, name) VALUES (2, 'fee');
|
||||
|
@ -479,12 +479,12 @@ CREATE TABLE federated.t3 (a INT);
|
||||
INSERT INTO federated.t3 VALUES (1),(2),(3);
|
||||
CREATE TABLE federated.t4 (a INT);
|
||||
connection master;
|
||||
CREATE SERVER fedlink FOREIGN DATA WRAPPER mysql
|
||||
CREATE SERVER fedlink FOREIGN DATA WRAPPER mariadb
|
||||
OPTIONS (USER 'root', HOST '127.0.0.1', DATABASE 'federated',
|
||||
PORT SLAVE_PORT);
|
||||
CREATE TABLE federated.t3 (a INT)
|
||||
ENGINE=FEDERATED
|
||||
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t3'
|
||||
CONNECTION='mariadb://root@127.0.0.1:$SLAVE_MYPORT/federated/t3'
|
||||
PARTITION BY list (a)
|
||||
(PARTITION p1 VALUES IN (1) CONNECTION='fedlink/t3',
|
||||
PARTITION p2 VALUES IN (2) CONNECTION='fedlink/t4');
|
||||
|
@ -307,13 +307,13 @@ CREATE TABLE federated.t4 (a INT);
|
||||
|
||||
connection master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval CREATE SERVER fedlink FOREIGN DATA WRAPPER mysql
|
||||
eval CREATE SERVER fedlink FOREIGN DATA WRAPPER mariadb
|
||||
OPTIONS (USER 'root', HOST '127.0.0.1', DATABASE 'federated',
|
||||
PORT $SLAVE_MYPORT);
|
||||
|
||||
CREATE TABLE federated.t3 (a INT)
|
||||
ENGINE=FEDERATED
|
||||
CONNECTION='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t3'
|
||||
CONNECTION='mariadb://root@127.0.0.1:$SLAVE_MYPORT/federated/t3'
|
||||
PARTITION BY list (a)
|
||||
(PARTITION p1 VALUES IN (1) CONNECTION='fedlink/t3',
|
||||
PARTITION p2 VALUES IN (2) CONNECTION='fedlink/t4');
|
||||
|
@ -51,6 +51,7 @@ struct io_schemes_st
|
||||
static const io_schemes_st federated_io_schemes[] =
|
||||
{
|
||||
{ "mysql", &instantiate_io_mysql },
|
||||
{ "mariadb", &instantiate_io_mysql },
|
||||
{ "null", instantiate_io_null } /* must be last element */
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user