Update of /cvsroot/monetdb/sql/src/include
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10921/src/include
Modified Files:
sql_catalog.h sql_list.h sql_mem.h sql_relation.h
Log Message:
moved most of the DDL statements into mal
Index: sql_list.h
===================================================================
RCS file: /cvsroot/monetdb/sql/src/include/sql_list.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- sql_list.h 7 Jan 2010 15:24:32 -0000 1.20
+++ sql_list.h 10 Jan 2010 15:33:34 -0000 1.21
@@ -30,6 +30,7 @@
typedef void (*fdestroy) (void *);
typedef struct list {
+ sql_allocator *sa;
fdestroy destroy;
node *h;
node *t;
@@ -39,6 +40,7 @@
typedef int (*traverse_func) (void *clientdata, int seqnr, void *data);
extern list *list_create(fdestroy destroy);
+extern list *list_new(sql_allocator *sa);
extern void list_destroy(list *l);
extern int list_length(list *l);
Index: sql_mem.h
===================================================================
RCS file: /cvsroot/monetdb/sql/src/include/sql_mem.h,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- sql_mem.h 7 Jan 2010 15:24:32 -0000 1.22
+++ sql_mem.h 10 Jan 2010 15:33:34 -0000 1.23
@@ -76,11 +76,13 @@
extern sql_allocator *sa_create(void);
extern sql_allocator *sa_reset( sql_allocator *sa );
extern char *sa_alloc( sql_allocator *sa, size_t sz );
+extern char *sa_zalloc( sql_allocator *sa, size_t sz );
extern void sa_destroy( sql_allocator *sa );
extern char *sa_strndup( sql_allocator *sa, const char *s, size_t l);
extern char *sa_strdup( sql_allocator *sa, const char *s);
#define SA_NEW( sa, type ) ((type*)sa_alloc( sa, sizeof(type)) )
+#define SA_ZNEW( sa, type ) ((type*)sa_zalloc( sa, sizeof(type)) )
#define SA_NEW_ARRAY( sa, type, size ) (type*)sa_alloc( sa,
((size)*sizeof(type)))
#define _strlen(s) (int)strlen(s)
Index: sql_catalog.h
===================================================================
RCS file: /cvsroot/monetdb/sql/src/include/sql_catalog.h,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- sql_catalog.h 7 Jan 2010 15:24:32 -0000 1.69
+++ sql_catalog.h 10 Jan 2010 15:33:34 -0000 1.70
@@ -130,6 +130,7 @@
extern void base_destroy(sql_base * b);
typedef struct changeset {
+ sql_allocator *sa;
fdestroy destroy;
struct list *set;
struct list *dset;
@@ -137,6 +138,7 @@
} changeset;
extern void cs_init(changeset * cs, fdestroy destroy);
+extern void cs_new(changeset * cs, sql_allocator *sa);
extern void cs_destroy(changeset * cs);
extern void cs_add(changeset * cs, void *elm, int flag);
extern void cs_add_before(changeset * cs, node *n, void *elm);
@@ -283,6 +285,7 @@
struct list *columns; /* list of sql_kc */
struct sql_table *t;
+ int drop_action; /* only needed for alter drop key */
} sql_key;
typedef struct sql_ukey { /* pkey, ukey */
@@ -367,6 +370,7 @@
bit null;
char *def;
char unique; /* NOT UNIQUE, UNIQUE, SUB_UNIQUE */
+ int drop_action; /* only used for alter statements */
struct sql_table *t;
void *data;
Index: sql_relation.h
===================================================================
RCS file: /cvsroot/monetdb/sql/src/include/sql_relation.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- sql_relation.h 7 Jan 2010 15:24:32 -0000 1.41
+++ sql_relation.h 10 Jan 2010 15:33:34 -0000 1.42
@@ -69,6 +69,11 @@
// todo make enum
#define DDL_OUTPUT 1
+#define DDL_LIST 2
+
+#define DDL_CREATE_SEQ 5
+#define DDL_ALTER_SEQ 6
+#define DDL_DROP_SEQ 7
#define DDL_RELEASE 11
#define DDL_COMMIT 12
@@ -77,14 +82,15 @@
#define DDL_CREATE_SCHEMA 21
#define DDL_DROP_SCHEMA 22
-#define DDL_ALTER_SCHEMA 23
+
#define DDL_CREATE_TABLE 24
#define DDL_DROP_TABLE 25
-#define DDL_ALTER_TABLE 26
-#define DDL_CREATE_VIEW 27
-#define DDL_DROP_VIEW 35
-#define DDL_CREATE_INDEX 36
-#define DDL_DROP_INDEX 37
+#define DDL_CREATE_VIEW 26
+#define DDL_DROP_VIEW 27
+#define DDL_ALTER_TABLE 28
+
+#define DDL_CREATE_INDEX 30
+#define DDL_DROP_INDEX 31
#define DDL_CREATE_FUNCTION 41
#define DDL_DROP_FUNCTION 42
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins