diff mbox series

[OSSTEST,2/7] mg-schema-test-database: Be slightly more defensive

Message ID 20210427180033.9439-3-iwj@xenproject.org (mailing list archive)
State New
Headers show
Series Fixes for postgresql etc. upgrade | expand

Commit Message

Ian Jackson April 27, 2021, 6 p.m. UTC
Signed-off-by: Ian Jackson <iwj@xenproject.org>
---
 mg-schema-test-database | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mg-schema-test-database b/mg-schema-test-database
index e69b9881..b49fbecf 100755
--- a/mg-schema-test-database
+++ b/mg-schema-test-database
@@ -381,7 +381,8 @@  END
 			print "sequences+=\" $1\"\n";
 		} elsif (m/^CREATE TABLE (\w+)/) {
 			$table=$1;
-		} elsif (m/^\s*flight\s+integer/) {
+		} elsif (m/^\s*flight\s+integer\s/) {
+			die unless $table;
 			print "ftables+=\" $table\"\n";
 		} elsif ($table && m/^\)\;$/) {
 			print "tables+=\" $table\"\n";