]> git.sur5r.net Git - bacula/bacula/commitdiff
As we have a multithreaded application let tell that to esqlcc so it can optimize...
authorMarco van Wieringen <mvw@planets.elm.net>
Sun, 4 Apr 2010 08:21:47 +0000 (10:21 +0200)
committerMarco van Wieringen <mvw@planets.elm.net>
Fri, 9 Apr 2010 11:28:38 +0000 (13:28 +0200)
bacula/src/cats/Makefile.in
bacula/src/cats/myingres.c

index 2ad0078d72ad76a9b2ecc916dc0f890e6d6ea11e..1a5e271d580cb663fb2a9dcdfb6b4c2c815c3dd4 100644 (file)
@@ -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
 
index 8800c6057841acac8a6455a01f8b20b84c683bfb..48a797a66df2de4c4f1679692f75a5308646c713 100644 (file)
@@ -32,7 +32,8 @@
 #include <eqpname.h>
 #include <eqdefcc.h>
 #include <eqsqlca.h>
-extern IISQLCA sqlca;   /* SQL Communications Area */
+IISQLCA *IIsqlca();
+#define sqlca (*(IIsqlca()))
 #include <eqsqlda.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -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;