Update of /cvsroot/monetdb/sql/src/backends/monet4
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6989/src/backends/monet4

Modified Files:
        sql_server.mx 
Log Message:
propagated changes of Friday Mar 16 2007 - Thursday Mar 22 2007
from the SQL_2-16 branch to the development trunk


Index: sql_server.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet4/sql_server.mx,v
retrieving revision 1.160
retrieving revision 1.161
diff -u -d -r1.160 -r1.161
--- sql_server.mx       16 Mar 2007 12:36:24 -0000      1.160
+++ sql_server.mx       22 Mar 2007 09:26:53 -0000      1.161
@@ -74,13 +74,13 @@
        .COMMAND setVariable( mvc m, str varname, any::1 val ) = setVariable;
                "Set the value of a session variable in the mvc structure"
 
-       .COMMAND mvc_next_value( mvc m, str sequence ) : lng = mvc_next_value;
+       .COMMAND mvc_next_value( mvc m, str sname, str seqname ) : lng = 
mvc_next_value;
                "return the next value of the sequence"
 
-       .COMMAND mvc_get_value( mvc m, str sequence ) : lng = mvc_get_value;
+       .COMMAND mvc_get_value( mvc m, str sname, str sequence ) : lng = 
mvc_get_value;
                "return the current value of the sequence"
 
-       .COMMAND mvc_restart_seq( mvc m, str sequence, lng start ) : lng = 
mvc_restart_seq;
+       .COMMAND mvc_restart_seq( mvc m, str sname, str sequence, lng start ) : 
lng = mvc_restart_seq;
                "restart the sequence with value start"
 @-
 The updates against the relational tables are collected in separate
@@ -414,10 +414,10 @@
 
 /* TODO pass also the schema name */
 int
-mvc_next_value(lng *res, mvc *C, str seqname)
+mvc_next_value(lng *res, mvc *C, str sname, str seqname)
 {
        mvc *c = *(mvc**)C;
-       sql_schema *s = c->session->schema;
+       sql_schema *s = mvc_bind_schema(c, sname);
 
        if (s) {
                sql_sequence *seq = find_sql_sequence(s, seqname);
@@ -428,10 +428,10 @@
        return GDK_FAIL;
 }
 int
-mvc_get_value(lng *res, mvc *C, str seqname)
+mvc_get_value(lng *res, mvc *C, str sname, str seqname)
 {
        mvc *c = *(mvc**)C;
-       sql_schema *s = c->session->schema;
+       sql_schema *s = mvc_bind_schema(c, sname);
 
        if (s) {
                sql_sequence *seq = find_sql_sequence(s, seqname);
@@ -443,10 +443,10 @@
 }
 
 int
-mvc_restart_seq(lng *res, mvc *C, str seqname, lng *start)
+mvc_restart_seq(lng *res, mvc *C, str sname, str seqname, lng *start)
 {
        mvc *c = *(mvc**)C;
-       sql_schema *s = c->session->schema;
+       sql_schema *s = mvc_bind_schema(c, sname);
 
        if (s) {
                sql_sequence *seq = find_sql_sequence(s, seqname);
@@ -1381,14 +1381,14 @@
 
 # forward reference, will be filled in the sql session 
 var myc := mvc(ptr(nil));
-proc next_value( str v ) : lng {
-       return mvc_next_value(myc, v);
+proc next_value( str sname, str v ) : lng {
+       return mvc_next_value(myc, sname, v);
 }
-proc get_value( str v ) : lng {
-       return mvc_get_value(myc, v);
+proc get_value( str sname, str v ) : lng {
+       return mvc_get_value(myc, sname, v);
 }
-proc restart( str seq, lng v ) : lng {
-       return mvc_restart_seq(myc, seq, v);
+proc restart( str sname, str seq, lng v ) : lng {
+       return mvc_restart_seq(myc, sname, seq, v);
 }
 
 proc SQLgroup(BAT[oid,any] a) : grp {


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to