ecpg generates illegal code, patch included

Поиск
Список
Период
Сортировка
От Christof Petig
Тема ecpg generates illegal code, patch included
Дата
Msg-id 37B1373D.AFDC6F07@wtal.de
обсуждение исходный текст
Список pgsql-bugs
Hello,

under admittedly strange conditions:
- connecting to default database
- disconnecting via 'exec sql commit work release'
ecpg generates wrong code.

The included patch cures this.

Best regards
    Christof

--- /home/christof/pgsql-cvs/pgsql/src/interfaces/ecpg/preproc/preproc.y    Mon Aug  2 11:14:41 1999
+++ preproc.y    Wed Aug 11 08:22:01 1999
@@ -4992,9 +4992,9 @@
         if (strncmp($1, "begin", 5) == 0)
                         yyerror("RELEASE does not make sense when beginning a transaction");

-        fprintf(yyout, "ECPGtrans(__LINE__, %s, \"%s\");", connection, $1);
+        fprintf(yyout, "ECPGtrans(__LINE__, %s, \"%s\");", connection ? connection : "NULL", $1);
         whenever_action(0);
-        fprintf(yyout, "ECPGdisconnect(\"\");");
+        fprintf(yyout, "ECPGdisconnect(__LINE__, \"\");");
         whenever_action(0);
         free($1);
     }

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Michael Richards
Дата:
Сообщение: View oddness...
Следующее
От: Christof Petig
Дата:
Сообщение: int2 unique index malfunction (btree corrupt)