Ying Zhang wrote: > Update of /cvsroot/monetdb/pathfinder/runtime/xrpc/admin/Tests > In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22023 > > Added Files: > Tag: XQuery_0-24
Checked in in wrong branch. > All add_del_doc.prologue.src add_del_doc.stable.err > add_del_doc.stable.out add_del_doc.xq.in add_trusted.mil > backup_restore.prologue.src backup_restore.stable.err > backup_restore.stable.out backup_restore.xq.in > db_env.prologue.src db_env.stable.err db_env.stable.out > db_env.xq.in db_stats.prologue.src db_stats.stable.err > db_stats.stable.out db_stats.xq.in > Log Message: > Tests for the admin XQuery functions > > > > > --- NEW FILE: db_stats.stable.err --- > stderr of test 'db_stats` in directory 'runtime/xrpc/admin` itself: > > > # 11:06:16 > > # 11:06:16 > Mserver > "--config=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/etc/MonetDB.conf" > --debug=10 --set > "monet_mod_path=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/lib:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/bin" > --set > "gdk_dbfarm=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/dbfarm" > --set > "sql_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/sql_logs" > --set > "xquery_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/xquery_logs" > --set mapi_open=true --set xrpc_open=true --set mapi_port=36716 --set > xrpc_port=46327 --set monet_prompt= --trace > "--dbname=mTests_runtime_xrpc_admin" "--dbinit= module(pathfinder);" > db_stats.prologue ; echo ; echo Over.. > # 11:06:16 > > > > # 11:06:16 > > # 11:06:16 > mclient -lxquery -fxml -umonetdb -Pmonetdb --host=jarl > --port=36716 db_stats.xq > # 11:06:16 > > > > # 11:06:17 > > # 11:06:17 > Done. > # 11:06:17 > > > > --- NEW FILE: All --- > add_del_doc > backup_restore > db_stats > db_env > > --- NEW FILE: backup_restore.stable.out --- > stdout of test 'backup_restore` in directory 'runtime/xrpc/admin` itself: > > > # 11:19:35 > > # 11:19:35 > Mserver > "--config=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/etc/MonetDB.conf" > --debug=10 --set > "monet_mod_path=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/lib:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/bin" > --set > "gdk_dbfarm=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/dbfarm" > --set > "sql_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/sql_logs" > --set > "xquery_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/xquery_logs" > --set mapi_open=true --set xrpc_open=true --set mapi_port=37835 --set > xrpc_port=44669 --set monet_prompt= --trace > "--dbname=mTests_runtime_xrpc_admin" "--dbinit= module(pathfinder);" > backup_restore.prologue ; echo ; echo Over.. > # 11:19:35 > > > > > # MonetDB Server v4.24.0 > # based on GDK v1.24.1 > # Copyright (c) 1993-2008, CWI. All rights reserved. > # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs; dynamically > linked. > # Visit http://monetdb.cwi.nl/ for further information. > # PF/Tijah module v0.5.0 loaded. http://dbappl.cs.utwente.nl/pftijah > # MonetDB/XQuery module v0.24.1 loaded (default back-end is 'milprint_summer') > # XRPC administrative console at http://127.0.0.1:44669/admin > > printf("\nReady.\n"); > > Ready. > quit(); > > Over.. > > # 11:19:36 > > # 11:19:36 > mclient -lxquery -fxml -umonetdb -Pmonetdb --host=jarl > --port=37835 backup_restore.xq > # 11:19:36 > > > <?xml version="1.0" encoding="utf-8"?> > <XQueryResult><db-before-backup><document updatable="true" > collection="xmark">xmark1.xml</document><document updatable="true" > collection="xmark">xmark2.xml</document></db-before-backup></XQueryResult> > <?xml version="1.0" encoding="utf-8"?> > <XQueryResult></XQueryResult> > <?xml version="1.0" encoding="utf-8"?> > <XQueryResult><db-after-del/></XQueryResult> > <?xml version="1.0" encoding="utf-8"?> > <XQueryResult><db-after-restore><document updatable="false" > collection="xmark" uri="">xmark1.xml</document><document updatable="false" > collection="xmark" > uri="">xmark2.xml</document></db-after-restore></XQueryResult> > > # 11:19:37 > > # 11:19:37 > Done. > # 11:19:37 > > > > --- NEW FILE: db_env.stable.out --- > stdout of test 'db_env` in directory 'runtime/xrpc/admin` itself: > > > # 12:02:34 > > # 12:02:34 > Mserver > "--config=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/etc/MonetDB.conf" > --debug=10 --set > "monet_mod_path=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/lib:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/bin" > --set > "gdk_dbfarm=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/dbfarm" > --set > "sql_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/sql_logs" > --set > "xquery_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/xquery_logs" > --set mapi_open=true --set xrpc_open=true --set mapi_port=32688 --set > xrpc_port=47901 --set monet_prompt= --trace > "--dbname=mTests_runtime_xrpc_admin" "--dbinit= module(pathfinder);" > db_env.prologue ; echo ; echo Over.. > # 12:02:34 > > > > > # MonetDB Server v4.24.0 > # based on GDK v1.24.1 > # Copyright (c) 1993-2008, CWI. All rights reserved. > # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs; dynamically > linked. > # Visit http://monetdb.cwi.nl/ for further information. > # PF/Tijah module v0.5.0 loaded. http://dbappl.cs.utwente.nl/pftijah > # MonetDB/XQuery module v0.24.1 loaded (default back-end is 'milprint_summer') > # XRPC administrative console at http://127.0.0.1:47901/admin > > printf("\nReady.\n"); > > Ready. > quit(); > > Over.. > > # 12:02:34 > > # 12:02:34 > mclient -lxquery -fxml -umonetdb -Pmonetdb --host=jarl > --port=32688 db_env.xq > # 12:02:34 > > > <?xml version="1.0" encoding="utf-8"?> > <XQueryResult> > <bun head="config"> > # > /net/jarl/export/scratch0/zhang/monet-install/stable/debug/etc/MonetDB.conf > </bun> > <bun head="datadir"> > # /net/jarl/export/scratch0/zhang/monet-install/stable/debug/share > </bun> > <bun head="gdk_alloc_map"> > # no > </bun> > <bun head="gdk_arch"> > # 64bitx86_64-unknown-linux-gnu > </bun> > <bun head="gdk_dbfarm"> > # > /net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/dbfarm > </bun> > <bun head="gdk_dbname"> > # mTests_runtime_xrpc_admin > </bun> > <bun head="gdk_mem_bigsize"> > # 262144 > </bun> > <bun head="gdk_mem_maxsize"> > # 6786091110 > </bun> > <bun head="gdk_mem_pagebits"> > # 14 > </bun> > <bun head="gdk_version"> > # 1.24.0 > </bun> > <bun head="gdk_vmtrim"> > # yes > </bun> > <bun head="host"> > # localhost > </bun> > <bun head="mapi_clients"> > # 2 > </bun> > <bun head="mapi_open"> > # true > </bun> > <bun head="mapi_port"> > # 32688 > </bun> > <bun head="monet_admin"> > # adm > </bun> > <bun head="monet_cwd"> > # /ufs/zhang/homepage/ROOT/mTests/runtime/xrpc/admin > </bun> > <bun head="monet_version"> > # 4.24.0 > </bun> > <bun head="standoff_end"> > # end > </bun> > <bun head="standoff_ns"> > # > </bun> > <bun head="standoff_start"> > # start > </bun> > <bun head="xquery_backend"> > # milprint_summer > </bun> > <bun head="xquery_cacheMB"> > # 100 > </bun> > <bun head="xquery_cacherules"> > # > </bun> > <bun head="xquery_logdir"> > # > /net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/xquery_logs > </bun> > <bun head="xquery_output"> > # dm > </bun> > <bun head="xquery_procMB"> > # 128 > </bun> > <bun head="xrpc_admin"> > # 127.0.0.1;http://127.0.0.1;localhost;http://localhost > </bun> > <bun head="xrpc_open"> > # true > </bun> > <bun head="xrpc_options"> > # > </bun> > <bun head="xrpc_port"> > # 47901 > </bun> > <bun head="xrpc_trusted"> > # > http://monetdb.cwi.nl;http://127.0.0.1;http://localhost;/net/jarl/export/scratch0/zhang/monet-install/stable/debug/share/MonetDB/xrpc/export > </bun> > </XQueryResult> > > # 12:02:35 > > # 12:02:35 > Done. > # 12:02:35 > > > > --- NEW FILE: add_del_doc.prologue.src --- > $TSTSRCDIR/add_trusted.mil > > --- NEW FILE: add_del_doc.xq.in --- > (: > 1. add two xmark documents and show the results; > 2. delete the two added documents and show the results. > > Test the following admin functions: > - adm:collections() > - adm:documents() > - adm:documents($collections) > - adm:add-doc() > - adm:del-col() > - adm:del-doc() > :) > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > (execute at {"$HOST:$XRPCPORT"} > {adm:add-doc("http://$HOST:$XRPCPORT/admin/xmark1.xml", > "xmark1.xml", "xmark", 10)}, > execute at {"$HOST:$XRPCPORT"} > {adm:add-doc("http://$HOST:$XRPCPORT/admin/xmark2.xml", > "xmark2.xml", "xmark", 10)} > ) > <> > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > (<collections-after-add>{ > execute at {"$HOST:$XRPCPORT"} {adm:collections()} > }</collections-after-add>, > <documents-after-add>{ > let $docs := execute at {"$HOST:$XRPCPORT"} {adm:documents()} > return > for $d in $docs > return element document { > attribute updatable {$d/@updatable}, > attribute collection {$d/@collection}, > $d/text() } > }</documents-after-add>, > <documents-of-collection-after-add>{ > let $docs := execute at {"$HOST:$XRPCPORT"} {adm:documents("xmark")} > return > for $d in $docs > return element document { > attribute updatable {$d/@updatable}, > attribute collection {$d/@collection}, > $d/text() } > }</documents-of-collection-after-add> > ) > <> > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > execute at {"$HOST:$XRPCPORT"} {adm:del-col("xmark")} > <> > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > (<collections-after-del>{ > execute at {"$HOST:$XRPCPORT"} {adm:collections()} > }</collections-after-del>, > <documents-after-del>{ > let $docs := execute at {"$HOST:$XRPCPORT"} {adm:documents()} > return > for $d in $docs > return element document { > attribute updatable {$d/@updatable}, > attribute collection {$d/@collection}, > $d/text() } > }</documents-after-del>, > <documents-of-collection-after-del>{ > let $docs := execute at {"$HOST:$XRPCPORT"} {adm:documents("xmark")} > return > for $d in $docs > return element document { > attribute updatable {$d/@updatable}, > attribute collection {$d/@collection}, > $d/text() } > }</documents-of-collection-after-del> > ) > > > --- NEW FILE: add_del_doc.stable.err --- > stderr of test 'add_del_doc` in directory 'runtime/xrpc/admin` itself: > > > # 16:44:49 > > # 16:44:49 > Mserver > "--config=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/etc/MonetDB.conf" > --debug=10 --set > "monet_mod_path=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/lib:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/bin" > --set > "gdk_dbfarm=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/dbfarm" > --set > "sql_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/sql_logs" > --set > "xquery_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/xquery_logs" > --set mapi_open=true --set xrpc_open=true --set mapi_port=36099 --set > xrpc_port=49971 --set monet_prompt= --trace > "--dbname=mTests_runtime_xrpc_admin" "--dbinit= module(pathfinder);" > add_del_doc.prologue ; echo ; echo Over.. > # 16:44:49 > > > > # 16:44:49 > > # 16:44:49 > mclient -lxquery -fxml -umonetdb -Pmonetdb --host=jarl > --port=36099 add_del_doc.xq > # 16:44:49 > > > > # 16:44:50 > > # 16:44:50 > Done. > # 16:44:50 > > > > --- NEW FILE: db_stats.prologue.src --- > $TSTSRCDIR/add_trusted.mil > > --- NEW FILE: db_env.stable.err --- > stderr of test 'db_env` in directory 'runtime/xrpc/admin` itself: > > > # 11:50:19 > > # 11:50:19 > Mserver > "--config=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/etc/MonetDB.conf" > --debug=10 --set > "monet_mod_path=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/lib:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/bin" > --set > "gdk_dbfarm=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/dbfarm" > --set > "sql_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/sql_logs" > --set > "xquery_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/xquery_logs" > --set mapi_open=true --set xrpc_open=true --set mapi_port=36039 --set > xrpc_port=47247 --set monet_prompt= --trace > "--dbname=mTests_runtime_xrpc_admin" "--dbinit= module(pathfinder);" > db_env.prologue ; echo ; echo Over.. > # 11:50:19 > > > > # 11:50:19 > > # 11:50:19 > mclient -lxquery -fxml -umonetdb -Pmonetdb --host=jarl > --port=36039 db_env.xq > # 11:50:19 > > > > # 11:50:20 > > # 11:50:20 > Done. > # 11:50:20 > > > > --- NEW FILE: db_stats.stable.out --- > stdout of test 'db_stats` in directory 'runtime/xrpc/admin` itself: > > > # 11:06:16 > > # 11:06:16 > Mserver > "--config=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/etc/MonetDB.conf" > --debug=10 --set > "monet_mod_path=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/lib:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/bin" > --set > "gdk_dbfarm=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/dbfarm" > --set > "sql_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/sql_logs" > --set > "xquery_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/xquery_logs" > --set mapi_open=true --set xrpc_open=true --set mapi_port=36716 --set > xrpc_port=46327 --set monet_prompt= --trace > "--dbname=mTests_runtime_xrpc_admin" "--dbinit= module(pathfinder);" > db_stats.prologue ; echo ; echo Over.. > # 11:06:16 > > > > > # MonetDB Server v4.24.1 > # based on GDK v1.24.1 > # Copyright (c) 1993-2008, CWI. All rights reserved. > # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs; dynamically > linked. > # Visit http://monetdb.cwi.nl/ for further information. > # PF/Tijah module v0.5.0 loaded. http://dbappl.cs.utwente.nl/pftijah > # MonetDB/XQuery module v0.24.1 loaded (default back-end is 'milprint_summer') > # XRPC administrative console at http://127.0.0.1:46327/admin > > printf("\nReady.\n"); > > Ready. > quit(); > > Over.. > > # 11:06:16 > > # 11:06:16 > mclient -lxquery -fxml -umonetdb -Pmonetdb --host=jarl > --port=36716 db_stats.xq > # 11:06:16 > > > <?xml version="1.0" encoding="utf-8"?> > <XQueryResult> > <bun head="xquery_index_curMB"> > # 0 > </bun> > <bun head="xquery_cache_curdocs"> > # 0 > </bun> > <bun head="xquery_cache_curMB"> > # 0 > </bun> > <bun head="xquery_log_curMB"> > # 0 > </bun> > <bun head="gdk_vm_cursize"> > # 182517760 > </bun> > <bun head="gdk_mem_cursize"> > # 67584024 > </bun> > </XQueryResult> > > # 11:06:17 > > # 11:06:17 > Done. > # 11:06:17 > > > > --- NEW FILE: db_stats.xq.in --- > (: > Test the following admin functions: > - adm:db-stats() > Filter out uninteresting differences in the results > :) > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > for $stat in execute at {"$HOST:$XRPCPORT"} {adm:db-stats()} > return > (text { " " }, > element bun { > $stat/@head, > text { " # " }, > string($stat/@tail), > text { " " } > }), > text { " " } > > --- NEW FILE: backup_restore.stable.err --- > stderr of test 'backup_restore` in directory 'runtime/xrpc/admin` itself: > > > # 11:19:35 > > # 11:19:35 > Mserver > "--config=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/etc/MonetDB.conf" > --debug=10 --set > "monet_mod_path=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/lib:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/bin" > --set > "gdk_dbfarm=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/dbfarm" > --set > "sql_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/sql_logs" > --set > "xquery_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/xquery_logs" > --set mapi_open=true --set xrpc_open=true --set mapi_port=37835 --set > xrpc_port=44669 --set monet_prompt= --trace > "--dbname=mTests_runtime_xrpc_admin" "--dbinit= module(pathfinder);" > backup_restore.prologue ; echo ; echo Over.. > # 11:19:35 > > > > # 11:19:36 > > # 11:19:36 > mclient -lxquery -fxml -umonetdb -Pmonetdb --host=jarl > --port=37835 backup_restore.xq > # 11:19:36 > > > > # 11:19:37 > > # 11:19:37 > Done. > # 11:19:37 > > > > --- NEW FILE: db_env.prologue.src --- > $TSTSRCDIR/add_trusted.mil > > --- NEW FILE: add_trusted.mil --- > module("pathfinder"); > module("unix"); > > var TSTSRCDIR := getenv("TSTSRCDIR"); > var TSTTRGDIR := getenv("TSTTRGDIR"); > var HOST := getenv("HOST"); > var XRPCPORT := getenv("XRPCPORT"); > > add_xrpc_trusted(TSTSRCDIR); > add_xrpc_trusted(TSTTRGDIR); > add_xrpc_trusted("http://"+HOST+":"+XRPCPORT); > > commit(); > > > --- NEW FILE: add_del_doc.stable.out --- > stdout of test 'add_del_doc` in directory 'runtime/xrpc/admin` itself: > > > # 16:44:49 > > # 16:44:49 > Mserver > "--config=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/etc/MonetDB.conf" > --debug=10 --set > "monet_mod_path=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/lib:/net/jarl/export/scratch0/zhang/monet-install/stable/debug/lib/MonetDB4/bin" > --set > "gdk_dbfarm=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/dbfarm" > --set > "sql_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/sql_logs" > --set > "xquery_logdir=/net/jarl/export/scratch0/zhang/monet-install/stable/debug/var/MonetDB4/xquery_logs" > --set mapi_open=true --set xrpc_open=true --set mapi_port=36099 --set > xrpc_port=49971 --set monet_prompt= --trace > "--dbname=mTests_runtime_xrpc_admin" "--dbinit= module(pathfinder);" > add_del_doc.prologue ; echo ; echo Over.. > # 16:44:49 > > > > > # MonetDB Server v4.24.0 > # based on GDK v1.24.1 > # Copyright (c) 1993-2008, CWI. All rights reserved. > # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs; dynamically > linked. > # Visit http://monetdb.cwi.nl/ for further information. > # PF/Tijah module v0.5.0 loaded. http://dbappl.cs.utwente.nl/pftijah > # MonetDB/XQuery module v0.24.1 loaded (default back-end is 'milprint_summer') > # XRPC administrative console at http://127.0.0.1:49971/admin > > printf("\nReady.\n"); > > Ready. > quit(); > > Over.. > > # 16:44:49 > > # 16:44:49 > mclient -lxquery -fxml -umonetdb -Pmonetdb --host=jarl > --port=36099 add_del_doc.xq > # 16:44:49 > > > <?xml version="1.0" encoding="utf-8"?> > <XQueryResult><collections-before-add/><documents-before-add/></XQueryResult> > <?xml version="1.0" encoding="utf-8"?> > <XQueryResult><collections-after-add><collection updatable="true" size="511 > KiB" > numDocs="2">xmark</collection></collections-after-add><documents-after-add><document > updatable="true" collection="xmark">xmark1.xml</document><document > updatable="true" > collection="xmark">xmark2.xml</document></documents-after-add><documents-of-collection-after-add><document > updatable="true" collection="xmark">xmark1.xml</document><document > updatable="true" > collection="xmark">xmark2.xml</document></documents-of-collection-after-add></XQueryResult> > <?xml version="1.0" encoding="utf-8"?> > <XQueryResult><collections-after-del/><documents-after-del/><documents-of-collection-after-del/></XQueryResult> > > # 16:44:50 > > # 16:44:50 > Done. > # 16:44:50 > > > > --- NEW FILE: db_env.xq.in --- > (: > Test the following admin functions: > - adm:db-env() > Filter out uninteresting differences in the results > :) > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > for $env in execute at {"$HOST:$XRPCPORT"} {adm:db-env()} > return > (text { " " }, > element bun { > $env/@head, > text { " # " }, > string($env/@tail), > text { " " } > }), > text { " " } > > > --- NEW FILE: backup_restore.prologue.src --- > $TSTSRCDIR/add_trusted.mil > > --- NEW FILE: backup_restore.xq.in --- > (: > 1. show current documents in DB > 2. backup current DB > 3. delete all documents in DB > 4. restore backup > > Test the following admin functions: > - adm:add-doc() > - adm:documents() > - adm:backup() > - adm:backup-col() > - adm:del-col() > - adm:del-doc() > - adm:restore() > - adm:restore-col() > :) > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > (execute at {"$HOST:$XRPCPORT"} > {adm:add-doc("http://$HOST:$XRPCPORT/admin/xmark1.xml", > "xmark1.xml", "xmark", 10)}, > execute at {"$HOST:$XRPCPORT"} > {adm:add-doc("http://$HOST:$XRPCPORT/admin/xmark2.xml", > "xmark2.xml", "xmark", 10)} > ) > <> > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > <db-before-backup>{ > let $docs := execute at {"$HOST:$XRPCPORT"} {adm:documents()} > return > for $d in $docs > return element document { > attribute updatable {$d/@updatable}, > attribute collection {$d/@collection}, > $d/text() } > }</db-before-backup> > <> > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > execute at {"$HOST:$XRPCPORT"} {adm:backup("test")} > <> > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > execute at {"$HOST:$XRPCPORT"} {adm:del-col("xmark")} > <> > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > <db-after-del>{ > execute at {"$HOST:$XRPCPORT"} {adm:collections()} > }</db-after-del> > <> > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > execute at {"$HOST:$XRPCPORT"} {adm:restore("test", 0)} > <> > import module namespace adm = "http://monetdb.cwi.nl/XQuery/admin/" > at "http://$HOST:$XRPCPORT/admin/admin.xq"; > <db-after-restore>{ > let $docs := execute at {"$HOST:$XRPCPORT"} {adm:documents()} > return > for $d in $docs > return element document { > attribute updatable {$d/@updatable}, > attribute collection {$d/@collection}, > attribute uri {$d/@uri}, > $d/text() } > }</db-after-restore> > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Monetdb-pf-checkins mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins -- Sjoerd Mullender
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Monetdb-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-developers
