Update of /cvsroot/monetdb/sql/src/test/BugTracker-2009/Tests
In directory 
23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6882/test/BugTracker-2009/Tests

Modified Files:
      Tag: Aug2009
        All 
Added Files:
      Tag: Aug2009
        create_on_ro_db_crash.SF-2830238.py 
        create_on_ro_db_crash.SF-2830238.stable.err 
        create_on_ro_db_crash.SF-2830238.stable.out 
Log Message:
protect against schema changes in readonly mode.

added test


--- NEW FILE: create_on_ro_db_crash.SF-2830238.stable.err ---
stderr of test 'create_on_ro_db_crash.SF-2830238` in directory 
'src/test/BugTracker-2009` itself:


# 21:37:20 >  
# 21:37:20 >  /usr/bin/python create_on_ro_db_crash.SF-2830238.py 
create_on_ro_db_crash.SF-2830238 
# 21:37:20 >  

MAPI  = mone...@alf:39382
QUERY = create table t2 (a int);
ERROR = !schema statements cannot be executed on a readonly database.
# builtin opt   gdk_arch = 64bitx86_64-unknown-linux-gnu
# builtin opt   gdk_version = 1.32.0
# builtin opt   prefix = /ufs/niels/scratch/rc/Linux-x86_64
# builtin opt   exec_prefix = ${prefix}
# builtin opt   gdk_dbname = tst
# builtin opt   gdk_dbfarm = ${prefix}/var/MonetDB
# builtin opt   gdk_debug = 8
# builtin opt   gdk_alloc_map = yes
# builtin opt   gdk_vmtrim = yes
# builtin opt   monet_admin = adm
# builtin opt   monet_prompt = >
# builtin opt   monet_welcome = yes
# builtin opt   monet_mod_path = ${exec_prefix}/lib/MonetDB
# builtin opt   monet_daemon = yes
# builtin opt   host = localhost
# builtin opt   mapi_port = 50000
# builtin opt   mapi_noheaders = no
# builtin opt   mapi_debug = 0
# builtin opt   mapi_clients = 2
# builtin opt   sql_debug = 0
# builtin opt   standoff_ns = http://monetdb.cwi.nl/standoff
# builtin opt   standoff_start = start
# builtin opt   standoff_end = end
# config opt    prefix = /ufs/niels/scratch/rc/Linux-x86_64
# config opt    config = ${prefix}/etc/monetdb5.conf
# config opt    prefix = /ufs/niels/scratch/rc/Linux-x86_64
# config opt    exec_prefix = ${prefix}
# config opt    gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm
# config opt    gdk_dbname = demo
# config opt    gdk_alloc_map = no
# config opt    gdk_embedded = no
# config opt    gdk_debug = 0
# config opt    monet_mod_path = 
${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin
# config opt    monet_daemon = no
# config opt    monet_welcome = yes
# config opt    mero_msglog = ${prefix}/var/log/MonetDB/merovingian.log
# config opt    mero_errlog = ${prefix}/var/log/MonetDB/merovingian.log
# config opt    mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid
# config opt    mal_init = ${exec_prefix}/lib/MonetDB5/mal_init.mal
# config opt    mal_listing = 2
# config opt    mapi_port = 50000
# config opt    mapi_autosense = false
# config opt    mapi_open = false
# config opt    sql_optimizer = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,garbageCollector,dataflow,history,multiplex
# cmdline opt   config = /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf
# cmdline opt   gdk_nr_threads = 0
# cmdline opt   monet_mod_path = 
/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin
# cmdline opt   gdk_dbfarm = 
/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm
# cmdline opt   mapi_open = true
# cmdline opt   xrpc_open = true
# cmdline opt   mapi_port = 39382
# cmdline opt   xrpc_port = 41903
# cmdline opt   monet_prompt = 
# cmdline opt   gdk_readonly = yes
#warning: please don't forget to set your vault key!
#(see /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf)

# 21:37:20 >  
# 21:37:20 >  Done.
# 21:37:20 >  


U All
Index: All
===================================================================
RCS file: /cvsroot/monetdb/sql/src/test/BugTracker-2009/Tests/All,v
retrieving revision 1.37.2.23
retrieving revision 1.37.2.24
diff -u -d -r1.37.2.23 -r1.37.2.24
--- All 19 Sep 2009 18:53:34 -0000      1.37.2.23
+++ All 20 Sep 2009 19:39:36 -0000      1.37.2.24
@@ -92,6 +92,7 @@
 overflow.SF-2853458
 bit_and.SF-2850341
 double_count_limit_bug.SF-2862146
+create_on_ro_db_crash.SF-2830238
 #
 # The following test currently crashes and this fact (or its remains) might
 # harm sub-sequent tests; hence, this test should be last in this directory.

--- NEW FILE: create_on_ro_db_crash.SF-2830238.py ---
import sys
import os
import time
try:
    import subprocess
except ImportError:
    # use private copy for old Python versions
    import MonetDBtesting.subprocess26 as subprocess

def server():
    s = subprocess.Popen("%s --dbinit='include sql;' --set gdk_readonly=yes" % 
os.getenv('MSERVER'),
                         shell = True,
                         stdin = subprocess.PIPE,
                         stdout = subprocess.PIPE,
                         stderr = subprocess.PIPE)
    s.stdin.write('\nio.printf("\\nReady.\\n");\n')
    s.stdin.flush()
    while True:
        ln = s.stdout.readline()
        if not ln:
            print 'Unexpected EOF from server'
            sys.exit(1)
        sys.stdout.write(ln)
        if 'Ready' in ln:
            break
    return s

def client():
    c = subprocess.Popen("%s" % os.getenv('SQL_CLIENT'),
                         shell = True,
                         stdin = subprocess.PIPE,
                         stdout = subprocess.PIPE,
                         stderr = subprocess.PIPE)
    return c

script1 = '''\
create table t2 (a int);
'''

def main():
    s = server()
    c = client()
    o, e = c.communicate(script1)
    sys.stdout.write(o)
    sys.stderr.write(e)
    o, e = s.communicate()
    sys.stdout.write(o)
    sys.stderr.write(e)

if __name__ == '__main__':
    main()

--- NEW FILE: create_on_ro_db_crash.SF-2830238.stable.out ---
stdout of test 'create_on_ro_db_crash.SF-2830238` in directory 
'src/test/BugTracker-2009` itself:


# 21:37:20 >  
# 21:37:20 >  /usr/bin/python create_on_ro_db_crash.SF-2830238.py 
create_on_ro_db_crash.SF-2830238 
# 21:37:20 >  

# MonetDB server v5.14.0, based on kernel v1.32.0
# Serving database 'demo', using 4 threads
# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
# Copyright (c) 1993-July 2008 CWI.
# Copyright (c) August 2008-2009 MonetDB B.V., all rights reserved
# Visit http://monetdb.cwi.nl/ for further information
# Listening for connection requests on mapi:monetdb://alf.ins.cwi.nl:39382/
# MonetDB/SQL module v2.32.0 loaded

Ready.

# 21:37:20 >  
# 21:37:20 >  Done.
# 21:37:20 >  



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to