Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALTER TABLE operations silently remove previously set READ ONLY property #3362

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2013-09-12 14:43:26 +0200
From: @swingbit
To: SQL devs <>
Version: 11.15.3 (Feb2013-SP1)
CC: @njnes

Last updated: 2013-09-27 13:47:19 +0200

Comment 19156

Date: 2013-09-12 14:43:26 +0200
From: @swingbit

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Build Identifier:

As the example below shows, the READ ONLY property is reset silently by a primary key constraint. The same holds for a foreign key constraints - I haven't tried other ALTER TABLE statements.

I guess there should be no reason to reset the flag. If a reason exists, then this change shouldn't be silent.

sql>create table x(a int);
operation successful (0.333ms)
sql>insert into x values (1),(2),(3);
3 affected rows (0.337ms)
sql>
sql>alter table x set read only;
operation successful (0.336ms)
sql>select readonly from sys.tables where name='x';
+----------+
| readonly |
+==========+
| true |
+----------+
1 tuple (1.531ms)
sql>alter table x add primary key (a);
operation successful (1.617ms)
sql>select readonly from sys.tables where name='x';
+----------+
| readonly |
+==========+
| false |
+----------+
1 tuple (1.445ms)
s

Reproducible: Always

Comment 19160

Date: 2013-09-18 16:09:31 +0200
From: @njnes

fixed, it the intermediat table representation didn't properly set
the readonly status.

Comment 19161

Date: 2013-09-18 16:36:53 +0200
From: MonetDB Mercurial Repository <>

Changeset 45a59d9fadb5 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=45a59d9fadb5

Changeset description:

fixed bug #3362

Comment 19188

Date: 2013-09-27 09:31:11 +0200
From: MonetDB Mercurial Repository <>

Changeset c0bf1946fc19 made by Niels Nes niels@cwi.nl in the MonetDB repo, refers to this bug.

For complete details, see http//devmonetdborg/hg/MonetDB?cmd=changeset;node=c0bf1946fc19

Changeset description:

use type bit for readonly/readwrite, to match the boolean column type,
should fix Bug #3362.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant