Commit f6c9db08 authored by unknown's avatar unknown

WL# 2094 Federated Storage Handler

Patch #2, all coding style changes per Kostja's review 
(as requested to keep style changes separate from functionality changes),
as well as changes to the test suit to no longer use hard-coded port 
values in foreign table creation statement


mysql-test/r/federated.result:
  Now using SLAVE_PORT as opposed to hard-coded port value
mysql-test/t/federated.test:
  - changed test to use SLAVE_MYPORT
  - made all standard SQL uppercase
  - made test 80 cols, except blob inserts of text
sql/ha_federated.cc:
  - made sure all comments and style changes were according to Kostja's 
  review 
  - combined parse_url error handling into a 'error:' block, took out 
  triple exclamation points.
  - clarified commented documentation
  - got rid of all trailing spaces
parent aec30267
...@@ -5,23 +5,40 @@ reset slave; ...@@ -5,23 +5,40 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
stop slave; stop slave;
drop database if exists federated; DROP DATABASE IF EXISTS federated;
create database federated; CREATE DATABASE federated;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `other` int(20) NOT NULL default '0', created datetime default '2004-04-04 04:04:04', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `other_key` (`other`)) DEFAULT CHARSET=latin1; CREATE TABLE federated.t1 (
drop database if exists federated; `id` int(20) NOT NULL auto_increment,
create database federated; `name` varchar(32) NOT NULL default '',
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `other` int(20) NOT NULL default '0', created datetime default '2004-04-04 04:04:04', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `other_key` (`other`)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; `other` int(20) NOT NULL default '0',
insert into federated.t1 (name, other) values ('First Name', 11111); `created` datetime default '2004-04-04 04:04:04',
insert into federated.t1 (name, other) values ('Second Name', 22222); PRIMARY KEY (`id`),
insert into federated.t1 (name, other) values ('Third Name', 33333); KEY `name` (`name`),
insert into federated.t1 (name, other) values ('Fourth Name', 44444); KEY `other_key` (`other`))
insert into federated.t1 (name, other) values ('Fifth Name', 55555); DEFAULT CHARSET=latin1;
insert into federated.t1 (name, other) values ('Sixth Name', 66666); DROP DATABASE IF EXISTS federated;
insert into federated.t1 (name, other) values ('Seventh Name', 77777); CREATE DATABASE federated;
insert into federated.t1 (name, other) values ('Eigth Name', 88888); CREATE TABLE federated.t1 (
insert into federated.t1 (name, other) values ('Ninth Name', 99999); `id` int(20) NOT NULL auto_increment,
insert into federated.t1 (name, other) values ('Tenth Name', 101010); `name` varchar(32) NOT NULL default '',
select * from federated.t1; `other` int(20) NOT NULL default '0',
`created` datetime default '2004-04-04 04:04:04',
PRIMARY KEY (`id`),
KEY `name` (`name`),
KEY `other_key` (`other`))
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', 22222);
INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333);
INSERT INTO federated.t1 (name, other) VALUES ('Fourth Name', 44444);
INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555);
INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666);
INSERT INTO federated.t1 (name, other) VALUES ('Seventh Name', 77777);
INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888);
INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999);
INSERT INTO federated.t1 (name, other) VALUES ('Tenth Name', 101010);
SELECT * FROM federated.t1;
id name other created id name other created
1 First Name 11111 2004-04-04 04:04:04 1 First Name 11111 2004-04-04 04:04:04
2 Second Name 22222 2004-04-04 04:04:04 2 Second Name 22222 2004-04-04 04:04:04
...@@ -33,19 +50,19 @@ id name other created ...@@ -33,19 +50,19 @@ id name other created
8 Eigth Name 88888 2004-04-04 04:04:04 8 Eigth Name 88888 2004-04-04 04:04:04
9 Ninth Name 99999 2004-04-04 04:04:04 9 Ninth Name 99999 2004-04-04 04:04:04
10 Tenth Name 101010 2004-04-04 04:04:04 10 Tenth Name 101010 2004-04-04 04:04:04
select * from federated.t1 where id = 5; SELECT * FROM federated.t1 WHERE id = 5;
id name other created id name other created
5 Fifth Name 55555 2004-04-04 04:04:04 5 Fifth Name 55555 2004-04-04 04:04:04
select * from federated.t1 where name = 'Sixth Name'; SELECT * FROM federated.t1 WHERE name = 'Sixth Name';
id name other created id name other created
6 Sixth Name 66666 2004-04-04 04:04:04 6 Sixth Name 66666 2004-04-04 04:04:04
select * from federated.t1 where id = 6 and name = 'Sixth Name'; SELECT * FROM federated.t1 WHERE id = 6 and name = 'Sixth Name';
id name other created id name other created
6 Sixth Name 66666 2004-04-04 04:04:04 6 Sixth Name 66666 2004-04-04 04:04:04
select * from federated.t1 where other = 44444; SELECT * FROM federated.t1 WHERE other = 44444;
id name other created id name other created
4 Fourth Name 44444 2004-04-04 04:04:04 4 Fourth Name 44444 2004-04-04 04:04:04
select * from federated.t1 where name like '%th%'; SELECT * FROM federated.t1 WHERE name like '%th%';
id name other created id name other created
3 Third Name 33333 2004-04-04 04:04:04 3 Third Name 33333 2004-04-04 04:04:04
4 Fourth Name 44444 2004-04-04 04:04:04 4 Fourth Name 44444 2004-04-04 04:04:04
...@@ -55,15 +72,15 @@ id name other created ...@@ -55,15 +72,15 @@ id name other created
8 Eigth Name 88888 2004-04-04 04:04:04 8 Eigth Name 88888 2004-04-04 04:04:04
9 Ninth Name 99999 2004-04-04 04:04:04 9 Ninth Name 99999 2004-04-04 04:04:04
10 Tenth Name 101010 2004-04-04 04:04:04 10 Tenth Name 101010 2004-04-04 04:04:04
update federated.t1 set name = '3rd name' where id = 3; UPDATE federated.t1 SET name = '3rd name' WHERE id = 3;
select * from federated.t1 where name = '3rd name'; SELECT * FROM federated.t1 WHERE name = '3rd name';
id name other created id name other created
3 3rd name 33333 2004-04-04 04:04:04 3 3rd name 33333 2004-04-04 04:04:04
update federated.t1 set name = 'Third name' where name = '3rd name'; UPDATE federated.t1 SET name = 'Third name' WHERE name = '3rd name';
select * from federated.t1 where name = 'Third name'; SELECT * FROM federated.t1 WHERE name = 'Third name';
id name other created id name other created
3 Third name 33333 2004-04-04 04:04:04 3 Third name 33333 2004-04-04 04:04:04
select * from federated.t1 order by id DESC; SELECT * FROM federated.t1 ORDER BY id DESC;
id name other created id name other created
10 Tenth Name 101010 2004-04-04 04:04:04 10 Tenth Name 101010 2004-04-04 04:04:04
9 Ninth Name 99999 2004-04-04 04:04:04 9 Ninth Name 99999 2004-04-04 04:04:04
...@@ -75,7 +92,7 @@ id name other created ...@@ -75,7 +92,7 @@ id name other created
3 Third name 33333 2004-04-04 04:04:04 3 Third name 33333 2004-04-04 04:04:04
2 Second Name 22222 2004-04-04 04:04:04 2 Second Name 22222 2004-04-04 04:04:04
1 First Name 11111 2004-04-04 04:04:04 1 First Name 11111 2004-04-04 04:04:04
select * from federated.t1 order by name; SELECT * FROM federated.t1 ORDER BY name;
id name other created id name other created
8 Eigth Name 88888 2004-04-04 04:04:04 8 Eigth Name 88888 2004-04-04 04:04:04
5 Fifth Name 55555 2004-04-04 04:04:04 5 Fifth Name 55555 2004-04-04 04:04:04
...@@ -87,7 +104,7 @@ id name other created ...@@ -87,7 +104,7 @@ id name other created
6 Sixth Name 66666 2004-04-04 04:04:04 6 Sixth Name 66666 2004-04-04 04:04:04
10 Tenth Name 101010 2004-04-04 04:04:04 10 Tenth Name 101010 2004-04-04 04:04:04
3 Third name 33333 2004-04-04 04:04:04 3 Third name 33333 2004-04-04 04:04:04
select * from federated.t1 order by name DESC; SELECT * FROM federated.t1 ORDER BY name DESC;
id name other created id name other created
3 Third name 33333 2004-04-04 04:04:04 3 Third name 33333 2004-04-04 04:04:04
10 Tenth Name 101010 2004-04-04 04:04:04 10 Tenth Name 101010 2004-04-04 04:04:04
...@@ -99,7 +116,7 @@ id name other created ...@@ -99,7 +116,7 @@ id name other created
1 First Name 11111 2004-04-04 04:04:04 1 First Name 11111 2004-04-04 04:04:04
5 Fifth Name 55555 2004-04-04 04:04:04 5 Fifth Name 55555 2004-04-04 04:04:04
8 Eigth Name 88888 2004-04-04 04:04:04 8 Eigth Name 88888 2004-04-04 04:04:04
select * from federated.t1 order by name ASC; SELECT * FROM federated.t1 ORDER BY name ASC;
id name other created id name other created
8 Eigth Name 88888 2004-04-04 04:04:04 8 Eigth Name 88888 2004-04-04 04:04:04
5 Fifth Name 55555 2004-04-04 04:04:04 5 Fifth Name 55555 2004-04-04 04:04:04
...@@ -111,7 +128,7 @@ id name other created ...@@ -111,7 +128,7 @@ id name other created
6 Sixth Name 66666 2004-04-04 04:04:04 6 Sixth Name 66666 2004-04-04 04:04:04
10 Tenth Name 101010 2004-04-04 04:04:04 10 Tenth Name 101010 2004-04-04 04:04:04
3 Third name 33333 2004-04-04 04:04:04 3 Third name 33333 2004-04-04 04:04:04
select * from federated.t1 group by other; SELECT * FROM federated.t1 GROUP BY other;
id name other created id name other created
1 First Name 11111 2004-04-04 04:04:04 1 First Name 11111 2004-04-04 04:04:04
2 Second Name 22222 2004-04-04 04:04:04 2 Second Name 22222 2004-04-04 04:04:04
...@@ -123,52 +140,65 @@ id name other created ...@@ -123,52 +140,65 @@ id name other created
8 Eigth Name 88888 2004-04-04 04:04:04 8 Eigth Name 88888 2004-04-04 04:04:04
9 Ninth Name 99999 2004-04-04 04:04:04 9 Ninth Name 99999 2004-04-04 04:04:04
10 Tenth Name 101010 2004-04-04 04:04:04 10 Tenth Name 101010 2004-04-04 04:04:04
delete from federated.t1 where id = 5; DELETE FROM federated.t1 WHERE id = 5;
select * from federated.t1 where id = 5; SELECT * FROM federated.t1 WHERE id = 5;
id name other created id name other created
delete from federated.t1; DELETE FROM federated.t1;
select * from federated.t1 where id = 5; SELECT * FROM federated.t1 WHERE id = 5;
id name other created id name other created
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`) ); CREATE TABLE federated.t1 (
drop table if exists federated.t1; `id` int(20) NOT NULL auto_increment,
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`) ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; `name` varchar(32),
insert into federated.t1 (name, other) values ('First Name', 11111); `other` varchar(20),
insert into federated.t1 (name, other) values ('Second Name', NULL); PRIMARY KEY (`id`) );
insert into federated.t1 (name, other) values ('Third Name', 33333); DROP TABLE IF EXISTS federated.t1;
insert into federated.t1 (name, other) values (NULL, NULL); CREATE TABLE federated.t1 (
insert into federated.t1 (name, other) values ('Fifth Name', 55555); `id` int(20) NOT NULL auto_increment,
insert into federated.t1 (name, other) values ('Sixth Name', 66666); `name` varchar(32),
insert into federated.t1 (name) values ('Seventh Name'); `other` varchar(20),
insert into federated.t1 (name, other) values ('Eigth Name', 88888); PRIMARY KEY (`id`) )
insert into federated.t1 (name, other) values ('Ninth Name', 99999); ENGINE="FEDERATED"
insert into federated.t1 (other) values ('fee fie foe fum'); DEFAULT CHARSET=latin1
select * from federated.t1 where other IS NULL; COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', NULL);
INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333);
INSERT INTO federated.t1 (name, other) VALUES (NULL, NULL);
INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555);
INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666);
INSERT INTO federated.t1 (name) VALUES ('Seventh Name');
INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888);
INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999);
INSERT INTO federated.t1 (other) VALUES ('fee fie foe fum');
SELECT * FROM federated.t1 WHERE other IS NULL;
id name other id name other
2 Second Name NULL 2 Second Name NULL
4 NULL NULL 4 NULL NULL
7 Seventh Name NULL 7 Seventh Name NULL
select * from federated.t1 where name IS NULL; SELECT * FROM federated.t1 WHERE name IS NULL;
id name other id name other
4 NULL NULL 4 NULL NULL
10 NULL fee fie foe fum 10 NULL fee fie foe fum
select * from federated.t1 where name IS NULL and other IS NULL; SELECT * FROM federated.t1 WHERE name IS NULL and other IS NULL;
id name other id name other
4 NULL NULL 4 NULL NULL
select * from federated.t1 where name IS NULL or other IS NULL; SELECT * FROM federated.t1 WHERE name IS NULL or other IS NULL;
id name other id name other
2 Second Name NULL 2 Second Name NULL
4 NULL NULL 4 NULL NULL
7 Seventh Name NULL 7 Seventh Name NULL
10 NULL fee fie foe fum 10 NULL fee fie foe fum
update federated.t1 set name = 'Fourth Name', other = 'four four four' where name IS NULL and other IS NULL; UPDATE federated.t1
update federated.t1 set other = 'two two two two' where name = 'Second Name'; SET name = 'Fourth Name', other = 'four four four'
update federated.t1 set other = 'seven seven' where name like 'Sec%'; WHERE name IS NULL AND other IS NULL;
update federated.t1 set other = 'seven seven' where name = 'Seventh Name'; UPDATE federated.t1 SET other = 'two two two two' WHERE name = 'Second Name';
update federated.t1 set name = 'Tenth Name' where other like 'fee fie%'; UPDATE federated.t1 SET other = 'seven seven' WHERE name like 'Sec%';
select * from federated.t1 where name IS NULL or other IS NULL ; UPDATE federated.t1 SET other = 'seven seven' WHERE name = 'Seventh Name';
UPDATE federated.t1 SET name = 'Tenth Name' WHERE other like 'fee fie%';
SELECT * FROM federated.t1 WHERE name IS NULL OR other IS NULL ;
id name other id name other
select * from federated.t1; SELECT * FROM federated.t1;
id name other id name other
1 First Name 11111 1 First Name 11111
2 Second Name seven seven 2 Second Name seven seven
...@@ -180,149 +210,206 @@ id name other ...@@ -180,149 +210,206 @@ id name other
8 Eigth Name 88888 8 Eigth Name 88888
9 Ninth Name 99999 9 Ninth Name 99999
10 Tenth Name fee fie foe fum 10 Tenth Name fee fie foe fum
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` CREATE TABLE federated.t1 (
varchar(32) NOT NULL DEFAULT '', `other` varchar(20) NOT NULL DEFAULT '', PRIMARY KEY (`id`), key nameoth (name, other) ); `id` int(20) NOT NULL auto_increment,
drop table if exists federated.t1; `name` varchar(32) NOT NULL DEFAULT '',
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL DEFAULT '', `other` varchar(20) NOT NULL DEFAULT '', PRIMARY KEY (`id`), key nameoth (name, other)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; `other` varchar(20) NOT NULL DEFAULT '',
insert into federated.t1 (name, other) values ('First Name', '1111'); PRIMARY KEY (`id`),
insert into federated.t1 (name, other) values ('Second Name', '2222'); KEY nameoth (name, other) );
insert into federated.t1 (name, other) values ('Third Name', '3333'); DROP TABLE IF EXISTS federated.t1;
select * from federated.t1 where name = 'Second Name'; CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment,
`name` varchar(32) NOT NULL DEFAULT '',
`other` varchar(20) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY nameoth (name, other))
ENGINE="FEDERATED" DEFAULT
CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, other) VALUES ('First Name', '1111');
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', '2222');
INSERT INTO federated.t1 (name, other) VALUES ('Third Name', '3333');
SELECT * FROM federated.t1 WHERE name = 'Second Name';
id name other id name other
2 Second Name 2222 2 Second Name 2222
select * from federated.t1 where other = '2222'; SELECT * FROM federated.t1 WHERE other = '2222';
id name other id name other
2 Second Name 2222 2 Second Name 2222
select * from federated.t1 where name = 'Third Name'; SELECT * FROM federated.t1 WHERE name = 'Third Name';
id name other id name other
3 Third Name 3333 3 Third Name 3333
select * from federated.t1 where name = 'Third Name' and other = '3333'; SELECT * FROM federated.t1 WHERE name = 'Third Name' AND other = '3333';
id name other id name other
3 Third Name 3333 3 Third Name 3333
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 CREATE TABLE federated.t1 (
(id int NOT NULL auto_increment, `id` int NOT NULL auto_increment,
name char(32) NOT NULL DEFAULT '', `name` char(32) NOT NULL DEFAULT '',
bincol binary(4) NOT NULL, `bincol` binary(4) NOT NULL,
floatval decimal(5,2) NOT NULL DEFAULT 0.0, `floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
other int NOT NULL DEFAULT 0, `other` int NOT NULL DEFAULT 0,
primary key(id), PRIMARY KEY (id),
key nameoth(name, other), KEY nameoth(name, other),
key bincol(bincol), KEY bincol(bincol),
key floatval(floatval)); KEY floatval(floatval));
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 CREATE TABLE federated.t1 (
(id int NOT NULL auto_increment, `id` int NOT NULL auto_increment,
name char(32) NOT NULL DEFAULT '', `name` char(32) NOT NULL DEFAULT '',
bincol binary(4) NOT NULL, `bincol` binary(4) NOT NULL,
floatval decimal(5,2) NOT NULL DEFAULT 0.0, `floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
other int NOT NULL DEFAULT 0, `other` int NOT NULL DEFAULT 0,
primary key(id), PRIMARY KEY (id),
key nameoth(name,other), KEY nameoth(name,other),
key bincol(bincol), KEY bincol(bincol),
key floatval(floatval)) KEY floatval(floatval))
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; ENGINE="FEDERATED"
insert into federated.t1 (name, bincol, floatval, other) values ('first', 0x65, 11.11, 1111); DEFAULT CHARSET=latin1
insert into federated.t1 (name, bincol, floatval, other) values ('second', 0x66, 22.22, 2222); COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
insert into federated.t1 (name, bincol, floatval, other) values ('third', 'g', 22.22, 2222); INSERT INTO federated.t1 (name, bincol, floatval, other)
select * from federated.t1; VALUES ('first', 0x65, 11.11, 1111);
INSERT INTO federated.t1 (name, bincol, floatval, other)
VALUES ('second', 0x66, 22.22, 2222);
INSERT INTO federated.t1 (name, bincol, floatval, other)
VALUES ('third', 'g', 22.22, 2222);
SELECT * FROM federated.t1;
id name bincol floatval other id name bincol floatval other
1 first e 11.11 1111 1 first e 11.11 1111
2 second f 22.22 2222 2 second f 22.22 2222
3 third g 22.22 2222 3 third g 22.22 2222
select * from federated.t1 where name = 'second'; SELECT * FROM federated.t1 WHERE name = 'second';
id name bincol floatval other id name bincol floatval other
2 second f 22.22 2222 2 second f 22.22 2222
select * from federated.t1 where bincol= 'f'; SELECT * FROM federated.t1 WHERE bincol= 'f';
id name bincol floatval other id name bincol floatval other
2 second f 22.22 2222 2 second f 22.22 2222
select * from federated.t1 where bincol= 0x66; SELECT * FROM federated.t1 WHERE bincol= 0x66;
id name bincol floatval other id name bincol floatval other
2 second f 22.22 2222 2 second f 22.22 2222
select * from federated.t1 where bincol= 0x67; SELECT * FROM federated.t1 WHERE bincol= 0x67;
id name bincol floatval other id name bincol floatval other
3 third g 22.22 2222 3 third g 22.22 2222
select * from federated.t1 where bincol= 'g'; SELECT * FROM federated.t1 WHERE bincol= 'g';
id name bincol floatval other id name bincol floatval other
3 third g 22.22 2222 3 third g 22.22 2222
select * from federated.t1 where floatval=11.11; SELECT * FROM federated.t1 WHERE floatval=11.11;
id name bincol floatval other id name bincol floatval other
1 first e 11.11 1111 1 first e 11.11 1111
select * from federated.t1 where name='third'; SELECT * FROM federated.t1 WHERE name='third';
id name bincol floatval other id name bincol floatval other
3 third g 22.22 2222 3 third g 22.22 2222
select * from federated.t1 where other=2222; SELECT * FROM federated.t1 WHERE other=2222;
id name bincol floatval other id name bincol floatval other
2 second f 22.22 2222 2 second f 22.22 2222
3 third g 22.22 2222 3 third g 22.22 2222
select * from federated.t1 where name='third' and other=2222; SELECT * FROM federated.t1 WHERE name='third' and other=2222;
id name bincol floatval other id name bincol floatval other
3 third g 22.22 2222 3 third g 22.22 2222
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (id int, name varchar(32), floatval float, other int) DEFAULT CHARSET=latin1; CREATE TABLE federated.t1 (
drop table if exists federated.t1; `id` int,
CREATE TABLE federated.t1 (id int, name varchar(32), floatval float, other int) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; `name` varchar(32),
insert into federated.t1 values (NULL, NULL, NULL, NULL); `floatval` float,
insert into federated.t1 values (); `other` int)
insert into federated.t1 (id) values (1); DEFAULT CHARSET=latin1;
insert into federated.t1 (name, floatval, other) values ('foo', 33.33333332, NULL); DROP TABLE IF EXISTS federated.t1;
insert into federated.t1 (name, floatval, other) values (0, 00.3333, NULL); CREATE TABLE federated.t1 (
select * from federated.t1; `id` int,
`name` varchar(32),
`floatval` float,
`other` int)
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 values (NULL, NULL, NULL, NULL);
INSERT INTO federated.t1 values ();
INSERT INTO federated.t1 (id) VALUES (1);
INSERT INTO federated.t1 (name, floatval, other)
VALUES ('foo', 33.33333332, NULL);
INSERT INTO federated.t1 (name, floatval, other)
VALUES (0, 00.3333, NULL);
SELECT * FROM federated.t1;
id name floatval other id name floatval other
NULL NULL NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL NULL NULL
1 NULL NULL NULL 1 NULL NULL NULL
NULL foo 33.3333 NULL NULL foo 33.3333 NULL
NULL 0 0.3333 NULL NULL 0 0.3333 NULL
select count(*) from federated.t1 where id IS NULL and name IS NULL and floatval IS NULL and other IS NULL; SELECT count(*) FROM federated.t1
WHERE id IS NULL
AND name IS NULL
AND floatval IS NULL
AND other IS NULL;
count(*) count(*)
2 2
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( blurb_id int NOT NULL DEFAULT 0, blurb text default '', primary key(blurb_id)) DEFAULT CHARSET=latin1; CREATE TABLE federated.t1 (
drop table if exists federated.t1; `blurb_id` int NOT NULL DEFAULT 0,
CREATE TABLE federated.t1 ( blurb_id int NOT NULL DEFAULT 0, blurb text default '', primary key(blurb_id)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; `blurb` text default '',
PRIMARY KEY (blurb_id))
DEFAULT CHARSET=latin1;
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`blurb_id` int NOT NULL DEFAULT 0,
`blurb` text default '',
PRIMARY KEY (blurb_id))
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values."); INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE."); INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. "); INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. ");
INSERT INTO federated.t1 VALUES(4, "Die bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest fr jemanden, der seine Zielsprache ernst nimmt:"); INSERT INTO federated.t1 VALUES(4, "Die bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest fr jemanden, der seine Zielsprache ernst nimmt:");
select * from federated.t1; SELECT * FROM federated.t1;
blurb_id blurb blurb_id blurb
1 MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values. 1 MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.
2 All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE. 2 All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.
3 A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. 3 A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined.
4 Die bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest fr jemanden, der seine Zielsprache ernst nimmt: 4 Die bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest fr jemanden, der seine Zielsprache ernst nimmt:
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (a int not null, b int not null, c int not null, primary key (a),key(b)); CREATE TABLE federated.t1 (
drop table if exists federated.t1; `a` int NOT NULL,
create table federated.t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; `b` int NOT NULL,
insert into federated.t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4); `c` int NOT NULL,
explain select * from federated.t1 order by a; PRIMARY KEY (a),key(b));
DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (
`a` int NOT NULL,
`b` int NOT NULL,
`c` int NOT NULL,
PRIMARY KEY (a),
KEY (b))
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 VALUES (3,3,3),(1,1,1),(2,2,2),(4,4,4);
EXPLAIN SELECT * FROM federated.t1 ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
explain select * from federated.t1 order by b; EXPLAIN SELECT * FROM federated.t1 ORDER BY b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
explain select * from federated.t1 order by c; EXPLAIN SELECT * FROM federated.t1 ORDER BY c;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
explain select a from federated.t1 order by a; EXPLAIN SELECT a FROM federated.t1 ORDER BY a;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
explain select b from federated.t1 order by b; EXPLAIN SELECT b FROM federated.t1 ORDER BY b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
explain select a,b from federated.t1 order by b; EXPLAIN SELECT a,b FROM federated.t1 ORDER BY b;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort 1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 Using filesort
explain select a,b from federated.t1; EXPLAIN SELECT a,b FROM federated.t1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 1 SIMPLE t1 ALL NULL NULL NULL NULL 10000
explain select a,b,c from federated.t1; EXPLAIN SELECT a,b,c FROM federated.t1;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10000 1 SIMPLE t1 ALL NULL NULL NULL NULL 10000
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 CREATE TABLE federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
...@@ -447,10 +534,11 @@ int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 ...@@ -447,10 +534,11 @@ int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
int, i999 int, i1000 int, b blob) row_format=dynamic; int, i999 int, i1000 int, b blob) row_format=dynamic;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 CREATE TABLE federated.t1
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int,
i17 int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
...@@ -572,8 +660,13 @@ int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 ...@@ -572,8 +660,13 @@ int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
int, i999 int, i1000 int, b blob) row_format=dynamic ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; int, i999 int, i1000 int, b blob)
insert into federated.t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, row_format=dynamic
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1
values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
...@@ -612,41 +705,54 @@ insert into federated.t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...@@ -612,41 +705,54 @@ insert into federated.t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "PatrickG"); 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "PatrickG");
update federated.t1 set b=repeat('a',256); UPDATE federated.t1 SET b=repeat('a',256);
update federated.t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0, i10=0; UPDATE federated.t1 SET i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0, i10=0;
select * from federated.t1 where i9=0 and i10=0; SELECT * FROM federated.t1 WHERE i9=0 and i10=0;
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1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 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 PatrickG
update federated.t1 set i50=20; UPDATE federated.t1 SET i50=20;
select * from federated.t1; SELECT * FROM federated.t1;
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964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1 1 1 1 1 1 1 1 1 1 1 PatrickG
delete from federated.t1 where i51=20; DELETE FROM federated.t1 WHERE i51=20;
select * from federated.t1; SELECT * FROM federated.t1;
i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1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 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b i1 i2 i3 i4 i5 i6 i7 i8 i9 i10 i11 i12 i13 i14 i15 i16 i17 i18 i19 i20 i21 i22 i23 i24 i25 i26 i27 i28 i29 i30 i31 i32 i33 i34 i35 i36 i37 i38 i39 i40 i41 i42 i43 i44 i45 i46 i47 i48 i49 i50 i51 i52 i53 i54 i55 i56 i57 i58 i59 i60 i61 i62 i63 i64 i65 i66 i67 i68 i69 i70 i71 i72 i73 i74 i75 i76 i77 i78 i79 i80 i81 i82 i83 i84 i85 i86 i87 i88 i89 i90 i91 i92 i93 i94 i95 i96 i97 i98 i99 i100 i101 i102 i103 i104 i105 i106 i107 i108 i109 i110 i111 i112 i113 i114 i115 i116 i117 i118 i119 i120 i121 i122 i123 i124 i125 i126 i127 i128 i129 i130 i131 i132 i133 i134 i135 i136 i137 i138 i139 i140 i141 i142 i143 i144 i145 i146 i147 i148 i149 i150 i151 i152 i153 i154 i155 i156 i157 i158 i159 i160 i161 i162 i163 i164 i165 i166 i167 i168 i169 i170 i171 i172 i173 i174 i175 i176 i177 i178 i179 i180 i181 i182 i183 i184 i185 i186 i187 i188 i189 i190 i191 i192 i193 i194 i195 i196 i197 i198 i199 i200 i201 i202 i203 i204 i205 i206 i207 i208 i209 i210 i211 i212 i213 i214 i215 i216 i217 i218 i219 i220 i221 i222 i223 i224 i225 i226 i227 i228 i229 i230 i231 i232 i233 i234 i235 i236 i237 i238 i239 i240 i241 i242 i243 i244 i245 i246 i247 i248 i249 i250 i251 i252 i253 i254 i255 i256 i257 i258 i259 i260 i261 i262 i263 i264 i265 i266 i267 i268 i269 i270 i271 i272 i273 i274 i275 i276 i277 i278 i279 i280 i281 i282 i283 i284 i285 i286 i287 i288 i289 i290 i291 i292 i293 i294 i295 i296 i297 i298 i299 i300 i301 i302 i303 i304 i305 i306 i307 i308 i309 i310 i311 i312 i313 i314 i315 i316 i317 i318 i319 i320 i321 i322 i323 i324 i325 i326 i327 i328 i329 i330 i331 i332 i333 i334 i335 i336 i337 i338 i339 i340 i341 i342 i343 i344 i345 i346 i347 i348 i349 i350 i351 i352 i353 i354 i355 i356 i357 i358 i359 i360 i361 i362 i363 i364 i365 i366 i367 i368 i369 i370 i371 i372 i373 i374 i375 i376 i377 i378 i379 i380 i381 i382 i383 i384 i385 i386 i387 i388 i389 i390 i391 i392 i393 i394 i395 i396 i397 i398 i399 i400 i401 i402 i403 i404 i405 i406 i407 i408 i409 i410 i411 i412 i413 i414 i415 i416 i417 i418 i419 i420 i421 i422 i423 i424 i425 i426 i427 i428 i429 i430 i431 i432 i433 i434 i435 i436 i437 i438 i439 i440 i441 i442 i443 i444 i445 i446 i447 i448 i449 i450 i451 i452 i453 i454 i455 i456 i457 i458 i459 i460 i461 i462 i463 i464 i465 i466 i467 i468 i469 i470 i471 i472 i473 i474 i475 i476 i477 i478 i479 i480 i481 i482 i483 i484 i485 i486 i487 i488 i489 i490 i491 i492 i493 i494 i495 i496 i497 i498 i499 i500 i501 i502 i503 i504 i505 i506 i507 i508 i509 i510 i511 i512 i513 i514 i515 i516 i517 i518 i519 i520 i521 i522 i523 i524 i525 i526 i527 i528 i529 i530 i531 i532 i533 i534 i535 i536 i537 i538 i539 i540 i541 i542 i543 i544 i545 i546 i547 i548 i549 i550 i551 i552 i553 i554 i555 i556 i557 i558 i559 i560 i561 i562 i563 i564 i565 i566 i567 i568 i569 i570 i571 i572 i573 i574 i575 i576 i577 i578 i579 i580 i581 i582 i583 i584 i585 i586 i587 i588 i589 i590 i591 i592 i593 i594 i595 i596 i597 i598 i599 i600 i601 i602 i603 i604 i605 i606 i607 i608 i609 i610 i611 i612 i613 i614 i615 i616 i617 i618 i619 i620 i621 i622 i623 i624 i625 i626 i627 i628 i629 i630 i631 i632 i633 i634 i635 i636 i637 i638 i639 i640 i641 i642 i643 i644 i645 i646 i647 i648 i649 i650 i651 i652 i653 i654 i655 i656 i657 i658 i659 i660 i661 i662 i663 i664 i665 i666 i667 i668 i669 i670 i671 i672 i673 i674 i675 i676 i677 i678 i679 i680 i681 i682 i683 i684 i685 i686 i687 i688 i689 i690 i691 i692 i693 i694 i695 i696 i697 i698 i699 i700 i701 i702 i703 i704 i705 i706 i707 i708 i709 i710 i711 i712 i713 i714 i715 i716 i717 i718 i719 i720 i721 i722 i723 i724 i725 i726 i727 i728 i729 i730 i731 i732 i733 i734 i735 i736 i737 i738 i739 i740 i741 i742 i743 i744 i745 i746 i747 i748 i749 i750 i751 i752 i753 i754 i755 i756 i757 i758 i759 i760 i761 i762 i763 i764 i765 i766 i767 i768 i769 i770 i771 i772 i773 i774 i775 i776 i777 i778 i779 i780 i781 i782 i783 i784 i785 i786 i787 i788 i789 i790 i791 i792 i793 i794 i795 i796 i797 i798 i799 i800 i801 i802 i803 i804 i805 i806 i807 i808 i809 i810 i811 i812 i813 i814 i815 i816 i817 i818 i819 i820 i821 i822 i823 i824 i825 i826 i827 i828 i829 i830 i831 i832 i833 i834 i835 i836 i837 i838 i839 i840 i841 i842 i843 i844 i845 i846 i847 i848 i849 i850 i851 i852 i853 i854 i855 i856 i857 i858 i859 i860 i861 i862 i863 i864 i865 i866 i867 i868 i869 i870 i871 i872 i873 i874 i875 i876 i877 i878 i879 i880 i881 i882 i883 i884 i885 i886 i887 i888 i889 i890 i891 i892 i893 i894 i895 i896 i897 i898 i899 i900 i901 i902 i903 i904 i905 i906 i907 i908 i909 i910 i911 i912 i913 i914 i915 i916 i917 i918 i919 i920 i921 i922 i923 i924 i925 i926 i927 i928 i929 i930 i931 i932 i933 i934 i935 i936 i937 i938 i939 i940 i941 i942 i943 i944 i945 i946 i947 i948 i949 i950 i951 i952 i953 i954 i955 i956 i957 i958 i959 i960 i961 i962 i963 i964 i965 i966 i967 i968 i969 i970 i971 i972 i973 i974 i975 i976 i977 i978 i979 i980 i981 i982 i983 i984 i985 i986 i987 i988 i989 i990 i991 i992 i993 i994 i995 i996 i997 i998 i999 i1000 b
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob NOT NULL, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', primary key(id), index(code), index(fileguts(10))) DEFAULT CHARSET=latin1; CREATE TABLE federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob NOT NULL, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', PRIMARY KEY(id), index(code), index(fileguts(10))) DEFAULT CHARSET=latin1;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob NOT NULL, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', primary key(id), index(code), index(fileguts(10))) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; CREATE TABLE federated.t1 (
insert into federated.t1 (code, fileguts, creation_date) values ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03'); id int NOT NULL auto_increment,
insert into federated.t1 (code, fileguts, creation_date) values ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04'); code char(20) NOT NULL,
insert into federated.t1 (code, fileguts, creation_date) values ('DEUEUEUEUEUEUEUEUEU', 'jimbob', '2004-04-04 04:04:04'); fileguts blob NOT NULL,
select * from federated.t1; creation_date datetime,
entered_time datetime default '2004-04-04 04:04:04',
PRIMARY KEY(id),
index(code),
index(fileguts(10)))
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03');
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04');
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', 'jimbob', '2004-04-04 04:04:04');
SELECT * FROM federated.t1;
id code fileguts creation_date entered_time id code fileguts creation_date entered_time
1 ASDFWERQWETWETAWETA *()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[ 2003-03-03 03:03:03 2004-04-04 04:04:04 1 ASDFWERQWETWETAWETA *()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[ 2003-03-03 03:03:03 2004-04-04 04:04:04
2 DEUEUEUEUEUEUEUEUEU *()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[ 2004-04-04 04:04:04 2004-04-04 04:04:04 2 DEUEUEUEUEUEUEUEUEU *()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[ 2004-04-04 04:04:04 2004-04-04 04:04:04
3 DEUEUEUEUEUEUEUEUEU jimbob 2004-04-04 04:04:04 2004-04-04 04:04:04 3 DEUEUEUEUEUEUEUEUEU jimbob 2004-04-04 04:04:04 2004-04-04 04:04:04
select * from federated.t1 where fileguts = 'jimbob'; SELECT * FROM federated.t1 WHERE fileguts = 'jimbob';
id code fileguts creation_date entered_time id code fileguts creation_date entered_time
3 DEUEUEUEUEUEUEUEUEU jimbob 2004-04-04 04:04:04 2004-04-04 04:04:04 3 DEUEUEUEUEUEUEUEUEU jimbob 2004-04-04 04:04:04 2004-04-04 04:04:04
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (a BLOB); CREATE TABLE federated.t1 (`a` BLOB);
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (a BLOB) ENGINE="FEDERATED" COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; CREATE TABLE federated.t1 (
`a` BLOB)
ENGINE="FEDERATED"
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 VALUES (0x00); INSERT INTO federated.t1 VALUES (0x00);
INSERT INTO federated.t1 VALUES (0x0001); INSERT INTO federated.t1 VALUES (0x0001);
INSERT INTO federated.t1 VALUES (0x0100); INSERT INTO federated.t1 VALUES (0x0100);
...@@ -655,33 +761,52 @@ HEX(a) ...@@ -655,33 +761,52 @@ HEX(a)
00 00
0001 0001
0100 0100
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `country_id` int(20) NOT NULL DEFAULT 0, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`), key (country_id)); CREATE TABLE federated.t1 (
drop table if exists federated.countries; `id` int(20) NOT NULL auto_increment,
`country_id` int(20) NOT NULL DEFAULT 0,
`name` varchar(32),
`other` varchar(20),
PRIMARY KEY (`id`),
key (country_id));
DROP TABLE IF EXISTS federated.countries;
Warnings: Warnings:
Note 1051 Unknown table 'countries' Note 1051 Unknown table 'countries'
CREATE TABLE federated.countries ( `id` int(20) NOT NULL auto_increment, `country` varchar(32), primary key (id)); CREATE TABLE federated.countries (
insert into federated.countries (country) values ('India'); `id` int(20) NOT NULL auto_increment,
insert into federated.countries (country) values ('Germany'); `country` varchar(32),
insert into federated.countries (country) values ('Italy'); PRIMARY KEY (id));
insert into federated.countries (country) values ('Finland'); INSERT INTO federated.countries (country) VALUES ('India');
insert into federated.countries (country) values ('Ukraine'); INSERT INTO federated.countries (country) VALUES ('Germany');
drop table if exists federated.t1; INSERT INTO federated.countries (country) VALUES ('Italy');
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `country_id` int(20) NOT NULL DEFAULT 0, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`), key (country_id) ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; INSERT INTO federated.countries (country) VALUES ('Finland');
insert into federated.t1 (name, country_id, other) values ('Kumar', 1, 11111); INSERT INTO federated.countries (country) VALUES ('Ukraine');
insert into federated.t1 (name, country_id, other) values ('Lenz', 2, 22222); DROP TABLE IF EXISTS federated.t1;
insert into federated.t1 (name, country_id, other) values ('Marizio', 3, 33333); CREATE TABLE federated.t1 (
insert into federated.t1 (name, country_id, other) values ('Monty', 4, 33333); `id` int(20) NOT NULL auto_increment,
insert into federated.t1 (name, country_id, other) values ('Sanja', 5, 33333); `country_id` int(20) NOT NULL DEFAULT 0,
select federated.t1.*, federated.countries.country from federated.t1 left join federated.countries on federated.t1.country_id = federated.countries.id; `name` varchar(32),
`other` varchar(20),
PRIMARY KEY (`id`),
KEY (country_id) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1';
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Kumar', 1, 11111);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Lenz', 2, 22222);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Marizio', 3, 33333);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Monty', 4, 33333);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Sanja', 5, 33333);
SELECT federated.t1.*, federated.countries.country
FROM federated.t1 left join federated.countries
ON federated.t1.country_id = federated.countries.id;
id country_id name other country id country_id name other country
1 1 Kumar 11111 India 1 1 Kumar 11111 India
2 2 Lenz 22222 Germany 2 2 Lenz 22222 Germany
3 3 Marizio 33333 Italy 3 3 Marizio 33333 Italy
4 4 Monty 33333 Finland 4 4 Monty 33333 Finland
5 5 Sanja 33333 Ukraine 5 5 Sanja 33333 Ukraine
drop table federated.countries; DROP TABLE federated.countries;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
drop database if exists federated; DROP DATABASE IF EXISTS federated;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
drop database if exists federated; DROP DATABASE IF EXISTS federated;
...@@ -10,206 +10,304 @@ stop slave; ...@@ -10,206 +10,304 @@ stop slave;
--disable_warnings --disable_warnings
# at this point, we are connected to master # at this point, we are connected to master
drop database if exists federated; DROP DATABASE IF EXISTS federated;
--enable_warnings --enable_warnings
create database federated; CREATE DATABASE federated;
# I wanted to use timestamp, but results will fail if so!!! # I wanted to use timestamp, but results will fail if so!!!
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `other` int(20) NOT NULL default '0', created datetime default '2004-04-04 04:04:04', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `other_key` (`other`)) DEFAULT CHARSET=latin1; CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment,
`name` varchar(32) NOT NULL default '',
`other` int(20) NOT NULL default '0',
`created` datetime default '2004-04-04 04:04:04',
PRIMARY KEY (`id`),
KEY `name` (`name`),
KEY `other_key` (`other`))
DEFAULT CHARSET=latin1;
connection master; connection master;
--disable_warnings --disable_warnings
drop database if exists federated; DROP DATABASE IF EXISTS federated;
--enable_warnings --enable_warnings
create database federated; CREATE DATABASE federated;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL default '', `other` int(20) NOT NULL default '0', created datetime default '2004-04-04 04:04:04', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `other_key` (`other`)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; --replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
insert into federated.t1 (name, other) values ('First Name', 11111); `id` int(20) NOT NULL auto_increment,
insert into federated.t1 (name, other) values ('Second Name', 22222); `name` varchar(32) NOT NULL default '',
insert into federated.t1 (name, other) values ('Third Name', 33333); `other` int(20) NOT NULL default '0',
insert into federated.t1 (name, other) values ('Fourth Name', 44444); `created` datetime default '2004-04-04 04:04:04',
insert into federated.t1 (name, other) values ('Fifth Name', 55555); PRIMARY KEY (`id`),
insert into federated.t1 (name, other) values ('Sixth Name', 66666); KEY `name` (`name`),
insert into federated.t1 (name, other) values ('Seventh Name', 77777); KEY `other_key` (`other`))
insert into federated.t1 (name, other) values ('Eigth Name', 88888); ENGINE="FEDERATED" DEFAULT CHARSET=latin1
insert into federated.t1 (name, other) values ('Ninth Name', 99999); COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
insert into federated.t1 (name, other) values ('Tenth Name', 101010);
INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', 22222);
INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333);
INSERT INTO federated.t1 (name, other) VALUES ('Fourth Name', 44444);
INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555);
INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666);
INSERT INTO federated.t1 (name, other) VALUES ('Seventh Name', 77777);
INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888);
INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999);
INSERT INTO federated.t1 (name, other) VALUES ('Tenth Name', 101010);
# basic select # basic select
select * from federated.t1; SELECT * FROM federated.t1;
# with primary key index_read_idx # with PRIMARY KEY index_read_idx
select * from federated.t1 where id = 5; SELECT * FROM federated.t1 WHERE id = 5;
# with regular key index_read -> index_read_idx # with regular key index_read -> index_read_idx
select * from federated.t1 where name = 'Sixth Name'; SELECT * FROM federated.t1 WHERE name = 'Sixth Name';
# regular and primary key index_read_idx # regular and PRIMARY KEY index_read_idx
select * from federated.t1 where id = 6 and name = 'Sixth Name'; SELECT * FROM federated.t1 WHERE id = 6 and name = 'Sixth Name';
# with regular key index_read -> index_read_idx # with regular key index_read -> index_read_idx
select * from federated.t1 where other = 44444; SELECT * FROM federated.t1 WHERE other = 44444;
select * from federated.t1 where name like '%th%'; SELECT * FROM federated.t1 WHERE name like '%th%';
# update - update_row, index_read_idx # update - update_row, index_read_idx
update federated.t1 set name = '3rd name' where id = 3; UPDATE federated.t1 SET name = '3rd name' WHERE id = 3;
select * from federated.t1 where name = '3rd name'; SELECT * FROM federated.t1 WHERE name = '3rd name';
# update - update_row, index_read -> index_read_idx # update - update_row, index_read -> index_read_idx
update federated.t1 set name = 'Third name' where name = '3rd name'; UPDATE federated.t1 SET name = 'Third name' WHERE name = '3rd name';
select * from federated.t1 where name = 'Third name'; SELECT * FROM federated.t1 WHERE name = 'Third name';
# rnd_post, ::position # rnd_post, ::position
select * from federated.t1 order by id DESC; SELECT * FROM federated.t1 ORDER BY id DESC;
select * from federated.t1 order by name; SELECT * FROM federated.t1 ORDER BY name;
select * from federated.t1 order by name DESC; SELECT * FROM federated.t1 ORDER BY name DESC;
select * from federated.t1 order by name ASC; SELECT * FROM federated.t1 ORDER BY name ASC;
select * from federated.t1 group by other; SELECT * FROM federated.t1 GROUP BY other;
# ::delete_row # ::delete_row
delete from federated.t1 where id = 5; DELETE FROM federated.t1 WHERE id = 5;
select * from federated.t1 where id = 5; SELECT * FROM federated.t1 WHERE id = 5;
# ::delete_all_rows # ::delete_all_rows
delete from federated.t1; DELETE FROM federated.t1;
select * from federated.t1 where id = 5; SELECT * FROM federated.t1 WHERE id = 5;
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`) ); CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment,
`name` varchar(32),
`other` varchar(20),
PRIMARY KEY (`id`) );
connection master; connection master;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`) ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; --replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
insert into federated.t1 (name, other) values ('First Name', 11111); `id` int(20) NOT NULL auto_increment,
insert into federated.t1 (name, other) values ('Second Name', NULL); `name` varchar(32),
insert into federated.t1 (name, other) values ('Third Name', 33333); `other` varchar(20),
insert into federated.t1 (name, other) values (NULL, NULL); PRIMARY KEY (`id`) )
insert into federated.t1 (name, other) values ('Fifth Name', 55555); ENGINE="FEDERATED"
insert into federated.t1 (name, other) values ('Sixth Name', 66666); DEFAULT CHARSET=latin1
insert into federated.t1 (name) values ('Seventh Name'); COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
insert into federated.t1 (name, other) values ('Eigth Name', 88888);
insert into federated.t1 (name, other) values ('Ninth Name', 99999); INSERT INTO federated.t1 (name, other) VALUES ('First Name', 11111);
insert into federated.t1 (other) values ('fee fie foe fum'); INSERT INTO federated.t1 (name, other) VALUES ('Second Name', NULL);
INSERT INTO federated.t1 (name, other) VALUES ('Third Name', 33333);
select * from federated.t1 where other IS NULL; INSERT INTO federated.t1 (name, other) VALUES (NULL, NULL);
select * from federated.t1 where name IS NULL; INSERT INTO federated.t1 (name, other) VALUES ('Fifth Name', 55555);
select * from federated.t1 where name IS NULL and other IS NULL; INSERT INTO federated.t1 (name, other) VALUES ('Sixth Name', 66666);
select * from federated.t1 where name IS NULL or other IS NULL; INSERT INTO federated.t1 (name) VALUES ('Seventh Name');
update federated.t1 set name = 'Fourth Name', other = 'four four four' where name IS NULL and other IS NULL; INSERT INTO federated.t1 (name, other) VALUES ('Eigth Name', 88888);
update federated.t1 set other = 'two two two two' where name = 'Second Name'; INSERT INTO federated.t1 (name, other) VALUES ('Ninth Name', 99999);
update federated.t1 set other = 'seven seven' where name like 'Sec%'; INSERT INTO federated.t1 (other) VALUES ('fee fie foe fum');
update federated.t1 set other = 'seven seven' where name = 'Seventh Name';
update federated.t1 set name = 'Tenth Name' where other like 'fee fie%'; SELECT * FROM federated.t1 WHERE other IS NULL;
select * from federated.t1 where name IS NULL or other IS NULL ; SELECT * FROM federated.t1 WHERE name IS NULL;
select * from federated.t1; SELECT * FROM federated.t1 WHERE name IS NULL and other IS NULL;
SELECT * FROM federated.t1 WHERE name IS NULL or other IS NULL;
UPDATE federated.t1
SET name = 'Fourth Name', other = 'four four four'
WHERE name IS NULL AND other IS NULL;
UPDATE federated.t1 SET other = 'two two two two' WHERE name = 'Second Name';
UPDATE federated.t1 SET other = 'seven seven' WHERE name like 'Sec%';
UPDATE federated.t1 SET other = 'seven seven' WHERE name = 'Seventh Name';
UPDATE federated.t1 SET name = 'Tenth Name' WHERE other like 'fee fie%';
SELECT * FROM federated.t1 WHERE name IS NULL OR other IS NULL ;
SELECT * FROM federated.t1;
# test multi-keys # test multi-keys
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` CREATE TABLE federated.t1 (
varchar(32) NOT NULL DEFAULT '', `other` varchar(20) NOT NULL DEFAULT '', PRIMARY KEY (`id`), key nameoth (name, other) ); `id` int(20) NOT NULL auto_increment,
`name` varchar(32) NOT NULL DEFAULT '',
`other` varchar(20) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY nameoth (name, other) );
connection master; connection master;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `name` varchar(32) NOT NULL DEFAULT '', `other` varchar(20) NOT NULL DEFAULT '', PRIMARY KEY (`id`), key nameoth (name, other)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; --replace_result $SLAVE_MYPORT SLAVE_PORT
insert into federated.t1 (name, other) values ('First Name', '1111'); eval CREATE TABLE federated.t1 (
insert into federated.t1 (name, other) values ('Second Name', '2222'); `id` int(20) NOT NULL auto_increment,
insert into federated.t1 (name, other) values ('Third Name', '3333'); `name` varchar(32) NOT NULL DEFAULT '',
select * from federated.t1 where name = 'Second Name'; `other` varchar(20) NOT NULL DEFAULT '',
select * from federated.t1 where other = '2222'; PRIMARY KEY (`id`),
select * from federated.t1 where name = 'Third Name'; KEY nameoth (name, other))
select * from federated.t1 where name = 'Third Name' and other = '3333'; ENGINE="FEDERATED" DEFAULT
CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
INSERT INTO federated.t1 (name, other) VALUES ('First Name', '1111');
INSERT INTO federated.t1 (name, other) VALUES ('Second Name', '2222');
INSERT INTO federated.t1 (name, other) VALUES ('Third Name', '3333');
SELECT * FROM federated.t1 WHERE name = 'Second Name';
SELECT * FROM federated.t1 WHERE other = '2222';
SELECT * FROM federated.t1 WHERE name = 'Third Name';
SELECT * FROM federated.t1 WHERE name = 'Third Name' AND other = '3333';
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 CREATE TABLE federated.t1 (
(id int NOT NULL auto_increment, `id` int NOT NULL auto_increment,
name char(32) NOT NULL DEFAULT '', `name` char(32) NOT NULL DEFAULT '',
bincol binary(4) NOT NULL, `bincol` binary(4) NOT NULL,
floatval decimal(5,2) NOT NULL DEFAULT 0.0, `floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
other int NOT NULL DEFAULT 0, `other` int NOT NULL DEFAULT 0,
primary key(id), PRIMARY KEY (id),
key nameoth(name, other), KEY nameoth(name, other),
key bincol(bincol), KEY bincol(bincol),
key floatval(floatval)); KEY floatval(floatval));
# test other types of indexes # test other types of indexes
connection master; connection master;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 --replace_result $SLAVE_MYPORT SLAVE_PORT
(id int NOT NULL auto_increment, eval CREATE TABLE federated.t1 (
name char(32) NOT NULL DEFAULT '', `id` int NOT NULL auto_increment,
bincol binary(4) NOT NULL, `name` char(32) NOT NULL DEFAULT '',
floatval decimal(5,2) NOT NULL DEFAULT 0.0, `bincol` binary(4) NOT NULL,
other int NOT NULL DEFAULT 0, `floatval` decimal(5,2) NOT NULL DEFAULT 0.0,
primary key(id), `other` int NOT NULL DEFAULT 0,
key nameoth(name,other), PRIMARY KEY (id),
key bincol(bincol), KEY nameoth(name,other),
key floatval(floatval)) KEY bincol(bincol),
ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; KEY floatval(floatval))
ENGINE="FEDERATED"
insert into federated.t1 (name, bincol, floatval, other) values ('first', 0x65, 11.11, 1111); DEFAULT CHARSET=latin1
insert into federated.t1 (name, bincol, floatval, other) values ('second', 0x66, 22.22, 2222); COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
insert into federated.t1 (name, bincol, floatval, other) values ('third', 'g', 22.22, 2222);
select * from federated.t1; INSERT INTO federated.t1 (name, bincol, floatval, other)
select * from federated.t1 where name = 'second'; VALUES ('first', 0x65, 11.11, 1111);
select * from federated.t1 where bincol= 'f'; INSERT INTO federated.t1 (name, bincol, floatval, other)
select * from federated.t1 where bincol= 0x66; VALUES ('second', 0x66, 22.22, 2222);
select * from federated.t1 where bincol= 0x67; INSERT INTO federated.t1 (name, bincol, floatval, other)
select * from federated.t1 where bincol= 'g'; VALUES ('third', 'g', 22.22, 2222);
select * from federated.t1 where floatval=11.11; SELECT * FROM federated.t1;
select * from federated.t1 where name='third'; SELECT * FROM federated.t1 WHERE name = 'second';
select * from federated.t1 where other=2222; SELECT * FROM federated.t1 WHERE bincol= 'f';
select * from federated.t1 where name='third' and other=2222; SELECT * FROM federated.t1 WHERE bincol= 0x66;
SELECT * FROM federated.t1 WHERE bincol= 0x67;
SELECT * FROM federated.t1 WHERE bincol= 'g';
SELECT * FROM federated.t1 WHERE floatval=11.11;
SELECT * FROM federated.t1 WHERE name='third';
SELECT * FROM federated.t1 WHERE other=2222;
SELECT * FROM federated.t1 WHERE name='third' and other=2222;
# test NULLs # test NULLs
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (id int, name varchar(32), floatval float, other int) DEFAULT CHARSET=latin1; CREATE TABLE federated.t1 (
`id` int,
`name` varchar(32),
`floatval` float,
`other` int)
DEFAULT CHARSET=latin1;
connection master; connection master;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (id int, name varchar(32), floatval float, other int) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; --replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
`id` int,
`name` varchar(32),
`floatval` float,
`other` int)
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
# these both should be the same # these both should be the same
insert into federated.t1 values (NULL, NULL, NULL, NULL); INSERT INTO federated.t1 values (NULL, NULL, NULL, NULL);
insert into federated.t1 values (); INSERT INTO federated.t1 values ();
insert into federated.t1 (id) values (1); INSERT INTO federated.t1 (id) VALUES (1);
insert into federated.t1 (name, floatval, other) values ('foo', 33.33333332, NULL); INSERT INTO federated.t1 (name, floatval, other)
insert into federated.t1 (name, floatval, other) values (0, 00.3333, NULL); VALUES ('foo', 33.33333332, NULL);
select * from federated.t1; INSERT INTO federated.t1 (name, floatval, other)
select count(*) from federated.t1 where id IS NULL and name IS NULL and floatval IS NULL and other IS NULL; VALUES (0, 00.3333, NULL);
SELECT * FROM federated.t1;
SELECT count(*) FROM federated.t1
WHERE id IS NULL
AND name IS NULL
AND floatval IS NULL
AND other IS NULL;
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( blurb_id int NOT NULL DEFAULT 0, blurb text default '', primary key(blurb_id)) DEFAULT CHARSET=latin1; CREATE TABLE federated.t1 (
`blurb_id` int NOT NULL DEFAULT 0,
`blurb` text default '',
PRIMARY KEY (blurb_id))
DEFAULT CHARSET=latin1;
connection master; connection master;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( blurb_id int NOT NULL DEFAULT 0, blurb text default '', primary key(blurb_id)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; --replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
`blurb_id` int NOT NULL DEFAULT 0,
`blurb` text default '',
PRIMARY KEY (blurb_id))
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values."); INSERT INTO federated.t1 VALUES (1, " MySQL supports a number of column types in several categories: numeric types, date and time types, and string (character) types. This chapter first gives an overview of these column types, and then provides a more detailed description of the properties of the types in each category, and a summary of the column type storage requirements. The overview is intentionally brief. The more detailed descriptions should be consulted for additional information about particular column types, such as the allowable formats in which you can specify values.");
INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE."); INSERT INTO federated.t1 VALUES (2, "All arithmetic is done using signed BIGINT or DOUBLE values, so you should not use unsigned big integers larger than 9223372036854775807 (63 bits) except with bit functions! If you do that, some of the last digits in the result may be wrong because of rounding errors when converting a BIGINT value to a DOUBLE.");
INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. "); INSERT INTO federated.t1 VALUES (3, " A floating-point number. p represents the precision. It can be from 0 to 24 for a single-precision floating-point number and from 25 to 53 for a double-precision floating-point number. These types are like the FLOAT and DOUBLE types described immediately following. FLOAT(p) has the same range as the corresponding FLOAT and DOUBLE types, but the display size and number of decimals are undefined. ");
INSERT INTO federated.t1 VALUES(4, "Die bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest fr jemanden, der seine Zielsprache ernst nimmt:"); INSERT INTO federated.t1 VALUES(4, "Die bersetzung einer so umfangreichen technischen Dokumentation wie des MySQL-Referenzhandbuchs ist schon eine besondere Herausforderung. Zumindest fr jemanden, der seine Zielsprache ernst nimmt:");
select * from federated.t1; SELECT * FROM federated.t1;
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (a int not null, b int not null, c int not null, primary key (a),key(b)); CREATE TABLE federated.t1 (
`a` int NOT NULL,
`b` int NOT NULL,
`c` int NOT NULL,
PRIMARY KEY (a),key(b));
connection master; connection master;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; --replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
insert into federated.t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4); `a` int NOT NULL,
explain select * from federated.t1 order by a; `b` int NOT NULL,
explain select * from federated.t1 order by b; `c` int NOT NULL,
explain select * from federated.t1 order by c; PRIMARY KEY (a),
explain select a from federated.t1 order by a; KEY (b))
explain select b from federated.t1 order by b; ENGINE="FEDERATED"
explain select a,b from federated.t1 order by b; DEFAULT CHARSET=latin1
explain select a,b from federated.t1; COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
explain select a,b,c from federated.t1;
INSERT INTO federated.t1 VALUES (3,3,3),(1,1,1),(2,2,2),(4,4,4);
EXPLAIN SELECT * FROM federated.t1 ORDER BY a;
EXPLAIN SELECT * FROM federated.t1 ORDER BY b;
EXPLAIN SELECT * FROM federated.t1 ORDER BY c;
EXPLAIN SELECT a FROM federated.t1 ORDER BY a;
EXPLAIN SELECT b FROM federated.t1 ORDER BY b;
EXPLAIN SELECT a,b FROM federated.t1 ORDER BY b;
EXPLAIN SELECT a,b FROM federated.t1;
EXPLAIN SELECT a,b,c FROM federated.t1;
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 CREATE TABLE federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17
int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
...@@ -336,10 +434,12 @@ int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 ...@@ -336,10 +434,12 @@ int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
int, i999 int, i1000 int, b blob) row_format=dynamic; int, i999 int, i1000 int, b blob) row_format=dynamic;
connection master; connection master;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8 --replace_result $SLAVE_MYPORT SLAVE_PORT
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int, i17 eval CREATE TABLE federated.t1
int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int, (i1 int, i2 int, i3 int, i4 int, i5 int, i6 int, i7 int, i8
int, i9 int, i10 int, i11 int, i12 int, i13 int, i14 int, i15 int, i16 int,
i17 int, i18 int, i19 int, i20 int, i21 int, i22 int, i23 int, i24 int, i25 int,
i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34 i26 int, i27 int, i28 int, i29 int, i30 int, i31 int, i32 int, i33 int, i34
int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int, int, i35 int, i36 int, i37 int, i38 int, i39 int, i40 int, i41 int, i42 int,
i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51 i43 int, i44 int, i45 int, i46 int, i47 int, i48 int, i49 int, i50 int, i51
...@@ -461,8 +561,14 @@ int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974 ...@@ -461,8 +561,14 @@ int, i967 int, i968 int, i969 int, i970 int, i971 int, i972 int, i973 int, i974
int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982 int, i975 int, i976 int, i977 int, i978 int, i979 int, i980 int, i981 int, i982
int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990 int, i983 int, i984 int, i985 int, i986 int, i987 int, i988 int, i989 int, i990
int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998 int, i991 int, i992 int, i993 int, i994 int, i995 int, i996 int, i997 int, i998
int, i999 int, i1000 int, b blob) row_format=dynamic ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; int, i999 int, i1000 int, b blob)
insert into federated.t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, row_format=dynamic
ENGINE="FEDERATED"
DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
INSERT INTO federated.t1
values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
...@@ -501,38 +607,54 @@ insert into federated.t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...@@ -501,38 +607,54 @@ insert into federated.t1 values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "PatrickG"); 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, "PatrickG");
update federated.t1 set b=repeat('a',256); UPDATE federated.t1 SET b=repeat('a',256);
update federated.t1 set i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0, i10=0; UPDATE federated.t1 SET i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0, i9=0, i10=0;
select * from federated.t1 where i9=0 and i10=0; SELECT * FROM federated.t1 WHERE i9=0 and i10=0;
update federated.t1 set i50=20; UPDATE federated.t1 SET i50=20;
select * from federated.t1; SELECT * FROM federated.t1;
delete from federated.t1 where i51=20; DELETE FROM federated.t1 WHERE i51=20;
select * from federated.t1; SELECT * FROM federated.t1;
delete from federated.t1 where i50=20; DELETE FROM federated.t1 WHERE i50=20;
select * from federated.t1; SELECT * FROM federated.t1;
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob NOT NULL, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', primary key(id), index(code), index(fileguts(10))) DEFAULT CHARSET=latin1; CREATE TABLE federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob NOT NULL, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', PRIMARY KEY(id), index(code), index(fileguts(10))) DEFAULT CHARSET=latin1;
connection master; connection master;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
create table federated.t1 (id int NOT NULL auto_increment, code char(20) NOT NULL, fileguts blob NOT NULL, creation_date datetime, entered_time datetime default '2004-04-04 04:04:04', primary key(id), index(code), index(fileguts(10))) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; --replace_result $SLAVE_MYPORT SLAVE_PORT
insert into federated.t1 (code, fileguts, creation_date) values ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03'); eval CREATE TABLE federated.t1 (
insert into federated.t1 (code, fileguts, creation_date) values ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04'); id int NOT NULL auto_increment,
insert into federated.t1 (code, fileguts, creation_date) values ('DEUEUEUEUEUEUEUEUEU', 'jimbob', '2004-04-04 04:04:04'); code char(20) NOT NULL,
select * from federated.t1; fileguts blob NOT NULL,
creation_date datetime,
entered_time datetime default '2004-04-04 04:04:04',
PRIMARY KEY(id),
index(code),
index(fileguts(10)))
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('ASDFWERQWETWETAWETA', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2003-03-03 03:03:03');
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', '*()w*09*$()*#)(*09*^90*d)(*s()d8g)(s*ned)(*)(s*d)(*hn(d*)(*sbn)D((#$*(#*%%&#&^$#&#&#&#&^&#*&*#$*&^*(&#(&Q*&&(*!&!(*&*(#&*(%&#<S-F8>*<S-F8><S-F8><S-F8>#<S-F8>#<S-F8>#<S-F8>[[', '2004-04-04 04:04:04');
INSERT INTO federated.t1 (code, fileguts, creation_date) VALUES ('DEUEUEUEUEUEUEUEUEU', 'jimbob', '2004-04-04 04:04:04');
SELECT * FROM federated.t1;
# test blob indexes # test blob indexes
select * from federated.t1 where fileguts = 'jimbob'; SELECT * FROM federated.t1 WHERE fileguts = 'jimbob';
# test blob with binary # test blob with binary
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (a BLOB); CREATE TABLE federated.t1 (`a` BLOB);
connection master; connection master;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 (a BLOB) ENGINE="FEDERATED" COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; --replace_result $SLAVE_MYPORT SLAVE_PORT
eval CREATE TABLE federated.t1 (
`a` BLOB)
ENGINE="FEDERATED"
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
INSERT INTO federated.t1 VALUES (0x00); INSERT INTO federated.t1 VALUES (0x00);
INSERT INTO federated.t1 VALUES (0x0001); INSERT INTO federated.t1 VALUES (0x0001);
INSERT INTO federated.t1 VALUES (0x0100); INSERT INTO federated.t1 VALUES (0x0100);
...@@ -541,66 +663,89 @@ SELECT HEX(a) FROM federated.t1; ...@@ -541,66 +663,89 @@ SELECT HEX(a) FROM federated.t1;
# TODO # TODO
# #
# create table federated.t1 (a char(20)) charset=cp1251 ENGINE="FEDERATED" COMMENT="mysql://root@127.0.0.1:9308/federated/t1"; # CREATE TABLE federated.t1
# (a char(20)) charset=cp1251
# ENGINE="FEDERATED" COMMENT="mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1";
# #
# connection slave; # connection slave;
# drop table if exists federated.t1; # DROP TABLE IF EXISTS federated.t1;
# create table federated.t1 (a char(20)) charset=cp1251; # CREATE TABLE federated.t1 (a char(20)) charset=cp1251;
# #
# connection master; # connection master;
# insert into federated.t1 values (_cp1251'À-ÁÂÃ-1'); # INSERT INTO federated.t1 values (_cp1251'--1');
# insert into federated.t1 values (_cp1251'Á-ÂÃÄ-2'); # INSERT INTO federated.t1 values (_cp1251'--2');
# set names cp1251; # SET names cp1251;
# insert into federated.t1 values ('Â-ÃÄÅ-3'); # INSERT INTO federated.t1 values ('--3');
# insert into federated.t1 values ('Ã-ŨÆ-4'); # INSERT INTO federated.t1 values ('-Ũ-4');
# select * from federated.t1; # SELECT * FROM federated.t1;
# select hex(a) from federated.t1; # select hex(a) from federated.t1;
# select hex(a) from federated.t1 order by a desc; # select hex(a) from federated.t1 ORDER BY a desc;
# update federated.t1 set a='À-ÁÂÃ-1íîâûé' where a='À-ÁÂÃ-1'; # update federated.t1 SET a='--1' WHERE a='--1';
# select * from federated.t1; # SELECT * FROM federated.t1;
# delete from federated.t1 where a='Ã-ŨÆ-4'; # DELETE FROM federated.t1 WHERE a='-Ũ-4';
# select * from federated.t1; # SELECT * FROM federated.t1;
# delete from federated.t1 where a>'Â-'; # DELETE FROM federated.t1 WHERE a>'-';
# select * from federated.t1; # SELECT * FROM federated.t1;
# set names default; # SET names default;
# #
# drop table if exists federated.t1; # DROP TABLE IF EXISTS federated.t1;
# #
# test joins with non-federated table # test joins with non-federated table
connection slave; connection slave;
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `country_id` int(20) NOT NULL DEFAULT 0, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`), key (country_id)); CREATE TABLE federated.t1 (
`id` int(20) NOT NULL auto_increment,
`country_id` int(20) NOT NULL DEFAULT 0,
`name` varchar(32),
`other` varchar(20),
PRIMARY KEY (`id`),
key (country_id));
connection master; connection master;
drop table if exists federated.countries; DROP TABLE IF EXISTS federated.countries;
CREATE TABLE federated.countries ( `id` int(20) NOT NULL auto_increment, `country` varchar(32), primary key (id)); CREATE TABLE federated.countries (
insert into federated.countries (country) values ('India'); `id` int(20) NOT NULL auto_increment,
insert into federated.countries (country) values ('Germany'); `country` varchar(32),
insert into federated.countries (country) values ('Italy'); PRIMARY KEY (id));
insert into federated.countries (country) values ('Finland'); INSERT INTO federated.countries (country) VALUES ('India');
insert into federated.countries (country) values ('Ukraine'); INSERT INTO federated.countries (country) VALUES ('Germany');
INSERT INTO federated.countries (country) VALUES ('Italy');
drop table if exists federated.t1; INSERT INTO federated.countries (country) VALUES ('Finland');
CREATE TABLE federated.t1 ( `id` int(20) NOT NULL auto_increment, `country_id` int(20) NOT NULL DEFAULT 0, `name` varchar(32), `other` varchar(20), PRIMARY KEY (`id`), key (country_id) ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 COMMENT='mysql://root@127.0.0.1:9308/federated/t1'; INSERT INTO federated.countries (country) VALUES ('Ukraine');
insert into federated.t1 (name, country_id, other) values ('Kumar', 1, 11111);
insert into federated.t1 (name, country_id, other) values ('Lenz', 2, 22222); DROP TABLE IF EXISTS federated.t1;
insert into federated.t1 (name, country_id, other) values ('Marizio', 3, 33333); --replace_result $SLAVE_MYPORT SLAVE_PORT
insert into federated.t1 (name, country_id, other) values ('Monty', 4, 33333); eval CREATE TABLE federated.t1 (
insert into federated.t1 (name, country_id, other) values ('Sanja', 5, 33333); `id` int(20) NOT NULL auto_increment,
`country_id` int(20) NOT NULL DEFAULT 0,
select federated.t1.*, federated.countries.country from federated.t1 left join federated.countries on federated.t1.country_id = federated.countries.id; `name` varchar(32),
`other` varchar(20),
drop table federated.countries; PRIMARY KEY (`id`),
KEY (country_id) )
ENGINE="FEDERATED" DEFAULT CHARSET=latin1
COMMENT='mysql://root@127.0.0.1:$SLAVE_MYPORT/federated/t1';
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Kumar', 1, 11111);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Lenz', 2, 22222);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Marizio', 3, 33333);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Monty', 4, 33333);
INSERT INTO federated.t1 (name, country_id, other) VALUES ('Sanja', 5, 33333);
SELECT federated.t1.*, federated.countries.country
FROM federated.t1 left join federated.countries
ON federated.t1.country_id = federated.countries.id;
DROP TABLE federated.countries;
connection master; connection master;
--disable_warnings --disable_warnings
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
drop database if exists federated; DROP DATABASE IF EXISTS federated;
--enable_warnings --enable_warnings
connection slave; connection slave;
--disable_warnings --disable_warnings
drop table if exists federated.t1; DROP TABLE IF EXISTS federated.t1;
drop database if exists federated; DROP DATABASE IF EXISTS federated;
--enable_warnings --enable_warnings
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
ha_federated.cc - MySQL Federated Storage Engine ha_federated.cc - MySQL Federated Storage Engine
Patrick Galbraith and Brian Aker, 2004 Patrick Galbraith and Brian Aker, 2004
This is a handler which uses a remote database as the data file, as This is a handler which uses a foreign database as the data file, as
opposed to a handler like MyISAM, which uses .MYD files locally. opposed to a handler like MyISAM, which uses .MYD files locally.
How this handler works How this handler works
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
be stored in this format to write to this data file. be stored in this format to write to this data file.
With MySQL Federated storage engine, there will be no local files for each With MySQL Federated storage engine, there will be no local files for each
table's data (such as .MYD). A remote database will store the data that would table's data (such as .MYD). A foreign database will store the data that would
normally be in this file. This will necessitate the use of MySQL client API normally be in this file. This will necessitate the use of MySQL client API
to read, delete, update, insert this data. The data will have to be retrieve to read, delete, update, insert this data. The data will have to be retrieve
via an SQL call "SELECT * FROM users". Then, to read this data, it will have via an SQL call "SELECT * FROM users". Then, to read this data, it will have
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
This comment connection string is necessary for the handler to be This comment connection string is necessary for the handler to be
able to connect to the remote server. able to connect to the foreign server.
The basic flow is this: The basic flow is this:
...@@ -66,13 +66,13 @@ ...@@ -66,13 +66,13 @@
SQL calls issues locally -> SQL calls issues locally ->
mysql handler API (data in handler format) -> mysql handler API (data in handler format) ->
mysql client API (data converted to SQL calls) -> mysql client API (data converted to SQL calls) ->
remote database -> mysql client API -> foreign database -> mysql client API ->
convert result sets (if any) to handler format -> convert result sets (if any) to handler format ->
handler API -> results or rows affected to local handler API -> results or rows affected to local
What this handler does and doesn't support What this handler does and doesn't support
------------------------------------------ ------------------------------------------
* Tables MUST be created on the remote server prior to any action on those * Tables MUST be created on the foreign server prior to any action on those
tables via the handler, first version. IMPORTANT: IF you MUST use the tables via the handler, first version. IMPORTANT: IF you MUST use the
federated storage engine type on the REMOTE end, MAKE SURE [ :) ] That federated storage engine type on the REMOTE end, MAKE SURE [ :) ] That
the table you connect to IS NOT a table pointing BACK to your ORIGNAL the table you connect to IS NOT a table pointing BACK to your ORIGNAL
...@@ -80,11 +80,11 @@ ...@@ -80,11 +80,11 @@
know putting two mirror in front of each other how the reflection know putting two mirror in front of each other how the reflection
continues for eternity? Well, need I say more?! continues for eternity? Well, need I say more?!
* There will not be support for transactions. * There will not be support for transactions.
* There is no way for the handler to know if the database on the remote end * There is no way for the handler to know if the foreign database or table
has changed. The reason for this is that this database has to work like a has changed. The reason for this is that this database has to work like a
data file that would never be written to by anything other than the data file that would never be written to by anything other than the
database. The integrity of the data in the local table could be breached database. The integrity of the data in the local table could be breached
if there was any change to the remote database. if there was any change to the foreign database.
* Support for SELECT, INSERT, UPDATE , DELETE, indexes. * Support for SELECT, INSERT, UPDATE , DELETE, indexes.
* No ALTER TABLE, DROP TABLE or any other Data Definition Language calls. * No ALTER TABLE, DROP TABLE or any other Data Definition Language calls.
* Prepared statements will not be used in the first implementation, it * Prepared statements will not be used in the first implementation, it
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
have two databases running, either both on the same host, or have two databases running, either both on the same host, or
on different hosts. on different hosts.
One the server that will be connecting to the remote One the server that will be connecting to the foreign
host (client), you create your table as such: host (client), you create your table as such:
CREATE TABLE test_table ( CREATE TABLE test_table (
...@@ -183,15 +183,15 @@ ...@@ -183,15 +183,15 @@
COMMENT='root@127.0.0.1:9306/federated/test_federated'; COMMENT='root@127.0.0.1:9306/federated/test_federated';
Notice the "COMMENT" and "ENGINE" field? This is where you Notice the "COMMENT" and "ENGINE" field? This is where you
respectively set the engine type, "FEDERATED" and remote respectively set the engine type, "FEDERATED" and foreign
host information, this being the database your 'client' database host information, this being the database your 'client' database
will connect to and use as the "data file". Obviously, the remote will connect to and use as the "data file". Obviously, the foreign
database is running on port 9306, so you want to start up your other database is running on port 9306, so you want to start up your other
database so that it is indeed on port 9306, and your federated database so that it is indeed on port 9306, and your federated
database on a port other than that. In my setup, I use port 5554 database on a port other than that. In my setup, I use port 5554
for federated, and port 5555 for the remote. for federated, and port 5555 for the foreign database.
Then, on the remote database: Then, on the foreign database:
CREATE TABLE test_table ( CREATE TABLE test_table (
id int(20) NOT NULL auto_increment, id int(20) NOT NULL auto_increment,
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
diretory I specified in the build with --prefix, diretory I specified in the build with --prefix,
"/home/mysql/mysql-build/federated". "/home/mysql/mysql-build/federated".
Then, I started the remote server: Then, I started the foreign server:
/usr/local/mysql/bin/mysqld_safe /usr/local/mysql/bin/mysqld_safe
--user=mysql --log=/tmp/mysqld.5555.log -P 5555 --user=mysql --log=/tmp/mysqld.5555.log -P 5555
...@@ -238,16 +238,16 @@ ...@@ -238,16 +238,16 @@
Next, I open several windows for each: Next, I open several windows for each:
1. Tail the debug trace: tail -f /tmp/mysqld.trace|grep ha_fed 1. Tail the debug trace: tail -f /tmp/mysqld.trace|grep ha_fed
2. Tail the SQL calls to the remote database: tail -f /tmp/mysqld.5555.log 2. Tail the SQL calls to the foreign database: tail -f /tmp/mysqld.5555.log
3. A window with a client open to the federated server on port 5554 3. A window with a client open to the federated server on port 5554
4. A window with a client open to the federated server on port 5555 4. A window with a client open to the federated server on port 5555
I would create a table on the client to the remote server on port I would create a table on the client to the foreign server on port
5555, and then to the federated server on port 5554. At this point, 5555, and then to the federated server on port 5554. At this point,
I would run whatever queries I wanted to on the federated server, I would run whatever queries I wanted to on the federated server,
just always remembering that whatever changes I wanted to make on just always remembering that whatever changes I wanted to make on
the table, or if I created new tables, that I would have to do that the table, or if I created new tables, that I would have to do that
on the remote server. on the foreign server.
Another thing to look for is 'show variables' to show you that you have Another thing to look for is 'show variables' to show you that you have
support for federated handler support: support for federated handler support:
...@@ -359,12 +359,11 @@ static HASH federated_open_tables; // Hash used to track open ...@@ -359,12 +359,11 @@ static HASH federated_open_tables; // Hash used to track open
// tables // tables
pthread_mutex_t federated_mutex; // This is the mutex we use to pthread_mutex_t federated_mutex; // This is the mutex we use to
// init the hash // init the hash
static int federated_init= 0; // Variable for checking the static int federated_init= FALSE; // Variable for checking the
// init state of hash // init state of hash
/* /* Function we use in the creation of our hash to get key. */
Function we use in the creation of our hash to get key.
*/
static byte *federated_get_key(FEDERATED_SHARE *share, uint *length, static byte *federated_get_key(FEDERATED_SHARE *share, uint *length,
my_bool not_used __attribute__ ((unused))) my_bool not_used __attribute__ ((unused)))
{ {
...@@ -426,7 +425,7 @@ bool federated_db_end() ...@@ -426,7 +425,7 @@ bool federated_db_end()
DESCRIPTION DESCRIPTION
populates the share with information about the connection populates the share with information about the connection
to the remote database that will serve as the data source. to the foreign database that will serve as the data source.
This string must be specified (currently) in the "comment" field, This string must be specified (currently) in the "comment" field,
listed in the CREATE TABLE statement. listed in the CREATE TABLE statement.
...@@ -451,26 +450,25 @@ bool federated_db_end() ...@@ -451,26 +450,25 @@ bool federated_db_end()
1 failure, wrong string format 1 failure, wrong string format
*/ */
static int parse_url(FEDERATED_SHARE *share, TABLE *table, static int parse_url(FEDERATED_SHARE *share, TABLE *table,
uint table_create_flag) uint table_create_flag)
{ {
DBUG_ENTER("ha_federated::parse_url"); DBUG_ENTER("ha_federated::parse_url");
share->port= 0; share->port= 0;
uint error_num= table_create_flag ? ER_CANT_CREATE_TABLE : uint error_num= (table_create_flag ? ER_CANT_CREATE_TABLE :
ER_CONNECT_TO_MASTER; ER_CONNECT_TO_MASTER);
share->scheme= my_strdup(table->s->comment, MYF(0)); share->scheme= my_strdup(table->s->comment, MYF(0));
if ((share->username= strstr(share->scheme, "://"))) if ((share->username= strstr(share->scheme, "://")))
{ {
share->scheme[share->username - share->scheme]= '\0'; share->scheme[share->username - share->scheme]= '\0';
if (strcmp(share->scheme, "mysql") != 0) if (strcmp(share->scheme, "mysql") != 0)
{ goto error;
my_error(error_num, MYF(0),
"ERROR: federated handler only supports remote 'mysql://' database");
DBUG_RETURN(1);
}
share->username+= 3; share->username+= 3;
if ((share->hostname= strchr(share->username, '@'))) if ((share->hostname= strchr(share->username, '@')))
...@@ -483,15 +481,9 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -483,15 +481,9 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
share->username[share->password - share->username]= '\0'; share->username[share->password - share->username]= '\0';
share->password++; share->password++;
share->username= share->username; share->username= share->username;
/* /* make sure there isn't an extra / or @ */
make sure there isn't an extra / or @
*/
if ((strchr(share->password, '/') || strchr(share->hostname, '@'))) if ((strchr(share->password, '/') || strchr(share->hostname, '@')))
{ goto error;
my_error(error_num, MYF(0),
"this connection string is not in the correct format!!!\n");
DBUG_RETURN(1);
}
/* /*
Found that if the string is: Found that if the string is:
user:@hostname:port/database/table user:@hostname:port/database/table
...@@ -503,15 +495,9 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -503,15 +495,9 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
else else
share->username= share->username; share->username= share->username;
/* /* make sure there isn't an extra / or @ */
make sure there isn't an extra / or @
*/
if ((strchr(share->username, '/')) || (strchr(share->hostname, '@'))) if ((strchr(share->username, '/')) || (strchr(share->hostname, '@')))
{ goto error;
my_error(error_num, MYF(0),
"this connection string is not in the correct format!!!\n");
DBUG_RETURN(1);
}
if ((share->database= strchr(share->hostname, '/'))) if ((share->database= strchr(share->hostname, '/')))
{ {
...@@ -534,27 +520,14 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -534,27 +520,14 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
share->table_base_name++; share->table_base_name++;
} }
else else
{ goto error;
my_error(error_num, MYF(0),
"this connection string is not in the correct format!!!\n");
DBUG_RETURN(1);
}
} }
else else
{ goto error;
my_error(error_num, MYF(0), /* make sure there's not an extra / */
"this connection string is not in the correct format!!!\n");
DBUG_RETURN(1);
}
/*
make sure there's not an extra /
*/
if ((strchr(share->table_base_name, '/'))) if ((strchr(share->table_base_name, '/')))
{ goto error;
my_error(error_num, MYF(0),
"this connection string is not in the correct format!!!\n");
DBUG_RETURN(1);
}
if (share->hostname[0] == '\0') if (share->hostname[0] == '\0')
share->hostname= NULL; share->hostname= NULL;
...@@ -574,19 +547,18 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -574,19 +547,18 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
share->table_base_name)); share->table_base_name));
} }
else else
{ goto error;
my_error(error_num, MYF(0),
"this connection string is not in the correct format!!!\n");
DBUG_RETURN(1);
}
} }
else else
{ goto error;
DBUG_RETURN(0);
error:
my_error(error_num, MYF(0), my_error(error_num, MYF(0),
"this connection string is not in the correct format!!!\n"); "this connection string is not in the correct format!\n");
DBUG_RETURN(1); DBUG_RETURN(1);
}
DBUG_RETURN(0);
} }
/* /*
...@@ -607,6 +579,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, ...@@ -607,6 +579,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
RETURN VALUE RETURN VALUE
0 After fields have had field values stored from record 0 After fields have had field values stored from record
*/ */
uint ha_federated::convert_row_to_internal_format(byte *record, MYSQL_ROW row) uint ha_federated::convert_row_to_internal_format(byte *record, MYSQL_ROW row)
{ {
ulong *lengths; ulong *lengths;
...@@ -631,6 +604,28 @@ uint ha_federated::convert_row_to_internal_format(byte *record, MYSQL_ROW row) ...@@ -631,6 +604,28 @@ uint ha_federated::convert_row_to_internal_format(byte *record, MYSQL_ROW row)
DBUG_RETURN(0); DBUG_RETURN(0);
} }
/*
Create a WHERE clause based off of values in keys
Note: This code was inspired by key_copy from key.cc
SYNOPSIS
create_where_from_key ()
to String object to store WHERE clause
key_info KEY struct pointer
key byte pointer containing key
key_length length of key
DESCRIPTION
Using iteration through all the keys via a KEY_PART_INFO pointer,
This method 'extracts' the value of each key in the byte pointer
*key, and for each key found, constructs an appropriate WHERE clause
RETURN VALUE
0 After all keys have been accounted for to create the WHERE clause
1 No keys found
*/
bool ha_federated::create_where_from_key(String *to, KEY *key_info, bool ha_federated::create_where_from_key(String *to, KEY *key_info,
const byte *key, uint key_length) const byte *key, uint key_length)
{ {
...@@ -644,9 +639,6 @@ bool ha_federated::create_where_from_key(String *to, KEY *key_info, ...@@ -644,9 +639,6 @@ bool ha_federated::create_where_from_key(String *to, KEY *key_info,
{ {
Field *field= key_part->field; Field *field= key_part->field;
needs_quotes= field->needs_quotes(); needs_quotes= field->needs_quotes();
//bool needs_quotes= type_quote(field->type());
DBUG_PRINT("ha_federated::create_where_from_key",
("key name %s type %d", field->field_name, field->type()));
uint length= key_part->length; uint length= key_part->length;
if (second_loop++ && to->append(" AND ", 5)) if (second_loop++ && to->append(" AND ", 5))
...@@ -675,7 +667,7 @@ bool ha_federated::create_where_from_key(String *to, KEY *key_info, ...@@ -675,7 +667,7 @@ bool ha_federated::create_where_from_key(String *to, KEY *key_info,
DBUG_RETURN(1); DBUG_RETURN(1);
if (key_part->type == HA_KEYTYPE_BIT) if (key_part->type == HA_KEYTYPE_BIT)
{ {
/* This is can be threated as a hex string */ /* This is can be treated as a hex string */
Field_bit *field= (Field_bit *) (key_part->field); Field_bit *field= (Field_bit *) (key_part->field);
char buff[64 + 2], *ptr; char buff[64 + 2], *ptr;
byte *end= (byte*)(key)+length; byte *end= (byte*)(key)+length;
...@@ -757,6 +749,7 @@ bool ha_federated::create_where_from_key(String *to, KEY *key_info, ...@@ -757,6 +749,7 @@ bool ha_federated::create_where_from_key(String *to, KEY *key_info,
pass to each federated handler. Do you have to have one of these? Well, you pass to each federated handler. Do you have to have one of these? Well, you
have pieces that are used for locking, and they are needed to function. have pieces that are used for locking, and they are needed to function.
*/ */
static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table) static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
{ {
FEDERATED_SHARE *share; FEDERATED_SHARE *share;
...@@ -767,10 +760,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table) ...@@ -767,10 +760,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
uint table_name_length, table_base_name_length; uint table_name_length, table_base_name_length;
char *tmp_table_name, *tmp_table_base_name, *table_base_name, *select_query; char *tmp_table_name, *tmp_table_base_name, *table_base_name, *select_query;
/* /* share->table_name has the file location - we want the table's name! */
share->table_name has the file location - we want the actual table's
name!
*/
table_base_name= (char*) table->s->table_name; table_base_name= (char*) table->s->table_name;
DBUG_PRINT("ha_federated::get_share", ("table_name %s", table_base_name)); DBUG_PRINT("ha_federated::get_share", ("table_name %s", table_base_name));
/* /*
...@@ -842,6 +832,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table) ...@@ -842,6 +832,7 @@ static FEDERATED_SHARE *get_share(const char *table_name, TABLE *table)
If the table had the last reference to the share then we If the table had the last reference to the share then we
free memory associated with it. free memory associated with it.
*/ */
static int free_share(FEDERATED_SHARE *share) static int free_share(FEDERATED_SHARE *share)
{ {
pthread_mutex_lock(&federated_mutex); pthread_mutex_lock(&federated_mutex);
...@@ -868,6 +859,7 @@ static int free_share(FEDERATED_SHARE *share) ...@@ -868,6 +859,7 @@ static int free_share(FEDERATED_SHARE *share)
also used by the default rename_table and delete_table method also used by the default rename_table and delete_table method
in handler.cc. in handler.cc.
*/ */
const char **ha_federated::bas_ext() const const char **ha_federated::bas_ext() const
{ {
static const char *ext[]= static const char *ext[]=
...@@ -888,16 +880,17 @@ const char **ha_federated::bas_ext() const ...@@ -888,16 +880,17 @@ const char **ha_federated::bas_ext() const
all tables by calling ha_open() which then calls the handler all tables by calling ha_open() which then calls the handler
specific open(). specific open().
*/ */
int ha_federated::open(const char *name, int mode, uint test_if_locked) int ha_federated::open(const char *name, int mode, uint test_if_locked)
{ {
DBUG_ENTER("ha_federated::open");
int rc; int rc;
DBUG_ENTER("ha_federated::open");
if (!(share= get_share(name, table))) if (!(share= get_share(name, table)))
DBUG_RETURN(1); DBUG_RETURN(1);
thr_lock_data_init(&share->lock, &lock, NULL); thr_lock_data_init(&share->lock, &lock, NULL);
/* Connect to remote database mysql_real_connect() */ /* Connect to foreign database mysql_real_connect() */
mysql= mysql_init(0); mysql= mysql_init(0);
DBUG_PRINT("ha_federated::open", ("hostname %s", share->hostname)); DBUG_PRINT("ha_federated::open", ("hostname %s", share->hostname));
DBUG_PRINT("ha_federated::open", ("username %s", share->username)); DBUG_PRINT("ha_federated::open", ("username %s", share->username));
...@@ -929,6 +922,7 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked) ...@@ -929,6 +922,7 @@ int ha_federated::open(const char *name, int mode, uint test_if_locked)
myisam table. myisam table.
For sql_base.cc look at close_data_tables(). For sql_base.cc look at close_data_tables().
*/ */
int ha_federated::close(void) int ha_federated::close(void)
{ {
DBUG_ENTER("ha_federated::close"); DBUG_ENTER("ha_federated::close");
...@@ -965,6 +959,7 @@ int ha_federated::close(void) ...@@ -965,6 +959,7 @@ int ha_federated::close(void)
1 if NULL 1 if NULL
0 otherwise 0 otherwise
*/ */
inline uint field_in_record_is_null(TABLE *table, inline uint field_in_record_is_null(TABLE *table,
Field *field, Field *field,
char *record) char *record)
...@@ -996,6 +991,7 @@ inline uint field_in_record_is_null(TABLE *table, ...@@ -996,6 +991,7 @@ inline uint field_in_record_is_null(TABLE *table,
Called from item_sum.cc, item_sum.cc, sql_acl.cc, sql_insert.cc, Called from item_sum.cc, item_sum.cc, sql_acl.cc, sql_insert.cc,
sql_insert.cc, sql_select.cc, sql_table.cc, sql_udf.cc, and sql_update.cc. sql_insert.cc, sql_select.cc, sql_table.cc, sql_udf.cc, and sql_update.cc.
*/ */
int ha_federated::write_row(byte *buf) int ha_federated::write_row(byte *buf)
{ {
uint x= 0, num_fields= 0; uint x= 0, num_fields= 0;
...@@ -1027,7 +1023,7 @@ int ha_federated::write_row(byte *buf) ...@@ -1027,7 +1023,7 @@ int ha_federated::write_row(byte *buf)
/* /*
get the current query id - the fields that we add to the insert get the current query id - the fields that we add to the insert
statement to send to the remote will not be appended unless they match statement to send to the foreign will not be appended unless they match
this query id this query id
*/ */
current_query_id= table->in_use->query_id; current_query_id= table->in_use->query_id;
...@@ -1154,6 +1150,7 @@ int ha_federated::write_row(byte *buf) ...@@ -1154,6 +1150,7 @@ int ha_federated::write_row(byte *buf)
Called from sql_select.cc, sql_acl.cc, sql_update.cc, and sql_insert.cc. Called from sql_select.cc, sql_acl.cc, sql_update.cc, and sql_insert.cc.
*/ */
int ha_federated::update_row(const byte *old_data, byte *new_data) int ha_federated::update_row(const byte *old_data, byte *new_data)
{ {
uint x= 0; uint x= 0;
...@@ -1162,9 +1159,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data) ...@@ -1162,9 +1159,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
char old_field_value_buffer[IO_SIZE], new_field_value_buffer[IO_SIZE]; char old_field_value_buffer[IO_SIZE], new_field_value_buffer[IO_SIZE];
char update_buffer[IO_SIZE], where_buffer[IO_SIZE]; char update_buffer[IO_SIZE], where_buffer[IO_SIZE];
/* /* stores the value to be replaced of the field were are updating */
stores the value to be replaced of the field were are updating
*/
String old_field_value(old_field_value_buffer, sizeof(old_field_value_buffer), String old_field_value(old_field_value_buffer, sizeof(old_field_value_buffer),
&my_charset_bin); &my_charset_bin);
old_field_value.length(0); old_field_value.length(0);
...@@ -1182,7 +1177,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data) ...@@ -1182,7 +1177,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
DBUG_ENTER("ha_federated::update_row"); DBUG_ENTER("ha_federated::update_row");
has_a_primary_key= table->s->primary_key == 0 ? 1 : 0; has_a_primary_key= (table->s->primary_key == 0 ? 1 : 0);
primary_key_field_num= has_a_primary_key ? primary_key_field_num= has_a_primary_key ?
table->key_info[table->s->primary_key].key_part->fieldnr - 1 : -1; table->key_info[table->s->primary_key].key_part->fieldnr - 1 : -1;
if (has_a_primary_key) if (has_a_primary_key)
...@@ -1226,7 +1221,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data) ...@@ -1226,7 +1221,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
new_field_value.append("NULL"); new_field_value.append("NULL");
else else
{ {
// otherwise = /* otherwise = */
(*field)->val_str(&new_field_value); (*field)->val_str(&new_field_value);
(*field)->quote_data(&new_field_value); (*field)->quote_data(&new_field_value);
...@@ -1303,6 +1298,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data) ...@@ -1303,6 +1298,7 @@ int ha_federated::update_row(const byte *old_data, byte *new_data)
it is used for removing duplicates while in insert it is used for REPLACE it is used for removing duplicates while in insert it is used for REPLACE
calls. calls.
*/ */
int ha_federated::delete_row(const byte *buf) int ha_federated::delete_row(const byte *buf)
{ {
uint x= 0; uint x= 0;
...@@ -1362,6 +1358,7 @@ int ha_federated::delete_row(const byte *buf) ...@@ -1362,6 +1358,7 @@ int ha_federated::delete_row(const byte *buf)
index. This method, which is called in the case of an SQL statement having index. This method, which is called in the case of an SQL statement having
a WHERE clause on a non-primary key index, simply calls index_read_idx. a WHERE clause on a non-primary key index, simply calls index_read_idx.
*/ */
int ha_federated::index_read(byte *buf, const byte *key, int ha_federated::index_read(byte *buf, const byte *key,
uint key_len __attribute__ ((unused)), uint key_len __attribute__ ((unused)),
enum ha_rkey_function find_flag enum ha_rkey_function find_flag
...@@ -1380,6 +1377,7 @@ int ha_federated::index_read(byte *buf, const byte *key, ...@@ -1380,6 +1377,7 @@ int ha_federated::index_read(byte *buf, const byte *key,
a regular non-primary key index, OR is called DIRECTLY when the WHERE clause a regular non-primary key index, OR is called DIRECTLY when the WHERE clause
uses a PRIMARY KEY index. uses a PRIMARY KEY index.
*/ */
int ha_federated::index_read_idx(byte *buf, uint index, const byte *key, int ha_federated::index_read_idx(byte *buf, uint index, const byte *key,
uint key_len __attribute__ ((unused)), uint key_len __attribute__ ((unused)),
enum ha_rkey_function find_flag enum ha_rkey_function find_flag
...@@ -1443,9 +1441,7 @@ int ha_federated::index_read_idx(byte *buf, uint index, const byte *key, ...@@ -1443,9 +1441,7 @@ int ha_federated::index_read_idx(byte *buf, uint index, const byte *key,
DBUG_RETURN(rnd_next(buf)); DBUG_RETURN(rnd_next(buf));
} }
/* /* Initialized at each key walk (called multiple times unlike rnd_init()) */
Initialized at each key walk (called multiple times unlike ::rnd_init())
*/
int ha_federated::index_init(uint keynr) int ha_federated::index_init(uint keynr)
{ {
int error; int error;
...@@ -1456,9 +1452,7 @@ int ha_federated::index_init(uint keynr) ...@@ -1456,9 +1452,7 @@ int ha_federated::index_init(uint keynr)
DBUG_RETURN(0); DBUG_RETURN(0);
} }
/* /* Used to read forward through the index. */
Used to read forward through the index.
*/
int ha_federated::index_next(byte *buf) int ha_federated::index_next(byte *buf)
{ {
DBUG_ENTER("ha_federated::index_next"); DBUG_ENTER("ha_federated::index_next");
...@@ -1478,20 +1472,45 @@ int ha_federated::index_next(byte *buf) ...@@ -1478,20 +1472,45 @@ int ha_federated::index_next(byte *buf)
Called from filesort.cc, records.cc, sql_handler.cc, sql_select.cc, Called from filesort.cc, records.cc, sql_handler.cc, sql_select.cc,
sql_table.cc, and sql_update.cc. sql_table.cc, and sql_update.cc.
*/ */
int ha_federated::rnd_init(bool scan) int ha_federated::rnd_init(bool scan)
{ {
DBUG_ENTER("ha_federated::rnd_init"); DBUG_ENTER("ha_federated::rnd_init");
int num_fields, rows; int num_fields, rows;
/* /*
This 'scan' flag is incredibly important for this handler to work properly, This 'scan' flag is incredibly important for this handler to work
especially with updates that are called with indexes, because what happens properly, especially with updates containing WHERE clauses using
without this is index_read_idx gets called, does a query using the indexed columns.
index in a where clause, calls mysql_store_result, which then rnd_init
(from sql_update.cc) is called after this, which would do a When the initial query contains a WHERE clause of the query using an
"select * from table" then a mysql_store_result, wiping out the result indexed column, it's index_read_idx that selects the exact record from
set from index_read_idx's query, which causes the subsequent update_row the foreign database.
to update the wrong row!
When there is NO index in the query, either due to not having a WHERE
clause, or the WHERE clause is using columns that are not indexed, a
'full table scan' done by rnd_init, which in this situation simply means
a 'select * from ...' on the foreign table.
In other words, this 'scan' flag gives us the means to ensure that if
there is an index involved in the query, we want index_read_idx to
retrieve the exact record (scan flag is 0), and do not want rnd_init
to do a 'full table scan' and wipe out that result set.
Prior to using this flag, the problem was most apparent with updates.
An initial query like 'UPDATE tablename SET anything = whatever WHERE
indexedcol = someval', index_read_idx would get called, using a query
constructed with a WHERE clause built from the values of index ('indexcol'
in this case, having a value of 'someval'). mysql_store_result would
then get called (this would be the result set we want to use).
After this rnd_init (from sql_update.cc) would be called, it would then
unecessarily call "select * from table" on the foreign table, then call
mysql_store_result, which would wipe out the correct previous result set
from the previous call of index_read_idx's that had the result set
containing the correct record, hence update the wrong row!
*/ */
scan_flag= scan; scan_flag= scan;
if (scan) if (scan)
...@@ -1551,12 +1570,13 @@ int ha_federated::index_end(void) ...@@ -1551,12 +1570,13 @@ int ha_federated::index_end(void)
Called from filesort.cc, records.cc, sql_handler.cc, sql_select.cc, Called from filesort.cc, records.cc, sql_handler.cc, sql_select.cc,
sql_table.cc, and sql_update.cc. sql_table.cc, and sql_update.cc.
*/ */
int ha_federated::rnd_next(byte *buf) int ha_federated::rnd_next(byte *buf)
{ {
MYSQL_ROW row; MYSQL_ROW row;
DBUG_ENTER("ha_federated::rnd_next"); DBUG_ENTER("ha_federated::rnd_next");
// Fetch a row, insert it back in a row format. /* Fetch a row, insert it back in a row format. */
current_position= result->data_cursor; current_position= result->data_cursor;
DBUG_PRINT("ha_federated::rnd_next", DBUG_PRINT("ha_federated::rnd_next",
("current position %d", current_position)); ("current position %d", current_position));
...@@ -1580,10 +1600,11 @@ int ha_federated::rnd_next(byte *buf) ...@@ -1580,10 +1600,11 @@ int ha_federated::rnd_next(byte *buf)
Called from filesort.cc, sql_select.cc, sql_delete.cc and sql_update.cc. Called from filesort.cc, sql_select.cc, sql_delete.cc and sql_update.cc.
*/ */
void ha_federated::position(const byte *record) void ha_federated::position(const byte *record)
{ {
DBUG_ENTER("ha_federated::position"); DBUG_ENTER("ha_federated::position");
//my_store_ptr Add seek storage /* my_store_ptr Add seek storage */
*(MYSQL_ROW_OFFSET *) ref= current_position; // ref is always aligned *(MYSQL_ROW_OFFSET *) ref= current_position; // ref is always aligned
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -1603,9 +1624,9 @@ int ha_federated::rnd_pos(byte *buf, byte *pos) ...@@ -1603,9 +1624,9 @@ int ha_federated::rnd_pos(byte *buf, byte *pos)
{ {
DBUG_ENTER("ha_federated::rnd_pos"); DBUG_ENTER("ha_federated::rnd_pos");
/* /*
we do not need to do any of this if there has been a scan performed already, or we do not need to do any of this if there has been a scan performed
if this is an update and index_read_idx already has a result set in which to build already, or if this is an update and index_read_idx already has a result
it's update query from set in which to build it's update query from
*/ */
if (scan_flag) if (scan_flag)
{ {
...@@ -1665,6 +1686,7 @@ int ha_federated::rnd_pos(byte *buf, byte *pos) ...@@ -1665,6 +1686,7 @@ int ha_federated::rnd_pos(byte *buf, byte *pos)
*/ */
/* FIX: later version provide better information to the optimizer */ /* FIX: later version provide better information to the optimizer */
void ha_federated::info(uint flag) void ha_federated::info(uint flag)
{ {
DBUG_ENTER("ha_federated::info"); DBUG_ENTER("ha_federated::info");
...@@ -1684,6 +1706,7 @@ void ha_federated::info(uint flag) ...@@ -1684,6 +1706,7 @@ void ha_federated::info(uint flag)
Called from sql_select.cc by JOIN::reinit(). Called from sql_select.cc by JOIN::reinit().
Called from sql_union.cc by st_select_lex_unit::exec(). Called from sql_union.cc by st_select_lex_unit::exec().
*/ */
int ha_federated::delete_all_rows() int ha_federated::delete_all_rows()
{ {
DBUG_ENTER("ha_federated::delete_all_rows"); DBUG_ENTER("ha_federated::delete_all_rows");
...@@ -1735,6 +1758,7 @@ int ha_federated::delete_all_rows() ...@@ -1735,6 +1758,7 @@ int ha_federated::delete_all_rows()
Called from lock.cc by get_lock_data(). Called from lock.cc by get_lock_data().
*/ */
THR_LOCK_DATA **ha_federated::store_lock(THD *thd, THR_LOCK_DATA **ha_federated::store_lock(THD *thd,
THR_LOCK_DATA **to, THR_LOCK_DATA **to,
enum thr_lock_type lock_type) enum thr_lock_type lock_type)
...@@ -1773,9 +1797,9 @@ THR_LOCK_DATA **ha_federated::store_lock(THD *thd, ...@@ -1773,9 +1797,9 @@ THR_LOCK_DATA **ha_federated::store_lock(THD *thd,
/* /*
create() does nothing, since we have no local setup of our own. create() does nothing, since we have no local setup of our own.
FUTURE: We should potentially connect to the remote database and FUTURE: We should potentially connect to the foreign database and
create tables if they do not exist.
*/ */
int ha_federated::create(const char *name, TABLE *table_arg, int ha_federated::create(const char *name, TABLE *table_arg,
HA_CREATE_INFO *create_info) HA_CREATE_INFO *create_info)
{ {
......
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