diff options
author | unknown <patg@govinda.patg.net> | 2006-07-17 16:45:04 -0700 |
---|---|---|
committer | unknown <patg@govinda.patg.net> | 2006-07-17 16:45:04 -0700 |
commit | 469813c7f3022035a1e577abbd21c44827b4cf6c (patch) | |
tree | 56999ccaddd110568aa40c01eb4b66814bfd6257 /mysql-test/r/federated.result | |
parent | 5ac016a8147602703aae069c076e6b75a3ab5723 (diff) | |
download | mariadb-git-469813c7f3022035a1e577abbd21c44827b4cf6c.tar.gz |
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
Removed logic in ha_federated::write_row, which checks field query ids in the
loop which builds the query to run on the remote server.
mysql-test/r/federated.result:
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
New test results for test that verifies that one can insert to rows using
"insert into... select * from..", delete
them by id, then immediately insert them in the same way they were originally
inserted.
mysql-test/t/federated.test:
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
New test that verifies that one can insert to rows using
"insert into... select * from..", delete
them by id, then immediately insert them in the same way they were originally
inserted.
sql/ha_federated.cc:
"BUG #18764: Delete conditions causing inconsistencies in Federated tables"
Removed the logic in ha_federated::write_row which checked the query id of
each field and compared it to the thread query id.
Each field has a query id, and the problem used to be that if I did an insert
no fields specified, the field value would contain the last inserted value
for that field. The way to work around this was to see if the query id for
that field was the same as the current query id or of the rest of the field
query ids. If it wasn't, that told me the query didn't have the field value
specified.
Somewhere from when I wrote that code to now the problem went away, and there
was no longer the need for this logic.
Also removed the bool "has_fields", which needs not exist and using
table->s->fields is sufficient.
Diffstat (limited to 'mysql-test/r/federated.result')
-rw-r--r-- | mysql-test/r/federated.result | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result index 2eb0c81ec2e..cf75a013572 100644 --- a/mysql-test/r/federated.result +++ b/mysql-test/r/federated.result @@ -1689,6 +1689,44 @@ id c1 c2 9 abc ppc drop table federated.t1, federated.t2; drop table federated.t1, federated.t2; +DROP TABLE IF EXISTS federated.test; +CREATE TABLE federated.test ( +`id` int(11) NOT NULL, +`val1` varchar(255) NOT NULL, +`val2` varchar(255) NOT NULL, +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +DROP TABLE IF EXISTS federated.test_local; +DROP TABLE IF EXISTS federated.test_remote; +CREATE TABLE federated.test_local ( +`id` int(11) NOT NULL, +`val1` varchar(255) NOT NULL, +`val2` varchar(255) NOT NULL, +PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +INSERT INTO federated.test_local VALUES (1, 'foo', 'bar'), +(2, 'bar', 'foo'); +CREATE TABLE federated.test_remote ( +`id` int(11) NOT NULL, +`val1` varchar(255) NOT NULL, +`val2` varchar(255) NOT NULL, +PRIMARY KEY (`id`) +) ENGINE=FEDERATED DEFAULT CHARSET=latin1 +CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/test'; +insert into federated.test_remote select * from federated.test_local; +select * from federated.test_remote; +id val1 val2 +1 foo bar +2 bar foo +delete from federated.test_remote where id in (1,2); +insert into federated.test_remote select * from federated.test_local; +select * from federated.test_remote; +id val1 val2 +2 bar foo +1 foo bar +DROP TABLE federated.test_local; +DROP TABLE federated.test_remote; +DROP TABLE federated.test; DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; DROP TABLE IF EXISTS federated.t1; |