Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8758985

Browse files
committed
Prevent drop database failure from showing.
1 parent 37e7c7d commit 8758985

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/include/c.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
99
* Portions Copyright (c) 1994, Regents of the University of California
1010
*
11-
* $Id: c.h,v 1.66 2000/03/20 04:02:46 momjian Exp $
11+
* $Id: c.h,v 1.67 2000/04/12 05:24:50 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -531,9 +531,11 @@ typedef struct Exception
531531
*
532532
*/
533533
#define Trap(condition, exception) \
534-
{ if ((assert_enabled) && (condition)) \
534+
do { \
535+
if ((assert_enabled) && (condition)) \
535536
ExceptionalCondition(CppAsString(condition), &(exception), \
536-
(char*)NULL, __FILE__, __LINE__); }
537+
(char*)NULL, __FILE__, __LINE__); \
538+
} while (0)
537539

538540
/*
539541
* TrapMacro is the same as Trap but it's intended for use in macros:
@@ -577,9 +579,11 @@ extern int assert_enabled;
577579
*
578580
*/
579581
#define LogTrap(condition, exception, printArgs) \
580-
{ if ((assert_enabled) && (condition)) \
582+
do { \
583+
if ((assert_enabled) && (condition)) \
581584
ExceptionalCondition(CppAsString(condition), &(exception), \
582-
vararg_format printArgs, __FILE__, __LINE__); }
585+
vararg_format printArgs, __FILE__, __LINE__); \
586+
} while (0)
583587

584588
/*
585589
* LogTrapMacro is the same as LogTrap but it's intended for use in macros:

src/test/regress/checkresults

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
[ "$#" -eq 0 ] && set regress.out
66

7-
for file in `cat "$@" | grep 'failed$' | cut -d " " -f 1`
7+
for file in `cat "$@" | grep 'failed$' | grep -v '^dropdb: ' | cut -d " " -f 1`
88
do
99
echo "====== $file ======"
1010
diff -w expected/$file.out results

0 commit comments

Comments
 (0)