Hello everyone,
I believe I've encountered a bug with the remote table functionality. Here are the steps to replicate it. Tested with MonetDB 11.29.3, both on Ubuntu 14.04.5 LTS and Ubuntu 16.04.4 LTS. The problem persists even after restarting the DB farms and the MonetDB daemons.
On node 1
Create a normal table, insert some data and check its contents:
create table testtable(id int not null, name text, valid boolean);
insert into testtable (id, name) values (1, '1');
insert into testtable (id, name) values (2, '2');
insert into testtable (id) values (3);
select * from testtable;
+------+------+-------+
| id | name | valid |
+======+======+=======+
| 1 | 1 | null |
| 2 | 2 | null |
| 3 | null | null |
+------+------+-------+
3 tuples (6.446ms)
On node 2
Create a remote table and check its contents to make sure it works:
create remote table testtable(id int not null, name text, valid boolean) on 'mapi:monetdb://node1:50000/dbfarm';
select * from testtable;
+------+------+-------+
| id | name | valid |
+======+======+=======+
| 1 | 1 | null |
| 2 | 2 | null |
| 3 | null | null |
+------+------+-------+
3 tuples (6.446ms)
Then try to select anything with a WHERE clause:
select * from testtable where name is null;
+------+------+-------+
| id | name | valid |
+======+======+=======+
| 3 | null | null |
+------+------+-------+
1 tuple (5.186ms)
It seemingly works fine, but now when you try to select anything else, you get the same result:
select * from testtable;
+------+------+-------+
| id | name | valid |
+======+======+=======+
| 3 | null | null |
+------+------+-------+
1 tuple (4.466ms)
If you log out from mclient and then back in, select * works fine again, so there's no data loss. However, even if you try the opposite of the previous query (is not null instead of is null), you get the same result:
select * from testtable where name is not null;
+------+------+-------+
| id | name | valid |
+======+======+=======+
| 3 | null | null |
+------+------+-------+
1 tuple (5.358ms)
Can someone else please try this to confirm it's a bug and not something on my end?
Thanks in advance.
Best regards,
Marcell