Changeset: 44e0f38b8525 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=44e0f38b8525
Added Files:
sql/test/emptydb-upgrade-chain-hge/Tests/check.SQL.py.src
sql/test/emptydb-upgrade-chain-hge/Tests/check.stable.err.int128
sql/test/emptydb-upgrade-chain-hge/Tests/dump.stable.err.int128
sql/test/emptydb-upgrade-chain-hge/Tests/package.stable.err.int128
sql/test/emptydb-upgrade-chain-hge/Tests/package.stable.out.int128
sql/test/emptydb-upgrade-chain-hge/Tests/unpackage.stable.err.int128
sql/test/emptydb-upgrade-chain-hge/Tests/unpackage.stable.out.int128
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.err.int128
sql/test/emptydb-upgrade-chain/Tests/check.SQL.py.src
sql/test/emptydb-upgrade-hge/Tests/check.SQL.py.src
sql/test/emptydb-upgrade-hge/Tests/check.stable.err.int128
sql/test/emptydb-upgrade-hge/Tests/dump.stable.err.int128
sql/test/emptydb-upgrade-hge/Tests/unpackage.stable.err.int128
sql/test/emptydb-upgrade-hge/Tests/unpackage.stable.out.int128
sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.err.int128
sql/test/emptydb-upgrade/Tests/check.SQL.py.src
sql/test/emptydb/Tests/check.SQL.py.src
sql/test/emptydb/Tests/package-hge.stable.err.int128
sql/test/emptydb/Tests/package-hge.stable.out.int128
Removed Files:
sql/test/emptydb-upgrade-chain-hge/Tests/check.SQL.py
sql/test/emptydb-upgrade-chain-hge/Tests/check.stable.err
sql/test/emptydb-upgrade-chain-hge/Tests/dump.stable.err
sql/test/emptydb-upgrade-chain-hge/Tests/package.stable.err
sql/test/emptydb-upgrade-chain-hge/Tests/package.stable.out
sql/test/emptydb-upgrade-chain-hge/Tests/unpackage.stable.err
sql/test/emptydb-upgrade-chain-hge/Tests/unpackage.stable.out
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.err
sql/test/emptydb-upgrade-chain/Tests/check.SQL.py
sql/test/emptydb-upgrade-hge/Tests/check.SQL.py
sql/test/emptydb-upgrade-hge/Tests/check.stable.err
sql/test/emptydb-upgrade-hge/Tests/dump.stable.err
sql/test/emptydb-upgrade-hge/Tests/unpackage.stable.err
sql/test/emptydb-upgrade-hge/Tests/unpackage.stable.out
sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.err
sql/test/emptydb-upgrade/Tests/check.SQL.py
sql/test/emptydb/Tests/check.SQL.py
sql/test/emptydb/Tests/package-hge.stable.err
sql/test/emptydb/Tests/package-hge.stable.out
Modified Files:
.hgtags
MonetDB.spec
NT/installer32/MonetDB-ODBC-Installer.vdproj
NT/installer32/MonetDB5-Geom-Module.vdproj
NT/installer32/MonetDB5-SQL-Installer.vdproj
NT/installer64/MonetDB-ODBC-Installer.vdproj
NT/installer64/MonetDB5-Geom-Module.vdproj
NT/installer64/MonetDB5-SQL-Installer.vdproj
NT/monetdb_config.h.in
NT/rules.msc
clients/Tests/All
clients/Tests/MAL-signatures.stable.out
clients/Tests/MAL-signatures.stable.out.int128
clients/Tests/SQL-dump.SQL.py
clients/Tests/SQL-dump.stable.out
clients/Tests/SQL-dump.stable.out.int128
clients/Tests/exports.stable.out
clients/mapiclient/dump.c
clients/mapilib/mapi.rc
clients/odbc/driver/driver.rc
clients/odbc/winsetup/setup.rc
clients/python2/setup.py
clients/python3/setup.py
configure.ag
debian/changelog
gdk/ChangeLog.Jun2016
gdk/gdk.h
gdk/gdk_aggr.c
gdk/gdk_atoms.c
gdk/gdk_bat.c
gdk/gdk_batop.c
gdk/gdk_bbp.c
gdk/gdk_calc.c
gdk/gdk_calc_compare.h
gdk/gdk_group.c
gdk/gdk_heap.c
gdk/gdk_logger.c
gdk/gdk_logger.h
gdk/gdk_project.c
gdk/gdk_system.c
gdk/gdk_tm.c
gdk/libbat.rc
geom/monetdb5/geom.c
geom/monetdb5/geom.h
geom/monetdb5/geom_upgrade.c
java/ChangeLog.Jun2016
java/build.properties
java/pom.xml
java/release.txt
java/src/main/java/nl/cwi/monetdb/jdbc/MonetDatabaseMetaData.java
libversions
monetdb5/modules/atoms/batxml.c
monetdb5/modules/atoms/blob.c
monetdb5/modules/atoms/json.c
monetdb5/modules/kernel/algebra.c
monetdb5/modules/mal/batcalc.c
monetdb5/tools/libmonetdb5.rc
sql/backends/monet5/sql_upgrades.c
sql/jdbc/tests/Tests/BugDatabaseMetaData_Bug_3356.stable.out
sql/jdbc/tests/Tests/Test_Dobjects.stable.out
sql/storage/bat/bat_logger.c
sql/storage/bat/bat_storage.c
sql/storage/bat/bat_utils.c
sql/storage/store.c
sql/test/emptydb-upgrade-chain-hge/Tests/All
sql/test/emptydb-upgrade-chain-hge/Tests/check.stable.out.int128
sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/All
sql/test/emptydb-upgrade-chain/Tests/check.stable.out
sql/test/emptydb-upgrade-chain/Tests/check.stable.out.int128
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade-hge/Tests/All
sql/test/emptydb-upgrade-hge/Tests/check.stable.out.int128
sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128
sql/test/emptydb-upgrade/Tests/All
sql/test/emptydb-upgrade/Tests/check.stable.out
sql/test/emptydb-upgrade/Tests/check.stable.out.int128
sql/test/emptydb-upgrade/Tests/upgrade.stable.out
sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128
sql/test/emptydb/Tests/All
sql/test/emptydb/Tests/check.stable.out
sql/test/emptydb/Tests/check.stable.out.int128
sql/test/emptydb/updatetests
sql/test/leaks/Tests/check0.stable.out
sql/test/leaks/Tests/check0.stable.out.int128
sql/test/leaks/Tests/check1.stable.out
sql/test/leaks/Tests/check1.stable.out.int128
sql/test/leaks/Tests/check3.stable.out
sql/test/leaks/Tests/check4.stable.out
sql/test/leaks/Tests/check5.stable.out
sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128
sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out
sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128
vertoo.data
Branch: Jun2016
Log Message:
merge
diffs (truncated from 82227 to 300 lines):
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -618,3 +618,5 @@ 25c9f569add9c341d40920f30936890ae6ea68a8
feec2e4020548d3137a0e946b7a4e29db5b9e14a Jul2015_15
feec2e4020548d3137a0e946b7a4e29db5b9e14a Jul2015_SP3_release
ee2d8c8d65c35ed022ca0785f30fcf4b051a542e Jun2016_root
+ee54e50fccb17db48bbfd983882e8491a869131c Jul2015_17
+ee54e50fccb17db48bbfd983882e8491a869131c Jul2015_SP3_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -119,7 +119,7 @@ BuildRequires: geos-devel >= 3.0.0
BuildRequires: gsl-devel
%if %{?with_lidar:1}%{!?with_lidar:0}
BuildRequires: liblas-devel gdal-devel libgeotiff-devel
-# Fedora 22 libas-devel does not depend on liblas:
+# Fedora 22 liblas-devel does not depend on liblas:
BuildRequires: liblas
%endif
BuildRequires: libatomic_ops-devel
@@ -986,6 +986,29 @@ rm -f %{buildroot}%{_bindir}/Maddlog
%postun -p /sbin/ldconfig
%changelog
+* Thu Mar 24 2016 Sjoerd Mullender <[email protected]> - 11.21.17-20160324
+- Rebuilt.
+- BZ#2972: SQL URL functionality contains errors
+- BZ#3881: Server crashes on bulk load
+- BZ#3890: Window function + group by in subselect, rel2bin_project:
+ Assertion `0' failed
+- BZ#3891: MonetDB crashes when executing SQL with window function
+- BZ#3900: null handling in some sql statements is incorrect
+- BZ#3906: Multi-column 1-N table-function with mitosis produces different
+ column counts
+- BZ#3917: Date difference returns month_interval instead of day_interval
+- BZ#3938: Wrong error message on violating foreign key constraint
+- BZ#3941: Wrong coercion priority
+- BZ#3948: SQL: select * from sys.sys.table_name; is accepted but should
+ return an error
+- BZ#3951: extern table_funcs not visible from Windows DLL for extensions
+ like vaults (crashes)
+- BZ#3952: Stream table gives segfault
+- BZ#3953: MIN/MAX of a UUID column produces wrong results
+- BZ#3954: Consolidate table assertion error
+- BZ#3955: (incorrect) MAL loop instead of manifold triggered by simple
+ change in target list
+
* Thu Mar 10 2016 Sjoerd Mullender <[email protected]> - 11.21.15-20160310
- Rebuilt.
- BZ#3549: bulk string operations very slow
diff --git a/NT/rules.msc b/NT/rules.msc
--- a/NT/rules.msc
+++ b/NT/rules.msc
@@ -274,19 +274,21 @@ create_winconfig_conds_new_py:
$(ECHO) # > "$(TOPDIR)\winconfig_conds_new.py"
!IFDEF BITS32
$(ECHO) BITS32_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
+ $(ECHO) BITS64OID32_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
!ELSE
$(ECHO) BITS32_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
-!ENDIF
!IFDEF BITS64
$(ECHO) BITS64_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
-!ELSE
- $(ECHO) BITS64_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
-!ENDIF
-!IFDEF BITS64OID32
+!IFDEF MONET_OID32
$(ECHO) BITS64OID32_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
!ELSE
$(ECHO) BITS64OID32_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
!ENDIF
+!ELSE
+ $(ECHO) BITS64_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
+ $(ECHO) BITS64OID32_FALSE='' >> "$(TOPDIR)\winconfig_conds_new.py"
+!ENDIF
+!ENDIF
!IFDEF CROSS_COMPILING
$(ECHO) CROSS_COMPILING_FALSE='#' >> "$(TOPDIR)\winconfig_conds_new.py"
!ELSE
diff --git a/clients/Tests/All b/clients/Tests/All
--- a/clients/Tests/All
+++ b/clients/Tests/All
@@ -1,4 +1,4 @@
exports
-HAVE_FITS&HAVE_GEOM&HAVE_GSL&HAVE_LIBR&!HAVE_LIDAR&!HAVE_SHP&HAVE_NETCDF&HAVE_SAMTOOLS&HAVE_SPHINXCLIENT?MAL-signatures
-!BITS32&!BITS64OID32&HAVE_FITS&HAVE_GEOM&HAVE_GSL&!HAVE_LIDAR&!HAVE_SHP&HAVE_NETCDF&HAVE_SAMTOOLS?SQL-dump
+HAVE_FITS&HAVE_GEOM&HAVE_GSL&HAVE_LIBR&!HAVE_LIDAR&HAVE_NETCDF&HAVE_SAMTOOLS&!HAVE_SHP&HAVE_SPHINXCLIENT?MAL-signatures
+!BITS32&!BITS64OID32&HAVE_FITS&HAVE_GEOM&HAVE_GSL&!HAVE_LIDAR&HAVE_NETCDF&HAVE_PCRE&!HAVE_SHP&HAVE_SAMTOOLS?SQL-dump
MERCURIAL?malcheck
diff --git a/clients/Tests/MAL-signatures.stable.out
b/clients/Tests/MAL-signatures.stable.out
--- a/clients/Tests/MAL-signatures.stable.out
+++ b/clients/Tests/MAL-signatures.stable.out
@@ -31232,7 +31232,7 @@ command bbp.getIndex(b:bat[:any_2]):int
address CMDbbpgetIndex;
comment Retrieve the index in the BBP
-command bbp.setName(b:bat[:oid,:any_1],n:str):str
+command bbp.setName(b:bat[:any_1],n:str):str
address CMDsetName;
comment Rename a BAT
diff --git a/clients/Tests/MAL-signatures.stable.out.int128
b/clients/Tests/MAL-signatures.stable.out.int128
--- a/clients/Tests/MAL-signatures.stable.out.int128
+++ b/clients/Tests/MAL-signatures.stable.out.int128
@@ -40205,7 +40205,7 @@ command bbp.getIndex(b:bat[:any_2]):int
address CMDbbpgetIndex;
comment Retrieve the index in the BBP
-command bbp.setName(b:bat[:oid,:any_1],n:str):str
+command bbp.setName(b:bat[:any_1],n:str):str
address CMDsetName;
comment Rename a BAT
diff --git a/clients/Tests/SQL-dump.SQL.py b/clients/Tests/SQL-dump.SQL.py
--- a/clients/Tests/SQL-dump.SQL.py
+++ b/clients/Tests/SQL-dump.SQL.py
@@ -62,14 +62,16 @@ sys.stderr.write(err)
# they are too volatile, and if it makes sense, dump an identifier
# from a referenced table
out = '''
+-- helper function
+create function pcre_replace(origin string, pat string, repl string, flags
string) returns string external name pcre.replace;
-- schemas
select name, authorization, owner, system from sys.schemas order by name;
-- _tables
-select s.name, t.name, t.query, t.type, t.system, t.commit_action, t.access
from sys._tables t left outer join sys.schemas s on t.schema_id = s.id order by
s.name, t.name;
+select s.name, t.name,
replace(replace(pcre_replace(pcre_replace(pcre_replace(t.query, '--.*\n', '',
''), '[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', ')') as query,
t.type, t.system, t.commit_action, t.access from sys._tables t left outer join
sys.schemas s on t.schema_id = s.id order by s.name, t.name;
-- _columns
select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default",
c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id =
c.table_id order by t.name, c.number;
-- functions
-select s.name, f.name, f.func, f.mod, f.language, f.type, f.side_effect,
f.varres, f.vararg from sys.functions f left outer join sys.schemas s on
f.schema_id = s.id order by s.name, f.name, f.func;
+select s.name, f.name,
replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, '--.*\n', '',
''), '[ \t\n]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', ')') as query,
f.mod, f.language, f.type, f.side_effect, f.varres, f.vararg from sys.functions
f left outer join sys.schemas s on f.schema_id = s.id order by s.name, f.name,
query;
-- args
select f.name, a.name, a.type, a.type_digits, a.type_scale, a.inout, a.number
from sys.args a left outer join sys.functions f on a.func_id = f.id order by
f.name, a.func_id, a.number;
-- auths
@@ -79,7 +81,15 @@ select server, port, db, db_alias, user,
-- db_user_info
select u.name, u.fullname, s.name from sys.db_user_info u left outer join
sys.schemas s on u.default_schema = s.id order by u.name;
-- dependencies
-select count(*) from sys.dependencies;
+select s1.name, f1.name, s2.name, f2.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from sys.dependencies d, sys.functions f1, sys.functions
f2, sys.schemas s1, sys.schemas s2 where d.id = f1.id and d.depend_id = f2.id
and f1.schema_id = s1.id and f2.schema_id = s2.id order by s2.name, f2.name,
s1.name, f1.name;
+select s1.name, t.name, s2.name, f.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from sys.dependencies d, sys._tables t, sys.schemas s1,
sys.functions f, sys.schemas s2 where d.id = t.id and d.depend_id = f.id and
t.schema_id = s1.id and f.schema_id = s2.id order by s2.name, f.name, s1.name,
t.name;
+select s1.name, t.name, c.name, s2.name, f.name, case d.depend_type when 1
then 'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from sys.dependencies d, sys._columns c, sys._tables t,
sys.schemas s1, sys.functions f, sys.schemas s2 where d.id = c.id and
d.depend_id = f.id and c.table_id = t.id and t.schema_id = s1.id and
f.schema_id = s2.id order by s2.name, f.name, s1.name, t.name, c.name;
+select s1.name, f1.name, s2.name, t2.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from schemas s1, functions f1, schemas s2, _tables t2,
dependencies d where d.id = f1.id and f1.schema_id = s1.id and d.depend_id =
t2.id and t2.schema_id = s2.id order by s2.name, t2.name, s1.name, f1.name;
+select s1.name, t1.name, s2.name, t2.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from schemas s1, _tables t1, schemas s2, _tables t2,
dependencies d where d.id = t1.id and t1.schema_id = s1.id and d.depend_id =
t2.id and t2.schema_id = s2.id order by s2.name, t2.name, s1.name, t1.name;
+select s1.name, t1.name, c1.name, s2.name, t2.name, case d.depend_type when 1
then 'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from schemas s1, _tables t1, _columns c1, schemas s2,
_tables t2, dependencies d where d.id = c1.id and c1.table_id = t1.id and
t1.schema_id = s1.id and d.depend_id = t2.id and t2.schema_id = s2.id order by
s2.name, t2.name, s1.name, t1.name;
+select s1.name, t1.name, c1.name, s2.name, t2.name, k2.name, case
d.depend_type when 1 then 'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY'
when 3 then 'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then
'VIEW_DEPENDENCY' when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY'
when 8 then 'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from dependencies d, _tables t1, _tables t2, schemas s1,
schemas s2, _columns c1, keys k2 where d.id = c1.id and d.depend_id = k2.id and
c1.table_id = t1.id and t1.schema_id = s1.id and k2.table_id = t2.id and
t2.schema_id = s2.id order by s2.name, t2.name, k2.name, s1.name, t1.name,
c1.name;
+select s1.name, t1.name, c1.name, s2.name, t2.name, i2.name, case
d.depend_type when 1 then 'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY'
when 3 then 'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then
'VIEW_DEPENDENCY' when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY'
when 8 then 'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from dependencies d, _tables t1, _tables t2, schemas s1,
schemas s2, _columns c1, idxs i2 where d.id = c1.id and d.depend_id = i2.id and
c1.table_id = t1.id and t1.schema_id = s1.id and i2.table_id = t2.id and
t2.schema_id = s2.id order by s2.name, t2.name, i2.name, s1.name, t1.name,
c1.name;
+select t.systemname, t.sqlname, s.name, f.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from types t, functions f, schemas s, dependencies d
where d.id = t.id and d.depend_id = f.id and f.schema_id = s.id order by
s.name, f.name, t.systemname, t.sqlname;
-- idxs
select t.name, i.name, i.type from sys.idxs i left outer join sys._tables t on
t.id = i.table_id order by t.name, i.name;
-- keys
@@ -107,6 +117,14 @@ select t.name, g.name, g.time, g.orienta
select s.name, t.systemname, t.sqlname, t.digits, t.scale, t.radix, t.eclass
from sys.types t left outer join sys.schemas s on s.id = t.schema_id order by
s.name, t.systemname, t.sqlname, t.digits, t.scale, t.radix, t.eclass;
-- user_role
select a1.name, a2.name from sys.auths a1, sys.auths a2, sys.user_role ur
where a1.id = ur.login_id and a2.id = ur.role_id order by a1.name, a2.name;
+-- keywords
+select keyword from sys.keywords order by keyword;
+-- table_types
+select table_type_id, table_type_name from sys.table_types order by
table_type_id, table_type_name;
+-- dependency_types
+select dependency_type_id, dependency_type_name from sys.dependency_types
order by dependency_type_id, dependency_type_name;
+-- drop helper function
+drop function pcre_replace(string, string, string, string);
'''
sys.stdout.write(out)
@@ -116,10 +134,5 @@ clt = process.client('sql', interactive
out, err = clt.communicate(out)
-# do some normalization of the output:
-# remove SQL comments, collapse multiple white space into a single space
-out = re.sub(r'--.*?(?:\\n)+', '', out)
-out = re.sub(r'(?:\\n|\\t| )+', ' ', out)
-
sys.stdout.write(out)
sys.stderr.write(err)
diff --git a/clients/Tests/SQL-dump.stable.out
b/clients/Tests/SQL-dump.stable.out
--- a/clients/Tests/SQL-dump.stable.out
+++ b/clients/Tests/SQL-dump.stable.out
@@ -927,12 +927,6 @@ create function sys.hashsize(b boolean,
create function sys.heapsize(tpe string, i bigint, w int) returns bigint begin
if tpe <> 'varchar' and tpe <> 'clob' then return 0; end if; return 10240 + i *
w; end;
create function "host" (p inet) returns clob external name inet."host";
create function "hostmask" (p inet) returns inet external name inet."hostmask";
-ilike
-ilike
-ilike
-ilike
-ilike
-ilike
create filter function "ilike"(val string, pat string, esc string) external
name algebra."ilike";
create filter function "ilike"(val string, pat string) external name
algebra."ilike";
create function sys.imprintsize(i bigint, nme string) returns bigint begin if
nme = 'boolean' or nme = 'tinyint' or nme = 'smallint' or nme = 'int' or nme =
'bigint' or nme = 'hugeint' or nme = 'decimal' or nme = 'date' or nme =
'timestamp' or nme = 'real' or nme = 'double' then return cast(i * 0.12 as
bigint); end if ; return 0; end;
@@ -940,26 +934,8 @@ create function internaltransform(geom g
create function isaurl(theurl url) returns bool external name url."isaURL";
create function sys.isauuid(u uuid) returns uuid external name uuid."isaUUID";
create function sys.isauuid(u string) returns uuid external name
uuid."isaUUID";
-mbrLeft
-mbrLeft
-<<
-<<
-<<
-<<
-<<
-<<
-<<
-<<
-<<
-<<
create function "left_shift"(i1 inet, i2 inet) returns boolean external name
inet."<<";
create function "left_shift_assign"(i1 inet, i2 inet) returns boolean external
name inet."<<=";
-like
-like
-like
-like
-like
-like
create filter function "like"(val string, pat string, esc string) external
name algebra."like";
create filter function "like"(val string, pat string) external name
algebra."like";
@@ -1022,18 +998,6 @@ create procedure sys.resume(tag int) ext
create procedure sys.resume(tag bigint) external name sql.sysmon_resume;
create procedure reuse(sys string, tab string) external name sql.reuse;
create function reverse(src string) returns string external name udf.reverse;
-mbrRight
-mbrRight
->>
->>
->>
->>
->>
->>
->>
->>
->>
->>
create function "right_shift"(i1 inet, i2 inet) returns boolean external name
inet.">>";
create function "right_shift_assign"(i1 inet, i2 inet) returns boolean
external name inet.">>=";
create function sys.sessions() returns table("user" string, "login" timestamp,
"sessiontimeout" bigint, "lastcommand" timestamp, "querytimeout" bigint,
"active" bool) external name sql.sessions;
@@ -1224,14 +1188,20 @@ create function zorder_decode_x(z oid) r
create function zorder_decode_y(z oid) returns integer external name
zorder.decode_y;
create function zorder_encode(x integer, y integer) returns oid external name
zorder.encode;
+-- helper function
+create function pcre_replace(origin string, pat string, repl string, flags
string) returns string external name pcre.replace;
-- schemas
select name, authorization, owner, system from sys.schemas order by name;
-- _tables
-select s.name, t.name, t.query, t.type, t.system, t.commit_action, t.access
from sys._tables t left outer join sys.schemas s on t.schema_id = s.id order by
s.name, t.name;
+select s.name, t.name,
replace(replace(pcre_replace(pcre_replace(pcre_replace(t.query, '--.*
+', '', ''), '[
+]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', ')') as query, t.type,
t.system, t.commit_action, t.access from sys._tables t left outer join
sys.schemas s on t.schema_id = s.id order by s.name, t.name;
-- _columns
select t.name, c.name, c.type, c.type_digits, c.type_scale, c."default",
c."null", c.number, c.storage from sys._tables t, sys._columns c where t.id =
c.table_id order by t.name, c.number;
-- functions
-select s.name, f.name, f.func, f.mod, f.language, f.type, f.side_effect,
f.varres, f.vararg from sys.functions f left outer join sys.schemas s on
f.schema_id = s.id order by s.name, f.name, f.func;
+select s.name, f.name,
replace(replace(pcre_replace(pcre_replace(pcre_replace(f.func, '--.*
+', '', ''), '[
+]+', ' ', 'm'), '^ ', '', ''), '( ', '('), ' )', ')') as query, f.mod,
f.language, f.type, f.side_effect, f.varres, f.vararg from sys.functions f left
outer join sys.schemas s on f.schema_id = s.id order by s.name, f.name, query;
-- args
select f.name, a.name, a.type, a.type_digits, a.type_scale, a.inout, a.number
from sys.args a left outer join sys.functions f on a.func_id = f.id order by
f.name, a.func_id, a.number;
-- auths
@@ -1241,7 +1211,15 @@ select server, port, db, db_alias, user,
-- db_user_info
select u.name, u.fullname, s.name from sys.db_user_info u left outer join
sys.schemas s on u.default_schema = s.id order by u.name;
-- dependencies
-select count(*) from sys.dependencies;
+select s1.name, f1.name, s2.name, f2.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from sys.dependencies d, sys.functions f1, sys.functions
f2, sys.schemas s1, sys.schemas s2 where d.id = f1.id and d.depend_id = f2.id
and f1.schema_id = s1.id and f2.schema_id = s2.id order by s2.name, f2.name,
s1.name, f1.name;
+select s1.name, t.name, s2.name, f.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from sys.dependencies d, sys._tables t, sys.schemas s1,
sys.functions f, sys.schemas s2 where d.id = t.id and d.depend_id = f.id and
t.schema_id = s1.id and f.schema_id = s2.id order by s2.name, f.name, s1.name,
t.name;
+select s1.name, t.name, c.name, s2.name, f.name, case d.depend_type when 1
then 'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from sys.dependencies d, sys._columns c, sys._tables t,
sys.schemas s1, sys.functions f, sys.schemas s2 where d.id = c.id and
d.depend_id = f.id and c.table_id = t.id and t.schema_id = s1.id and
f.schema_id = s2.id order by s2.name, f.name, s1.name, t.name, c.name;
+select s1.name, f1.name, s2.name, t2.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from schemas s1, functions f1, schemas s2, _tables t2,
dependencies d where d.id = f1.id and f1.schema_id = s1.id and d.depend_id =
t2.id and t2.schema_id = s2.id order by s2.name, t2.name, s1.name, f1.name;
+select s1.name, t1.name, s2.name, t2.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from schemas s1, _tables t1, schemas s2, _tables t2,
dependencies d where d.id = t1.id and t1.schema_id = s1.id and d.depend_id =
t2.id and t2.schema_id = s2.id order by s2.name, t2.name, s1.name, t1.name;
+select s1.name, t1.name, c1.name, s2.name, t2.name, case d.depend_type when 1
then 'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from schemas s1, _tables t1, _columns c1, schemas s2,
_tables t2, dependencies d where d.id = c1.id and c1.table_id = t1.id and
t1.schema_id = s1.id and d.depend_id = t2.id and t2.schema_id = s2.id order by
s2.name, t2.name, s1.name, t1.name;
+select s1.name, t1.name, c1.name, s2.name, t2.name, k2.name, case
d.depend_type when 1 then 'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY'
when 3 then 'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then
'VIEW_DEPENDENCY' when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY'
when 8 then 'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from dependencies d, _tables t1, _tables t2, schemas s1,
schemas s2, _columns c1, keys k2 where d.id = c1.id and d.depend_id = k2.id and
c1.table_id = t1.id and t1.schema_id = s1.id and k2.table_id = t2.id and
t2.schema_id = s2.id order by s2.name, t2.name, k2.name, s1.name, t1.name,
c1.name;
+select s1.name, t1.name, c1.name, s2.name, t2.name, i2.name, case
d.depend_type when 1 then 'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY'
when 3 then 'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then
'VIEW_DEPENDENCY' when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY'
when 8 then 'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from dependencies d, _tables t1, _tables t2, schemas s1,
schemas s2, _columns c1, idxs i2 where d.id = c1.id and d.depend_id = i2.id and
c1.table_id = t1.id and t1.schema_id = s1.id and i2.table_id = t2.id and
t2.schema_id = s2.id order by s2.name, t2.name, i2.name, s1.name, t1.name,
c1.name;
+select t.systemname, t.sqlname, s.name, f.name, case d.depend_type when 1 then
'SCHEMA_DEPENDENCY' when 2 then 'TABLE_DEPENDENCY' when 3 then
'COLUMN_DEPENDENCY' when 4 then 'KEY_DEPENDENCY' when 5 then 'VIEW_DEPENDENCY'
when 6 then 'USER_DEPENDENCY' when 7 then 'FUNC_DEPENDENCY' when 8 then
'TRIGGER_DEPENDENCY' when 9 then 'OWNER_DEPENDENCY' when 10 then
'INDEX_DEPENDENCY' when 11 then 'FKEY_DEPENDENCY' when 12 then 'SEQ_DEPENDENCY'
when 13 then 'PROC_DEPENDENCY' when 14 then 'BEDROPPED_DEPENDENCY' when 15 then
'TYPE_DEPENDENCY' end from types t, functions f, schemas s, dependencies d
where d.id = t.id and d.depend_id = f.id and f.schema_id = s.id order by
s.name, f.name, t.systemname, t.sqlname;
-- idxs
select t.name, i.name, i.type from sys.idxs i left outer join sys._tables t on
t.id = i.table_id order by t.name, i.name;
-- keys
@@ -1269,6 +1247,15 @@ select t.name, g.name, g.time, g.orienta
select s.name, t.systemname, t.sqlname, t.digits, t.scale, t.radix, t.eclass
from sys.types t left outer join sys.schemas s on s.id = t.schema_id order by
s.name, t.systemname, t.sqlname, t.digits, t.scale, t.radix, t.eclass;
-- user_role
select a1.name, a2.name from sys.auths a1, sys.auths a2, sys.user_role ur
where a1.id = ur.login_id and a2.id = ur.role_id order by a1.name, a2.name;
+-- keywords
+select keyword from sys.keywords order by keyword;
+-- table_types
+select table_type_id, table_type_name from sys.table_types order by
table_type_id, table_type_name;
+-- dependency_types
+select dependency_type_id, dependency_type_name from sys.dependency_types
order by dependency_type_id, dependency_type_name;
+-- drop helper function
+drop function pcre_replace(string, string, string, string);
+#create function pcre_replace(origin string, pat string, repl string, flags
string) returns string external name pcre.replace;
#select name, authorization, owner, system from sys.schemas order by name;
% sys.schemas, sys.schemas, sys.schemas, sys.schemas # table_name
% name, authorization, owner, system # name
@@ -1279,11 +1266,13 @@ select a1.name, a2.name from sys.auths a
[ "profiler", 3, 3, true ]
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list