Changeset: e11de3798634 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/e11de3798634
Modified Files:
gdk/gdk.h
Branch: default
Log Message:
Merged with Jan2022
diffs (truncated from 15738 to 300 lines):
diff --git a/clients/Tests/All b/clients/Tests/All
--- a/clients/Tests/All
+++ b/clients/Tests/All
@@ -1,5 +1,5 @@
exports
HAVE_HGE&HAVE_FITS&HAVE_GEOM&HAVE_LIBR&HAVE_LIBPY3&HAVE_NETCDF&HAVE_SHP&NOT_WIN32?MAL-signatures-hge
!HAVE_HGE&HAVE_FITS&HAVE_GEOM&HAVE_LIBR&HAVE_LIBPY3&HAVE_NETCDF&HAVE_SHP&NOT_WIN32?MAL-signatures
-MERCURIAL?melcheck
+NOT_WIN32&MERCURIAL?melcheck
mclient-uri
diff --git a/clients/Tests/melcheck.bat b/clients/Tests/melcheck.bat
new file mode 100644
--- /dev/null
+++ b/clients/Tests/melcheck.bat
@@ -0,0 +1,1 @@
+rem Dummy file to simply skip the test instead of screaming TEST MISSING
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1698,7 +1698,7 @@ tfastins_nocheck(BAT *b, BUN p, const vo
static inline gdk_return __attribute__((__warn_unused_result__))
tfastins(BAT *b, BUN p, const void *v)
{
- if (p > BATcapacity(b)) {
+ if (p >= BATcapacity(b)) {
if (p >= BUN_MAX) {
GDKerror("tfastins: too many elements to accommodate ("
BUNFMT ")\n", BUN_MAX);
return GDK_FAIL;
diff --git a/sql/test/BugTracker/Tests/All b/sql/test/BugTracker/Tests/All
--- a/sql/test/BugTracker/Tests/All
+++ b/sql/test/BugTracker/Tests/All
@@ -14,10 +14,11 @@ intersect_in_subquery.SF-1339411
rows_affected.SF-1377180
broken_join.SF-1373391
insert_not_exists.SF-1380287
-authorization.SF-1430616
+authorization.SF-1430616-1
+USER=voc&PASSWD=voc?authorization.SF-1430616-2
+authorization.SF-1430616-3
mapi_connect_errors_vanish.SF-1432134
create_column_name_data.SF-1440214
-connect_crash.SF-1436626
drop_schema_crash.SF-1504794
set_session_vars.SF-1505987
reset_session_vars.SF-1505987
diff --git a/sql/test/BugTracker/Tests/authorization.SF-1430616-1.test
b/sql/test/BugTracker/Tests/authorization.SF-1430616-1.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker/Tests/authorization.SF-1430616-1.test
@@ -0,0 +1,29 @@
+statement ok
+CREATE USER voc WITH PASSWORD 'voc' NAME 'VOC Explorer' SCHEMA sys
+
+query TTT rowsort
+SELECT users.name, users.fullname, schemas.name as schema
+FROM users, schemas
+WHERE users.default_schema = schemas.id
+AND users.name = 'voc'
+----
+voc
+VOC Explorer
+sys
+
+statement ok
+CREATE SCHEMA voc AUTHORIZATION voc
+
+statement ok
+ALTER USER voc SET SCHEMA voc
+
+query TTT rowsort
+SELECT users.name, users.fullname, schemas.name as schema
+FROM users, schemas
+WHERE users.default_schema = schemas.id
+AND users.name = 'voc'
+----
+voc
+VOC Explorer
+voc
+
diff --git a/sql/test/BugTracker/Tests/authorization.SF-1430616-2.reqtests
b/sql/test/BugTracker/Tests/authorization.SF-1430616-2.reqtests
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker/Tests/authorization.SF-1430616-2.reqtests
@@ -0,0 +1,1 @@
+authorization.SF-1430616-1
diff --git a/sql/test/BugTracker/Tests/authorization.SF-1430616-2.test
b/sql/test/BugTracker/Tests/authorization.SF-1430616-2.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker/Tests/authorization.SF-1430616-2.test
@@ -0,0 +1,5 @@
+query T nosort
+select current_schema
+----
+voc
+
diff --git a/sql/test/BugTracker/Tests/authorization.SF-1430616-3.reqtests
b/sql/test/BugTracker/Tests/authorization.SF-1430616-3.reqtests
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker/Tests/authorization.SF-1430616-3.reqtests
@@ -0,0 +1,1 @@
+authorization.SF-1430616-1
diff --git a/sql/test/BugTracker/Tests/authorization.SF-1430616-3.test
b/sql/test/BugTracker/Tests/authorization.SF-1430616-3.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker/Tests/authorization.SF-1430616-3.test
@@ -0,0 +1,21 @@
+statement error 2BM37!DROP SCHEMA: unable to drop schema 'voc' (there are
database objects which depend on it)
+DROP SCHEMA voc
+
+statement error M1M05!DROP USER: 'voc' owns a schema
+DROP USER voc
+
+statement ok
+START TRANSACTION
+
+statement ok
+ALTER USER voc SET SCHEMA sys
+
+statement ok
+DROP SCHEMA voc
+
+statement ok
+DROP USER voc
+
+statement ok
+COMMIT
+
diff --git a/sql/test/BugTracker/Tests/authorization.SF-1430616.SQL.py
b/sql/test/BugTracker/Tests/authorization.SF-1430616.SQL.py
deleted file mode 100644
--- a/sql/test/BugTracker/Tests/authorization.SF-1430616.SQL.py
+++ /dev/null
@@ -1,46 +0,0 @@
-###
-# Check that when a user is decoupled from a schema, this dependency is
-# properly removed and both the schema and the user can be dropped
-###
-
-from MonetDBtesting.sqltest import SQLTestCase
-
-with SQLTestCase() as tc:
-
- # create the dependency of user `voc` on schema `voc`
- tc.connect(username="monetdb", password="monetdb")
- tc.execute("CREATE USER voc WITH PASSWORD 'voc' NAME 'VOC Explorer' SCHEMA
sys;").assertSucceeded()
- tc.execute("""
- SELECT users.name, users.fullname, schemas.name as schema
- FROM users, schemas
- WHERE users.default_schema = schemas.id
- AND users.name = 'voc';
- """).assertSucceeded()\
- .assertDataResultMatch([('voc', 'VOC Explorer', 'sys')])
- tc.execute("CREATE SCHEMA voc AUTHORIZATION voc;").assertSucceeded()
- tc.execute("ALTER USER voc SET SCHEMA voc;").assertSucceeded()
- tc.execute("""
- SELECT users.name, users.fullname, schemas.name as schema
- FROM users, schemas
- WHERE users.default_schema = schemas.id
- AND users.name = 'voc';
- """).assertSucceeded()\
- .assertDataResultMatch([('voc', 'VOC Explorer', 'voc')])
-
- # just use the new user once
- tc.connect(username="voc", password="voc")
- tc.execute("select
current_schema;").assertSucceeded().assertDataResultMatch([('voc',)])
-
- tc.connect(username="monetdb", password="monetdb")
- # we can drop neither of them yet
- tc.execute("DROP SCHEMA voc;").assertFailed(err_code="2BM37",
err_message="DROP SCHEMA: unable to drop schema 'voc' (there are database
objects which depend on it)")
- tc.execute("DROP USER voc;").assertFailed(err_code="M1M05",
err_message="DROP USER: 'voc' owns a schema")
- # remove the dependency so that we can drop both of them
- tc.execute("""
- START TRANSACTION;
- ALTER USER voc SET SCHEMA sys;
- DROP SCHEMA voc;
- DROP USER voc;
- COMMIT;
- """).assertSucceeded()
-
diff --git a/sql/test/BugTracker/Tests/auto_commit.SF-1724151.SQL.py
b/sql/test/BugTracker/Tests/auto_commit.SF-1724151.SQL.py
deleted file mode 100644
--- a/sql/test/BugTracker/Tests/auto_commit.SF-1724151.SQL.py
+++ /dev/null
@@ -1,32 +0,0 @@
-from MonetDBtesting.sqltest import SQLTestCase
-
-with SQLTestCase() as tc:
- tc.connect(username="monetdb", password="monetdb")
- tc.execute("""
- create table tbl_xy (x int, y int);
- insert into tbl_xy values (0,0);
- insert into tbl_xy values (1,1);
- """).assertSucceeded()
-
- tc.execute("""
- insert into tbl_xy values (2,2);
- insert into tbl_xy values (3,3);
- insert into tbl_xy values (4,4);
- """).assertSucceeded()
-
- tc.execute("""
- insert into tbl_xy values (5,5);
- insert into tbl_xy values (6,6);
- insert into tbl_xy values (7,7);
- """).assertSucceeded()
-
- tc.execute("insert into tbl_xy values (-1,
-100);").assertSucceeded().assertRowCount(1)
-
- tc.execute("""
- insert into tbl_xy values (8,8);
- insert into tbl_xy values (9,9);
- insert into tbl_xy values (10,10);
- """).assertSucceeded()
-
- tc.execute("select * from
tbl_xy;").assertSucceeded().assertRowCount(12).assertDataResultMatch([(0,0),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7),(-1,-100),(8,8),(9,9),(10,10)])
- tc.execute("drop table tbl_xy;").assertSucceeded()
diff --git a/sql/test/BugTracker/Tests/auto_commit.SF-1724151.test
b/sql/test/BugTracker/Tests/auto_commit.SF-1724151.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker/Tests/auto_commit.SF-1724151.test
@@ -0,0 +1,94 @@
+statement ok
+start transaction
+
+statement ok
+create table tbl_xy (x int, y int)
+
+statement ok
+insert into tbl_xy values (0,0)
+
+statement ok
+insert into tbl_xy values (1,1)
+
+statement ok
+commit
+
+statement ok
+start transaction
+
+statement ok
+insert into tbl_xy values (2,2)
+
+statement ok
+insert into tbl_xy values (3,3)
+
+statement ok
+insert into tbl_xy values (4,4)
+
+statement ok
+commit
+
+statement ok
+start transaction
+
+statement ok
+insert into tbl_xy values (5,5)
+
+statement ok
+insert into tbl_xy values (6,6)
+
+statement ok
+insert into tbl_xy values (7,7)
+
+statement ok
+commit
+
+statement ok
+insert into tbl_xy values (-1, -100)
+
+statement ok
+start transaction
+
+statement ok
+insert into tbl_xy values (8,8)
+
+statement ok
+insert into tbl_xy values (9,9)
+
+statement ok
+insert into tbl_xy values (10,10)
+
+statement ok
+commit
+
+query II rowsort
+select * from tbl_xy
+----
+-1
+-100
+0
+0
+1
+1
+10
+10
+2
+2
+3
+3
+4
+4
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list