Changeset: 925022b81bac for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=925022b81bac
Added Files:
        
sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.stable.err
        
sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.stable.out
Modified Files:
        sql/storage/store.c
        sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py
Branch: Apr2019
Log Message:

Fix for bug 6749 (i.e. when copying the key definition to the transaction's 
table, create a dependency for unique keys as well)


diffs (truncated from 301 to 300 lines):

diff --git a/sql/storage/store.c b/sql/storage/store.c
--- a/sql/storage/store.c
+++ b/sql/storage/store.c
@@ -2365,7 +2365,9 @@ sql_trans_copy_key( sql_trans *tr, sql_t
 
                if (nk->type == fkey)
                        sql_trans_create_dependency(tr, kc->c->base.id, 
k->base.id, FKEY_DEPENDENCY);
-               if (nk->type == pkey) {
+               else if (nk->type == ukey)
+                       sql_trans_create_dependency(tr, kc->c->base.id, 
k->base.id, KEY_DEPENDENCY);
+               else if (nk->type == pkey) {
                        sql_trans_create_dependency(tr, kc->c->base.id, 
k->base.id, KEY_DEPENDENCY);
                        sql_trans_alter_null(tr, kc->c, 0);
                }
diff --git a/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py 
b/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py
--- a/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py
+++ b/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.py
@@ -29,11 +29,21 @@ client('alter table t drop column c;')
 server_stop(s)
 
 s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
-client('alter table t drop column b;')
+client('alter table t drop column b; --error, b has a depenency')
 server_stop(s)
 
 s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
-client('alter table t drop column b cascade;')
+client('''\
+select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';\
+select count(*) from dependencies inner join columns on dependencies.id = 
columns.id inner join tables on columns.table_id = tables.id where tables.name 
= 't';\
+select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';\
+select idxs.type, idxs.name from idxs inner join tables on tables.id = 
idxs.table_id where tables.name = 't';\
+alter table t drop column b cascade;\
+select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';\
+select count(*) from dependencies inner join columns on dependencies.id = 
columns.id inner join tables on columns.table_id = tables.id where tables.name 
= 't';\
+select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';\
+select idxs.type, idxs.name from idxs inner join tables on tables.id = 
idxs.table_id where tables.name = 't';
+''')
 server_stop(s)
 
 s = process.server(args = [], stdin = process.PIPE, stdout = process.PIPE, 
stderr = process.PIPE)
diff --git 
a/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.stable.err 
b/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.stable.err
@@ -0,0 +1,87 @@
+stderr of test 'alter_table_drop_column.Bug-6749` in directory 
'sql/test/BugTracker-2019` itself:
+
+
+# 13:37:31 >  
+# 13:37:31 >  "/usr/bin/python2" "alter_table_drop_column.Bug-6749.py" 
"alter_table_drop_column.Bug-6749"
+# 13:37:31 >  
+
+# builtin opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/monetdb5/dbfarm/demo
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30301
+# cmdline opt  mapi_usock = /var/tmp/mtest-26192/.s.monetdb.30301
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2019
+# builtin opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/monetdb5/dbfarm/demo
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30301
+# cmdline opt  mapi_usock = /var/tmp/mtest-26192/.s.monetdb.30301
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2019
+MAPI  = (monetdb) /var/tmp/mtest-26192/.s.monetdb.30301
+QUERY = alter table t drop column b; --error, b has a depenency
+ERROR = !ALTER TABLE: cannot drop column 'b': there are database objects which 
depend on it
+CODE  = 2BM37
+# builtin opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/monetdb5/dbfarm/demo
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30301
+# cmdline opt  mapi_usock = /var/tmp/mtest-26192/.s.monetdb.30301
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2019
+#client1:!ERROR:ParseException:SQLparser:2BM37!ALTER TABLE: cannot drop column 
'b': there are database objects which depend on it
+# builtin opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/monetdb5/dbfarm/demo
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30301
+# cmdline opt  mapi_usock = /var/tmp/mtest-26192/.s.monetdb.30301
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2019
+# builtin opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/monetdb5/dbfarm/demo
+# builtin opt  monet_prompt = >
+# builtin opt  monet_daemon = no
+# builtin opt  mapi_port = 50000
+# builtin opt  mapi_open = false
+# builtin opt  mapi_autosense = false
+# builtin opt  sql_optimizer = default_pipe
+# builtin opt  sql_debug = 0
+# cmdline opt  gdk_nr_threads = 0
+# cmdline opt  mapi_open = true
+# cmdline opt  mapi_port = 30301
+# cmdline opt  mapi_usock = /var/tmp/mtest-26192/.s.monetdb.30301
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/home/ferreira/repositories/MonetDB-Apr2019/BUILD/var/MonetDB/mTests_sql_test_BugTracker-2019
+
+# 13:37:33 >  
+# 13:37:33 >  "Done."
+# 13:37:33 >  
+
diff --git 
a/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.stable.out 
b/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2019/Tests/alter_table_drop_column.Bug-6749.stable.out
@@ -0,0 +1,163 @@
+stdout of test 'alter_table_drop_column.Bug-6749` in directory 
'sql/test/BugTracker-2019` itself:
+
+
+# 13:37:31 >  
+# 13:37:31 >  "/usr/bin/python2" "alter_table_drop_column.Bug-6749.py" 
"alter_table_drop_column.Bug-6749"
+# 13:37:31 >  
+
+#create table t (a int, b int, c int);alter table t add unique (b);
+#create table t (a int, b int, c int);alter table t add unique (b);
+# MonetDB 5 server v11.33.4 (hg id: 101e6463524a+)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2019', using 8 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 15.527 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://localhost.localdomain:30301/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-26192/.s.monetdb.30301
+# MonetDB/GIS module loaded
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 17_temporal.sql
+# loading sql script: 18_index.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_views.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 27_rejects.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 39_analytics_hge.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 40_json.sql
+# loading sql script: 40_json_hge.sql
+# loading sql script: 41_md5sum.sql
+# loading sql script: 45_uuid.sql
+# loading sql script: 46_profiler.sql
+# loading sql script: 51_sys_schema_extension.sql
+# loading sql script: 60_wlcr.sql
+# loading sql script: 72_fits.sql
+# loading sql script: 74_netcdf.sql
+# loading sql script: 75_lidar.sql
+# loading sql script: 75_shp.sql
+# loading sql script: 75_storagemodel.sql
+# loading sql script: 80_statistics.sql
+# loading sql script: 80_udf.sql
+# loading sql script: 80_udf_hge.sql
+# loading sql script: 85_bam.sql
+# loading sql script: 90_generator.sql
+# loading sql script: 90_generator_hge.sql
+# loading sql script: 99_system.sql
+# MonetDB/SQL module loaded
+#alter table t drop column c;
+# MonetDB 5 server v11.33.4 (hg id: 101e6463524a+)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2019', using 8 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 15.527 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://localhost.localdomain:30301/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-26192/.s.monetdb.30301
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB 5 server v11.33.4 (hg id: 101e6463524a+)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2019', using 8 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 15.527 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://localhost.localdomain:30301/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-26192/.s.monetdb.30301
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+#select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';select 
count(*) from dependencies inner join columns on dependencies.id = columns.id 
inner join tables on columns.table_id = tables.id where tables.name = 
't';select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';select idxs.type, 
idxs.name from idxs inner join tables on tables.id = idxs.table_id where 
tables.name = 't';alter table t drop column b cascade;select count(*) from 
objects inner join dependencies on objects.id = dependencies.depend_id inner 
join columns on dependencies.id = columns.id inner join tables on 
columns.table_id = tables.id where tables.name = 't';select count(*) from 
dependencies inner join columns on dependencies.id = columns.id inner join 
tables on columns.table_id = 
 tables.id where tables.name = 't';select keys.type, keys.name, keys.rkey, 
keys.action from keys inner join tables on tables.id = keys.table_id where 
tables.name = 't';select idxs.type, idxs.name from idxs inner join tables on 
tables.id = idxs.table_id where tables.name = 't';
+% .L54 # table_name
+% L54 # name
+% bigint # type
+% 1 # length
+[ 2    ]
+#select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';select 
count(*) from dependencies inner join columns on dependencies.id = columns.id 
inner join tables on columns.table_id = tables.id where tables.name = 
't';select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';select idxs.type, 
idxs.name from idxs inner join tables on tables.id = idxs.table_id where 
tables.name = 't';alter table t drop column b cascade;select count(*) from 
objects inner join dependencies on objects.id = dependencies.depend_id inner 
join columns on dependencies.id = columns.id inner join tables on 
columns.table_id = tables.id where tables.name = 't';select count(*) from 
dependencies inner join columns on dependencies.id = columns.id inner join 
tables on columns.table_id = 
 tables.id where tables.name = 't';select keys.type, keys.name, keys.rkey, 
keys.action from keys inner join tables on tables.id = keys.table_id where 
tables.name = 't';select idxs.type, idxs.name from idxs inner join tables on 
tables.id = idxs.table_id where tables.name = 't';
+% .L54 # table_name
+% L54 # name
+% bigint # type
+% 1 # length
+[ 2    ]
+#select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';select 
count(*) from dependencies inner join columns on dependencies.id = columns.id 
inner join tables on columns.table_id = tables.id where tables.name = 
't';select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';select idxs.type, 
idxs.name from idxs inner join tables on tables.id = idxs.table_id where 
tables.name = 't';alter table t drop column b cascade;select count(*) from 
objects inner join dependencies on objects.id = dependencies.depend_id inner 
join columns on dependencies.id = columns.id inner join tables on 
columns.table_id = tables.id where tables.name = 't';select count(*) from 
dependencies inner join columns on dependencies.id = columns.id inner join 
tables on columns.table_id = 
 tables.id where tables.name = 't';select keys.type, keys.name, keys.rkey, 
keys.action from keys inner join tables on tables.id = keys.table_id where 
tables.name = 't';select idxs.type, idxs.name from idxs inner join tables on 
tables.id = idxs.table_id where tables.name = 't';
+% .keys,       .keys,  .keys,  .keys # table_name
+% type,        name,   rkey,   action # name
+% int, varchar,        int,    int # type
+% 1,   10,     2,      2 # length
+[ 1,   "t_b_unique",   -1,     -1      ]
+#select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';select 
count(*) from dependencies inner join columns on dependencies.id = columns.id 
inner join tables on columns.table_id = tables.id where tables.name = 
't';select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';select idxs.type, 
idxs.name from idxs inner join tables on tables.id = idxs.table_id where 
tables.name = 't';alter table t drop column b cascade;select count(*) from 
objects inner join dependencies on objects.id = dependencies.depend_id inner 
join columns on dependencies.id = columns.id inner join tables on 
columns.table_id = tables.id where tables.name = 't';select count(*) from 
dependencies inner join columns on dependencies.id = columns.id inner join 
tables on columns.table_id = 
 tables.id where tables.name = 't';select keys.type, keys.name, keys.rkey, 
keys.action from keys inner join tables on tables.id = keys.table_id where 
tables.name = 't';select idxs.type, idxs.name from idxs inner join tables on 
tables.id = idxs.table_id where tables.name = 't';
+% .idxs,       .idxs # table_name
+% type,        name # name
+% int, varchar # type
+% 1,   10 # length
+[ 0,   "t_b_unique"    ]
+#select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';select 
count(*) from dependencies inner join columns on dependencies.id = columns.id 
inner join tables on columns.table_id = tables.id where tables.name = 
't';select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';select idxs.type, 
idxs.name from idxs inner join tables on tables.id = idxs.table_id where 
tables.name = 't';alter table t drop column b cascade;select count(*) from 
objects inner join dependencies on objects.id = dependencies.depend_id inner 
join columns on dependencies.id = columns.id inner join tables on 
columns.table_id = tables.id where tables.name = 't';select count(*) from 
dependencies inner join columns on dependencies.id = columns.id inner join 
tables on columns.table_id = 
 tables.id where tables.name = 't';select keys.type, keys.name, keys.rkey, 
keys.action from keys inner join tables on tables.id = keys.table_id where 
tables.name = 't';select idxs.type, idxs.name from idxs inner join tables on 
tables.id = idxs.table_id where tables.name = 't';
+#select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';select 
count(*) from dependencies inner join columns on dependencies.id = columns.id 
inner join tables on columns.table_id = tables.id where tables.name = 
't';select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';select idxs.type, 
idxs.name from idxs inner join tables on tables.id = idxs.table_id where 
tables.name = 't';alter table t drop column b cascade;select count(*) from 
objects inner join dependencies on objects.id = dependencies.depend_id inner 
join columns on dependencies.id = columns.id inner join tables on 
columns.table_id = tables.id where tables.name = 't';select count(*) from 
dependencies inner join columns on dependencies.id = columns.id inner join 
tables on columns.table_id = 
 tables.id where tables.name = 't';select keys.type, keys.name, keys.rkey, 
keys.action from keys inner join tables on tables.id = keys.table_id where 
tables.name = 't';select idxs.type, idxs.name from idxs inner join tables on 
tables.id = idxs.table_id where tables.name = 't';
+% .L54 # table_name
+% L54 # name
+% bigint # type
+% 1 # length
+[ 0    ]
+#select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';select 
count(*) from dependencies inner join columns on dependencies.id = columns.id 
inner join tables on columns.table_id = tables.id where tables.name = 
't';select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';select idxs.type, 
idxs.name from idxs inner join tables on tables.id = idxs.table_id where 
tables.name = 't';alter table t drop column b cascade;select count(*) from 
objects inner join dependencies on objects.id = dependencies.depend_id inner 
join columns on dependencies.id = columns.id inner join tables on 
columns.table_id = tables.id where tables.name = 't';select count(*) from 
dependencies inner join columns on dependencies.id = columns.id inner join 
tables on columns.table_id = 
 tables.id where tables.name = 't';select keys.type, keys.name, keys.rkey, 
keys.action from keys inner join tables on tables.id = keys.table_id where 
tables.name = 't';select idxs.type, idxs.name from idxs inner join tables on 
tables.id = idxs.table_id where tables.name = 't';
+% .L54 # table_name
+% L54 # name
+% bigint # type
+% 1 # length
+[ 0    ]
+#select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';select 
count(*) from dependencies inner join columns on dependencies.id = columns.id 
inner join tables on columns.table_id = tables.id where tables.name = 
't';select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';select idxs.type, 
idxs.name from idxs inner join tables on tables.id = idxs.table_id where 
tables.name = 't';alter table t drop column b cascade;select count(*) from 
objects inner join dependencies on objects.id = dependencies.depend_id inner 
join columns on dependencies.id = columns.id inner join tables on 
columns.table_id = tables.id where tables.name = 't';select count(*) from 
dependencies inner join columns on dependencies.id = columns.id inner join 
tables on columns.table_id = 
 tables.id where tables.name = 't';select keys.type, keys.name, keys.rkey, 
keys.action from keys inner join tables on tables.id = keys.table_id where 
tables.name = 't';select idxs.type, idxs.name from idxs inner join tables on 
tables.id = idxs.table_id where tables.name = 't';
+% .keys,       .keys,  .keys,  .keys # table_name
+% type,        name,   rkey,   action # name
+% int, varchar,        int,    int # type
+% 1,   0,      1,      1 # length
+#select count(*) from objects inner join dependencies on objects.id = 
dependencies.depend_id inner join columns on dependencies.id = columns.id inner 
join tables on columns.table_id = tables.id where tables.name = 't';select 
count(*) from dependencies inner join columns on dependencies.id = columns.id 
inner join tables on columns.table_id = tables.id where tables.name = 
't';select keys.type, keys.name, keys.rkey, keys.action from keys inner join 
tables on tables.id = keys.table_id where tables.name = 't';select idxs.type, 
idxs.name from idxs inner join tables on tables.id = idxs.table_id where 
tables.name = 't';alter table t drop column b cascade;select count(*) from 
objects inner join dependencies on objects.id = dependencies.depend_id inner 
join columns on dependencies.id = columns.id inner join tables on 
columns.table_id = tables.id where tables.name = 't';select count(*) from 
dependencies inner join columns on dependencies.id = columns.id inner join 
tables on columns.table_id = 
 tables.id where tables.name = 't';select keys.type, keys.name, keys.rkey, 
keys.action from keys inner join tables on tables.id = keys.table_id where 
tables.name = 't';select idxs.type, idxs.name from idxs inner join tables on 
tables.id = idxs.table_id where tables.name = 't';
+% .idxs,       .idxs # table_name
+% type,        name # name
+% int, varchar # type
+% 1,   0 # length
+# MonetDB 5 server v11.33.4 (hg id: 101e6463524a+)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2019', using 8 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 15.527 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://localhost.localdomain:30301/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-26192/.s.monetdb.30301
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+#drop table t;
+# MonetDB 5 server v11.33.4 (hg id: 101e6463524a+)
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2019', using 8 threads
+# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers
+# Found 15.527 GiB available main-memory.
+# Copyright (c) 1993 - July 2008 CWI.
+# Copyright (c) August 2008 - 2019 MonetDB B.V., all rights reserved
+# Visit https://www.monetdb.org/ for further information
+# Listening for connection requests on 
mapi:monetdb://localhost.localdomain:30301/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-26192/.s.monetdb.30301
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+# 13:37:33 >  
+# 13:37:33 >  "Done."
+# 13:37:33 >  
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to