From: Marco van Wieringen Date: Sun, 4 Apr 2010 08:21:47 +0000 (+0200) Subject: As we have a multithreaded application let tell that to esqlcc so it can optimize... X-Git-Tag: Release-5.0.2~112 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=db52d239f5b8d2b3c29f123630cb192305485838;p=bacula%2Fbacula As we have a multithreaded application let tell that to esqlcc so it can optimize for that. --- diff --git a/bacula/src/cats/Makefile.in b/bacula/src/cats/Makefile.in index 2ad0078d72..1a5e271d58 100644 --- a/bacula/src/cats/Makefile.in +++ b/bacula/src/cats/Makefile.in @@ -58,7 +58,7 @@ all: Makefile libbacsql$(DEFAULT_ARCHIVE_TYPE) esql: @echo "Generating myingres.c from myingres.sc" - $(NO_ECHO)$(II_SYSTEM)/ingres/bin/esqlcc -extension=c myingres.sc + $(NO_ECHO)$(II_SYSTEM)/ingres/bin/esqlcc -multi -extension=c myingres.sc @echo "Generating myingres.h from myingres.sh" $(NO_ECHO)$(II_SYSTEM)/ingres/bin/esqlcc -extension=h myingres.sh diff --git a/bacula/src/cats/myingres.c b/bacula/src/cats/myingres.c index 8800c60578..48a797a66d 100644 --- a/bacula/src/cats/myingres.c +++ b/bacula/src/cats/myingres.c @@ -32,7 +32,8 @@ #include #include #include -extern IISQLCA sqlca; /* SQL Communications Area */ +IISQLCA *IIsqlca(); +#define sqlca (*(IIsqlca())) #include #include #include @@ -334,9 +335,9 @@ static inline int INGfetchAll(const char *query, INGresult *ing_res) /* # line 367 "myingres.sc" */ /* open */ { IIsqInit(&sqlca); - IIcsOpen((char *)"c2",11417,2807); + IIcsOpen((char *)"c2",19318,7414); IIwritio(0,(short *)0,1,32,0,(char *)"s2"); - IIcsQuery((char *)"c2",11417,2807); + IIcsQuery((char *)"c2",19318,7414); } /* # line 368 "myingres.sc" */ /* host code */ if ((check = INGcheck()) < 0) { @@ -347,7 +348,7 @@ static inline int INGfetchAll(const char *query, INGresult *ing_res) /* # line 374 "myingres.sc" */ /* fetch */ { IIsqInit(&sqlca); - if (IIcsRetScroll((char *)"c2",11417,2807,-1,-1) != 0) { + if (IIcsRetScroll((char *)"c2",19318,7414,-1,-1) != 0) { IIcsDaGet(0,desc); IIcsERetrieve(); } /* IIcsRetrieve */ @@ -372,7 +373,7 @@ static inline int INGfetchAll(const char *query, INGresult *ing_res) /* # line 394 "myingres.sc" */ /* close */ { IIsqInit(&sqlca); - IIcsClose((char *)"c2",11417,2807); + IIcsClose((char *)"c2",19318,7414); } /* # line 396 "myingres.sc" */ /* host code */ ing_res->status = ING_COMMAND_OK;