Changeset: 899b01f930a0 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=899b01f930a0
Modified Files:
        
Branch: sciql
Log Message:

Merged from default


diffs (234 lines):

diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -27,7 +27,7 @@
 AC_CANONICAL_HOST
 AC_CANONICAL_TARGET
 dnl use tar-ustar since we have long (longer than 99 characters) file names
-AM_INIT_AUTOMAKE([tar-ustar])
+AM_INIT_AUTOMAKE([tar-ustar no-dist-gzip dist-bzip2])
 AC_CONFIG_SRCDIR([gdk/gdk.mx])
 AM_CONFIG_HEADER([monetdb_config.h])
 AC_SUBST([CONFIG_H], [monetdb_config.h])
diff --git a/gdk/gdk_posix.mx b/gdk/gdk_posix.mx
--- a/gdk/gdk_posix.mx
+++ b/gdk/gdk_posix.mx
@@ -318,7 +318,7 @@
 #ifdef WIN32
 int GDK_mem_pagebits = 16;     /* on windows, the mmap addresses can be set by 
the 64KB */
 #else
-int GDK_mem_pagebits = 14;     /* on linux, 4KB pages can be addressed */
+int GDK_mem_pagebits = 14;     /* on linux, 4KB pages can be addressed (but we 
use 16KB) */
 #endif
 
 #ifndef MAP_NORESERVE
diff --git a/sql/backends/monet5/sql.mx b/sql/backends/monet5/sql.mx
--- a/sql/backends/monet5/sql.mx
+++ b/sql/backends/monet5/sql.mx
@@ -119,11 +119,11 @@
 easier to later re-use part of the catalog code in a separately.
 @mal
 
-pattern setVariable( varname:str, value:any_1 ):void
+pattern setVariable(mvc:ptr, varname:str, value:any_1 ):ptr
 address setVariable
 comment "Set the value of a session variable";
 
-pattern getVariable( varname:str ):any_1
+pattern getVariable(mvc:ptr, varname:str ):any_1
 address getVariable
 comment "Get the value of a session variable";
 
@@ -354,6 +354,7 @@
 command not_uniques( b:bat[:oid,:oid]) :bat[:oid,:oid] 
 address not_unique_oids 
 comment "return not unique oids" ;
+
 command not_uniques( b:bat[:oid,:wrd]) :bat[:oid,:oid] 
 address not_unique_oids ;
 
@@ -2260,21 +2261,20 @@
 str
 setVariable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
+       ptr *res = (ptr*)getArgReference(stk, pci, 0);
+       mvc *m = *(mvc**)getArgReference(stk, pci, 1);
+       str varname   = *(str *) getArgReference(stk, pci, 2);
+       int mtype = getArgType(mb, pci, 3);
+       ValRecord *src;
+       char *msg = NULL;
        char buf[BUFSIZ];
-       mvc *m = NULL;
-       int mtype = getArgType(mb, pci, 2);
-       str varname   = *(str *) getArgReference(stk, pci, 1);
-       str msg = getContext(cntxt,mb, &m, NULL);
-       ValRecord *src;
 
        (void) cntxt;
-       if (msg)
-               return msg;
-
+       *res = (ptr)m;
        if (mtype < 0 || mtype >= 255)
                throw(SQL, "sql.setVariable", "failed");
        if ( strcmp("optimizer",  varname)== 0) {
-               msg = setOptimizers(*(str *) getArgReference(stk,pci,2));
+               msg = setOptimizers(*(str *) getArgReference(stk,pci,3));
                if ( msg != NULL && strcmp(msg,"default_pipe") == 0 )
                        return MAL_SUCCEED;
                msg = SQLvalidatePipeline();
@@ -2283,7 +2283,7 @@
                        return msg;
                }
        }
-       src = &stk->stk[getArg(pci, 2)];
+       src = &stk->stk[getArg(pci, 3)];
        if (stack_find_var(m, varname)) {
                stack_set_var(m, varname, src);
        } else {
@@ -2302,16 +2302,12 @@
 str
 getVariable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
-       mvc *m = NULL;
        int mtype = getArgType(mb, pci, 0);
-       str varname   = *(str *) getArgReference(stk, pci, 1);
-       str msg = getContext(cntxt,mb, &m, NULL);
+       mvc *m = *(mvc**)getArgReference(stk, pci, 1);
+       str varname   = *(str *) getArgReference(stk, pci, 2);
        ValRecord *dst, *src;
 
        (void) cntxt;
-       if (msg)
-               return msg;
-
        if (mtype < 0 || mtype >= 255)
                throw(SQL, "sql.getVariable", "failed");
        src = stack_get_var(m, varname);
diff --git a/sql/backends/monet5/sql_gencode.mx 
b/sql/backends/monet5/sql_gencode.mx
--- a/sql/backends/monet5/sql_gencode.mx
+++ b/sql/backends/monet5/sql_gencode.mx
@@ -578,6 +578,7 @@
                                if (VAR_GLOBAL(s->flag)) { /* globals */
                                        int tt = tail_type(s)->type->localtype;
                                        q = newStmt1(mb, sqlRef, "getVariable");
+                                       q = pushArgument(mb, q, sql->mvc_var);
                                        q = pushStr(mb, q, 
s->op1->op4.aval->data.val.sval);
                                        setVarType(mb, getArg(q, 0), tt);
                                        setVarUDFtype(mb,getArg(q,0));
@@ -1988,8 +1989,10 @@
                        } else {
                                int vn = _dumpstmt(sql, mb, s->op1);
                                q = newStmt1(mb, sqlRef, "setVariable");
+                               q = pushArgument(mb, q, sql->mvc_var);
                                q = pushArgument(mb, q, vn);
-                               s->nr = 1;
+                               getArg(q, 0) = sql->mvc_var= 
newTmpVariable(mb,TYPE_ptr);
+                               sql->mvc_var = s->nr = getDestVar(q);
                        }
                        (void) pushArgument(mb, q, r);
                }       break;
diff --git a/sql/test/Dependencies/Tests/Dependencies.stable.err 
b/sql/test/Dependencies/Tests/Dependencies.stable.err
--- a/sql/test/Dependencies/Tests/Dependencies.stable.err
+++ b/sql/test/Dependencies/Tests/Dependencies.stable.err
@@ -10,55 +10,55 @@
 # 23:01:45 >  Mtimeout -timeout 60 ./Dependencies.SQL Dependencies 
 # 23:01:45 >  
 
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = DROP USER monetdb;
-ERROR = !DROP USER: MALException:removeUser:cannot remove yourself
-MAPI  = monetdb@localhost:30913
+ERROR = !SQLException:sql.catalog:DROP USER: MALException:removeUser:cannot 
remove yourself
+MAPI  = monetdb@alf:38889
 QUERY = DROP SCHEMA test;
 ERROR = !SQLException:sql.catalog:DROP SCHEMA: unable to drop schema 'test' 
(there are database objects which depend on it
-MAPI  = monet_test@localhost:30913
+MAPI  = monet_test@alf:38889
 QUERY = CREATE SCHEMA "test_2" AUTHORIZATION "public";
 ERROR = !CREATE SCHEMA: insufficient privileges for user 'monet_test'
-MAPI  = monet_test@localhost:30913
+MAPI  = monet_test@alf:38889
 QUERY = DROP USER monetdb;
-ERROR = !DROP USER: InvalidCredentialsException:requireAdmin:access denied for 
user 'monet_test'
-MAPI  = monetdb@localhost:30913
+ERROR = !SQLException:sql.catalog:DROP USER: 
InvalidCredentialsException:requireAdmin:access denied for user 'monet_test'
+MAPI  = monetdb@alf:38889
 QUERY = CREATE INDEX id_age_index ON v1(id,age);
-ERROR = !CREATE INDEX: cannot create index on view 'v1'
-MAPI  = monetdb@localhost:30913
+ERROR = !SQLException:sql.catalog:CREATE INDEX: cannot create index on view 
'v1'
+MAPI  = monetdb@alf:38889
 QUERY = ALTER TABLE t1 DROP COLUMN id;
 ERROR = !ALTER TABLE: cannot drop column 'id': there are database objects 
which depend on it
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = ALTER TABLE v1 DROP COLUMN age;
 ERROR = !ALTER TABLE: cannot drop column from VIEW 'v1'
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = ALTER TABLE t2 ADD FOREIGN KEY(age_v1) REFERENCES v1(age);
 ERROR = !CONSTRAINT FOREIGN KEY: could not find referenced PRIMARY KEY in 
table 'v1'
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = DROP TABLE t1;
 ERROR = !SQLException:sql.catalog:DROP TABLE: FOREIGN KEY t2.t2_id_t1_fkey 
depends on t1
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = DROP VIEW v1;
 ERROR = !SQLException:sql.catalog:unable to drop view v1 (there are database 
objects which depend on it)
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = DROP TABLE t2; 
 ERROR = !SQLException:sql.catalog:DROP TABLE: unable to drop table t2 (there 
are database objects which depend on it)
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = DROP FUNCTION f1;
 ERROR = !DROP FUNCTION: there are database objects dependent on function f1;
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = DROP INDEX id_age_index;
-ERROR = !DROP INDEX: no such index 'id_age_index'
-MAPI  = monetdb@localhost:30913
+ERROR = !SQLException:sql.catalog:DROP INDEX: no such index 'id_age_index'
+MAPI  = monetdb@alf:38889
 QUERY = DROP VIEW v1;
 ERROR = !SQLException:sql.catalog:unable to drop view v1 (there are database 
objects which depend on it)
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = DROP TABLE t1;
 ERROR = !SQLException:sql.catalog:DROP TABLE: unable to drop table t1 (there 
are database objects which depend on it)
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = DROP function f1;
 ERROR = !DROP FUNCTION: there are database objects dependent on function f1;
-MAPI  = monetdb@localhost:30913
+MAPI  = monetdb@alf:38889
 QUERY = DROP SCHEMA test_2;
 ERROR = !SQLException:sql.catalog:DROP SCHEMA: name test_2 does not exist
 
diff --git a/sql/test/Views/Tests/Views.stable.err 
b/sql/test/Views/Tests/Views.stable.err
--- a/sql/test/Views/Tests/Views.stable.err
+++ b/sql/test/Views/Tests/Views.stable.err
@@ -71,16 +71,16 @@
 # 16:08:20 >  /export/scratch0/fabian/prefix64/usr/bin/python2.6 Views.SQL.py 
Views 
 # 16:08:20 >  
 
-MAPI  = monetdb@volund:35971
+MAPI  = monetdb@alf:38889
 QUERY = ALTER TABLE v1 DROP COLUMN age;
 ERROR = !ALTER TABLE: cannot drop column from VIEW 'v1'
-MAPI  = monetdb@volund:35971
+MAPI  = monetdb@alf:38889
 QUERY = CREATE TRIGGER trigger_test AFTER INSERT ON v1
                 INSERT INTO t2 values(1,23);
 ERROR = !CREATE TRIGGER: cannot create trigger on view 'trigger_test'
-MAPI  = monetdb@volund:35971
+MAPI  = monetdb@alf:38889
 QUERY = CREATE INDEX id_age_index ON v1(id,age);
-ERROR = !CREATE INDEX: cannot create index on view 'v1'
+ERROR = !SQLException:sql.catalog:CREATE INDEX: cannot create index on view 
'v1'
 
 
 # 15:59:37 >  
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to