Changeset: f381d60f0f65 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f381d60f0f65
Added Files:
        sql/test/BugTracker-2024/Tests/7550-select-statistics-auth.test
Modified Files:
        sql/test/BugTracker-2024/Tests/All
Branch: Aug2024
Log Message:

Add test for issue #7550


diffs (59 lines):

diff --git a/sql/test/BugTracker-2024/Tests/7550-select-statistics-auth.test 
b/sql/test/BugTracker-2024/Tests/7550-select-statistics-auth.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2024/Tests/7550-select-statistics-auth.test
@@ -0,0 +1,46 @@
+@connection(id=c1, username=monetdb, password=monetdb)
+statement ok
+create user test with password 'test' name 'test'
+
+@connection(id=c2, username=test, password=test)
+statement ok
+create table abc(col1 int)
+
+@connection(id=c2, username=test, password=test)
+query TTT
+SELECT schema, table, column FROM sys.statistics where schema = 'test'
+----
+test
+abc
+col1
+
+@connection(id=c2, username=test, password=test)
+query TTT
+SELECT schema, table, column FROM sys.statistics() where schema = 'test'
+----
+test
+abc
+col1
+
+@connection(id=c2, username=test, password=test)
+query TT
+SELECT table_schema, table_name FROM information_schema.tables where 
table_schema = 'test'
+----
+test
+abc
+
+@connection(id=c2, username=test, password=test)
+statement ok
+drop table abc
+
+@connection(id=c1, username=monetdb, password=monetdb)
+statement ok
+alter user test set schema sys
+
+@connection(id=c1, username=monetdb, password=monetdb)
+statement ok
+drop schema test
+
+@connection(id=c1, username=monetdb, password=monetdb)
+statement ok
+drop user test
diff --git a/sql/test/BugTracker-2024/Tests/All 
b/sql/test/BugTracker-2024/Tests/All
--- a/sql/test/BugTracker-2024/Tests/All
+++ b/sql/test/BugTracker-2024/Tests/All
@@ -74,3 +74,4 @@ 7543-is-not-distinct-from-true
 7544-startswith-bug
 7545-groupby_on_index_col
 7547-drop-login-trigger-crash
+7550-select-statistics-auth
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to