Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv29119/src/backends/monet5
Modified Files:
Tag: SQL_2-16
sql.mx
Log Message:
fixes for the following bugs
1) set role while user isn't granted that role succeeded incorrectly
2) role grants were incorrectly stored (cut/paste problem)
3) automatic sequence numbers (AUTO_INCREMENT and SERIAL) were
allways created in the 'sys' schema.
4) the schema part of sequence numbers statements was never used
5) the NEXT VALUE, get_value, restart should use the schema part of
the sequence number
Index: sql.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql.mx,v
retrieving revision 1.207.2.6
retrieving revision 1.207.2.7
diff -u -d -r1.207.2.6 -r1.207.2.7
--- sql.mx 25 Feb 2007 11:18:33 -0000 1.207.2.6
+++ sql.mx 16 Mar 2007 14:54:35 -0000 1.207.2.7
@@ -89,15 +89,15 @@
address getVariable
comment "Get the value of a session variable";
-command next_value( sequence:str ):lng
+command next_value( sname:str, sequence:str ):lng
address mvc_next_value
comment "return the next value of the sequence";
-command get_value( sequence:str ):lng
+command get_value( sname:str, sequence:str ):lng
address mvc_get_value
comment "return the current value of the sequence";
-command restart( sequence:str, start:lng ):lng
+command restart( sname:str, sequence:str, start:lng ):lng
address mvc_restart_seq
comment "restart the sequence with value start";
@@ -586,9 +586,9 @@
sql5_export str setVariable(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
sql5_export str getVariable(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
sql5_export str sql_variables(int *res);
-sql5_export str mvc_next_value(lng *res, str *seqname);
-sql5_export str mvc_get_value(lng *res, str *seqname);
-sql5_export str mvc_restart_seq(lng *res, str *seqname, lng *start);
+sql5_export str mvc_next_value(lng *res, str *sname, str *seqname);
+sql5_export str mvc_get_value(lng *res, str *sname, str *seqname);
+sql5_export str mvc_restart_seq(lng *res, str *sname, str *seqname, lng
*start);
sql5_export str mvc_affected_rows_int(int *r, int *nr, str *w);
sql5_export str zero_or_one(ptr ret, int *bid);
sql5_export str not_unique(bit *ret, int *bid);
@@ -937,7 +937,7 @@
}
str
-mvc_next_value(lng *res, str *seqname)
+mvc_next_value(lng *res, str *sname, str *seqname)
{
mvc *m = NULL;
str msg = getContext(&m, NULL);
@@ -945,7 +945,7 @@
if (msg)
return msg;
- s = m->session->schema;
+ s = mvc_bind_schema(m, *sname);
if (s) {
sql_sequence *seq = find_sql_sequence(s, *seqname);
@@ -956,7 +956,7 @@
}
str
-mvc_get_value(lng *res, str *seqname)
+mvc_get_value(lng *res, str *sname, str *seqname)
{
mvc *m = NULL;
str msg = getContext(&m, NULL);
@@ -964,7 +964,7 @@
if (msg)
return msg;
- s = m->session->schema;
+ s = mvc_bind_schema(m, *sname);
if (s) {
sql_sequence *seq = find_sql_sequence(s, *seqname);
@@ -975,7 +975,7 @@
}
str
-mvc_restart_seq(lng *res, str *seqname, lng *start)
+mvc_restart_seq(lng *res, str *sname, str *seqname, lng *start)
{
mvc *m = NULL;
str msg = getContext(&m, NULL);
@@ -983,7 +983,7 @@
if (msg)
return msg;
- s = m->session->schema;
+ s = mvc_bind_schema(m, *sname);
if (s) {
sql_sequence *seq = find_sql_sequence(s, *seqname);
-------------------------------------------------------------------------
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