3 Commits

Author SHA1 Message Date
alexhudson 3e31ed5b3e Tag and release for 0.5 2009-06-14 15:01:06 +00:00
alexhudson bb2db885c0 Changes for 0.5.0rc1 release 2009-05-29 17:19:57 +00:00
alexhudson 7fd76b99a8 Branching trunk for 0.5 release. 2009-05-29 16:26:06 +00:00
8 changed files with 49 additions and 18 deletions
+3 -12
View File
@@ -447,18 +447,9 @@ done
# remove any flags which tell us not to autogen things # remove any flags which tell us not to autogen things
#rm -f import/sqlite3/NO-AUTO-GEN #rm -f import/sqlite3/NO-AUTO-GEN
SVNREV="`svnversion . 2>/dev/null`" echo \#define BONGO_BUILD_BRANCH \"0.5\" > ./include/bongo-buildinfo.h
if test x$SVNREV = x; then echo \#define BONGO_BUILD_VSTR \"v\" >> ./include/bongo-buildinfo.h
echo Unable to discern build version echo \#define BONGO_BUILD_VER \"1073\" >> ./include/bongo-buildinfo.h
echo \#define BONGO_BUILD_BRANCH \"unknown\" > ./include/bongo-buildinfo.h
echo \#define BONGO_BUILD_VSTR \"\" >> ./include/bongo-buildinfo.h
echo \#define BONGO_BUILD_VER \"0\" >> ./include/bongo-buildinfo.h
else
echo SVN Rev at $SVNREV
echo \#define BONGO_BUILD_BRANCH \"trunk\" > ./include/bongo-buildinfo.h
echo \#define BONGO_BUILD_VSTR \"r\" >> ./include/bongo-buildinfo.h
echo \#define BONGO_BUILD_VER \"$SVNREV\" >> ./include/bongo-buildinfo.h
fi
conf_flags="--enable-maintainer-mode" conf_flags="--enable-maintainer-mode"
+1 -1
View File
@@ -3,7 +3,7 @@ AC_PREREQ(2.52)
AC_INIT(src/libs/msgapi/msgapi.c) AC_INIT(src/libs/msgapi/msgapi.c)
AM_INIT_AUTOMAKE(bongo, 0.1.0) AM_INIT_AUTOMAKE(bongo, 0.5.0)
# this space is here to trick autogen.sh # this space is here to trick autogen.sh
AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT([external])
+1 -1
View File
@@ -73,7 +73,7 @@ typedef struct _MsgSQLHandle {
} stmts; } stmts;
BongoMemStack *memstack; BongoMemStack *memstack;
XplSemaphore *transactionLock; XplSemaphore transactionLock;
int transactionDepth; int transactionDepth;
int lockTimeoutMs; int lockTimeoutMs;
BOOL isNew; // have we just created this? BOOL isNew; // have we just created this?
+4
View File
@@ -757,10 +757,14 @@ StoreObjectIterQueryBuilder(StoreClient *client, QueryBuilder *builder, BOOL sho
} }
MemFree(sql);
QueryBuilderFinish(builder); QueryBuilderFinish(builder);
return 1000; return 1000;
abort: abort:
if (sql) {
MemFree(sql);
}
MsgSQLAbortTransaction(client->storedb); MsgSQLAbortTransaction(client->storedb);
QueryBuilderFinish(builder); QueryBuilderFinish(builder);
+31 -2
View File
@@ -43,11 +43,33 @@ QueryBuilderStart(QueryBuilder *builder)
void void
QueryBuilderFinish(QueryBuilder *builder) QueryBuilderFinish(QueryBuilder *builder)
{ {
unsigned int x;
StorePropInfo *newprop;
ExtraLink *link;
QueryBuilder_Param *param;
QueryParserFinish(&builder->internal_parser); QueryParserFinish(&builder->internal_parser);
QueryParserFinish(&builder->external_parser); QueryParserFinish(&builder->external_parser);
/* free all the properties */
for(x=0;x<BongoArrayCount(builder->properties);x++) {
newprop = BongoArrayIndex(builder->properties, StorePropInfo *, x);
MemFree(newprop);
}
BongoArrayFree(builder->properties, TRUE); BongoArrayFree(builder->properties, TRUE);
/* free all the links */
for(x=0;x<BongoArrayCount(builder->links);x++) {
link = BongoArrayIndex(builder->links, ExtraLink *, x);
MemFree(link);
}
BongoArrayFree(builder->links, TRUE); BongoArrayFree(builder->links, TRUE);
/* free all the parameters */
for(x=0;x<BongoArrayCount(builder->parameters);x++) {
param = BongoArrayIndex(builder->parameters, QueryBuilder_Param *, x);
MemFree(param);
}
BongoArrayFree(builder->parameters, TRUE); BongoArrayFree(builder->parameters, TRUE);
} }
@@ -307,6 +329,7 @@ QueryBuilderCreateSQL(QueryBuilder *builder, char **output)
{ {
BongoStringBuilder b; BongoStringBuilder b;
unsigned int i; unsigned int i;
int ccode;
if (BongoStringBuilderInit(&b)) { if (BongoStringBuilderInit(&b)) {
// unable to start... ick // unable to start... ick
@@ -359,7 +382,8 @@ QueryBuilderCreateSQL(QueryBuilder *builder, char **output)
// add in any constraints specified on the various columns // add in any constraints specified on the various columns
if (builder->int_query) { if (builder->int_query) {
if (QueryExpressionToSQL(builder, builder->internal_parser.start, &b)) { if (QueryExpressionToSQL(builder, builder->internal_parser.start, &b)) {
return -2; ccode = -2;
goto abort;
} }
} }
if (builder->int_query && builder->ext_query) { if (builder->int_query && builder->ext_query) {
@@ -367,7 +391,8 @@ QueryBuilderCreateSQL(QueryBuilder *builder, char **output)
} }
if (builder->ext_query) { if (builder->ext_query) {
if (QueryExpressionToSQL(builder, builder->external_parser.start, &b)) { if (QueryExpressionToSQL(builder, builder->external_parser.start, &b)) {
return -3; ccode = -3;
goto abort;
} }
} }
@@ -399,6 +424,10 @@ QueryBuilderCreateSQL(QueryBuilder *builder, char **output)
BongoStringBuilderDestroy(&b); BongoStringBuilderDestroy(&b);
return 0; return 0;
abort:
BongoStringBuilderDestroy(&b);
return ccode;
} }
static int static int
+7 -1
View File
@@ -15,6 +15,7 @@
* Parser of Store Protocol queries into structures, for later use in SQL queries * Parser of Store Protocol queries into structures, for later use in SQL queries
*/ */
#include "stored.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@@ -151,7 +152,7 @@ QueryParserRun(struct parser_state *state)
char *token; char *token;
struct expression *current_expression = state->start; struct expression *current_expression = state->start;
while (pull_token(&(state->query), &token) != -1) { while (pull_token(&(state->query_ptr), &token) != -1) {
if (current_expression < state->start) { if (current_expression < state->start) {
// ran off the top of our stack, but there were still tokens // ran off the top of our stack, but there were still tokens
DEBUG_MESSAGE("ERR: tokens remaining in data\n"); DEBUG_MESSAGE("ERR: tokens remaining in data\n");
@@ -261,6 +262,8 @@ QueryParserStart(struct parser_state *state, const char *query, int max_expr) {
return -2; return -2;
} }
state->query_ptr = state->query;
return 0; return 0;
} }
@@ -274,6 +277,9 @@ QueryParserFinish(struct parser_state *state) {
if (state->start != NULL) { if (state->start != NULL) {
MemFree(state->start); MemFree(state->start);
} }
if (state->query != NULL) {
MemFree(state->query);
}
state->start = state->last = NULL; state->start = state->last = NULL;
state->entries = 0; state->entries = 0;
} }
+1
View File
@@ -21,6 +21,7 @@ struct parser_state {
struct expression *last; struct expression *last;
int entries; int entries;
char *query; char *query;
char *query_ptr;
}; };
int QueryParserStart(struct parser_state *state, const char *query, int max_expr); int QueryParserStart(struct parser_state *state, const char *query, int max_expr);
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE log4c SYSTEM ""> <!DOCTYPE log4c SYSTEM "">
<log4c version="0.1.0"> <log4c version="0.5.0rc1">
<config> <config>
<bufsize>0</bufsize> <bufsize>0</bufsize>