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

read only does not protect this table #3895

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

read only does not protect this table #3895

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2015-12-22 22:55:33 +0100
From: Anthony Damico <>
To: SQL devs <>
Version: 11.21.5 (Jul2015)
CC: ajdamico, @njnes

Last updated: 2016-01-15 11:37:56 +0100

Comment 21684

Date: 2015-12-22 22:55:33 +0100
From: Anthony Damico <>

User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0
Build Identifier:

example table with one record - still not protected

Reproducible: Always

Steps to Reproduce:

CREATE TABLE my_table AS SELECT 1 AS my_column WITH DATA;
ALTER TABLE my_table SET READ ONLY;
SELECT COUNT(*) FROM my_table;
DROP TABLE my_table;

Actual Results:

Welcome to mclient, the MonetDB/SQL interactive terminal (Jul2015-91007a50e91b)
Database: MonetDB v11.21.8 (Jul2015-91007a50e91b), 'demo'
Type \q to quit, ? for a list of available commands
auto commit mode: on
sql>CREATE TABLE my_table AS SELECT 1 AS my_column WITH DATA;
operation successful (11.739ms)
sql>ALTER TABLE my_table SET READ ONLY;
operation successful (5.956ms)
sql>SELECT COUNT(*) FROM my_table;
+------+
| L1 |
+======+
| 1 |
+------+
1 tuple (0.703ms)
sql>DROP TABLE my_table;
operation successful (5.322ms)
sql>

Expected Results:

table should not be dropped

Comment 21687

Date: 2015-12-23 10:20:42 +0100
From: @njnes

protecting agains ddl statements is done using grant and revoke privileges. The
table level read only flags only protect the row level content, ie disallowes
update/insert and delete statements. This allows for less delta statements, ie
more efficient bat access.

Comment 21688

Date: 2015-12-23 13:17:52 +0100
From: Anthony Damico <>

ahh, i misunderstood that, sorry.

you wrote "resolved nextrelease" - but i do not see a changeset. does that mean you have also prevented DROP TABLE from occurring on read-only tables? or are read only tables allowed to be dropped?

thanks niels!!

@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants