Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5706/src/server
Modified Files:
Tag: SQL_2-16
sql_mvc.mx sql_schema.mx
Log Message:
cannot use debug,explain,trace,profile with schema statements
Index: sql_mvc.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_mvc.mx,v
retrieving revision 1.172.2.4
retrieving revision 1.172.2.5
diff -u -d -r1.172.2.4 -r1.172.2.5
--- sql_mvc.mx 16 Mar 2007 14:54:35 -0000 1.172.2.4
+++ sql_mvc.mx 16 Mar 2007 16:26:51 -0000 1.172.2.5
@@ -53,6 +53,7 @@
} modes_t;
#define CACHE_MODE(m) (m==m_normal||m==m_profile||m==m_debug||m==m_trace)
+#define QUERY_MODE(m) (m==m_normal||m==m_inplace||m==m_execute)
typedef struct sql_var {
struct stmt *s;
Index: sql_schema.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_schema.mx,v
retrieving revision 1.111.2.4
retrieving revision 1.111.2.5
diff -u -d -r1.111.2.4 -r1.111.2.5
--- sql_schema.mx 16 Mar 2007 14:54:36 -0000 1.111.2.4
+++ sql_schema.mx 16 Mar 2007 16:26:51 -0000 1.111.2.5
@@ -584,6 +584,7 @@
list_destroy(func_l);
list_destroy(view_id_l);
stmt_destroy(sq);
+ sq = NULL;
}
scope_close(scp);
@@ -1789,6 +1790,9 @@
{
stmt *ret = NULL;
+ if (!QUERY_MODE(sql->mode))
+ return sql_error(sql, 05, "Schema statements are directly
executed and therefor cannot be debugged, explained, profiled, traced or used
in a prepare statement");
+
switch (s->token) {
case SQL_CREATE_SCHEMA:
{
-------------------------------------------------------------------------
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