There is no clear specification that allows or disallows views to be added to a merge table. This can lead to weird behaviour. See the reproduction steps.
Reproducible: Always
Steps to Reproduce:
1.create table foo (val int);
2.insert into foo values (1), (2), (3);
3.create view foo_view as select * from foo;
4.create merge table foo_merge_table (val int);
5.alter table foo_merge_table add table foo_view;
6.select * from foo_merge_table;
Either everything finishes succesfully and the final query returns all results in the view
or
an error message after submitting the alter table statement.
I am not sure what other merge table implementations handle alter table add view attempts.
Date: 2019-02-22 10:00:07 +0100
From: @aris-koning
To: SQL devs <>
Version: 11.31.13 (Aug2018-SP2)
CC: @PedroTadim
Last updated: 2019-04-30 12:36:00 +0200
Comment 26902
Date: 2019-02-22 10:00:07 +0100
From: @aris-koning
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0
Build Identifier:
There is no clear specification that allows or disallows views to be added to a merge table. This can lead to weird behaviour. See the reproduction steps.
Reproducible: Always
Steps to Reproduce:
1.create table foo (val int);
2.insert into foo values (1), (2), (3);
3.create view foo_view as select * from foo;
4.create merge table foo_merge_table (val int);
5.alter table foo_merge_table add table foo_view;
6.select * from foo_merge_table;
Actual Results:
operation successful
3 affected rows
operation successful
operation successful
operation successful
+-----+
| val |
+=====+
+-----+
0 tuples
Expected Results:
Either everything finishes succesfully and the final query returns all results in the view
or
an error message after submitting the alter table statement.
I am not sure what other merge table implementations handle alter table add view attempts.
Comment 26907
Date: 2019-02-27 11:28:21 +0100
From: MonetDB Mercurial Repository <>
Changeset ab619c893147 made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.
For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=ab619c893147
Changeset description:
Comment 26908
Date: 2019-02-27 11:30:02 +0100
From: @PedroTadim
We don't allow views to be added into merge/remote/replica tables.
Comment 26909
Date: 2019-02-27 11:53:01 +0100
From: @aris-koning
Changeset looks good to me.
The text was updated successfully, but these errors were encountered: