]> git.pond.sub.org Git - empserver/commitdiff
Fix how empdump rejects attempt to split table sect
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 8 May 2011 10:40:56 +0000 (12:40 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 25 Jun 2011 14:50:05 +0000 (16:50 +0200)
Split tables require the record index in the leftmost column.
defellipsis() correctly rejects "..." when the table doesn't have one.
It fails to reject it when it has one that is NSC_EXTRA, and thus not
permitted in a dump.  This is the case for table sect.  defellipsis()
happily succeeds, then chkflds() demands column "uid" if it's missing,
and rejects it if its present.

src/lib/common/xundump.c

index 54448f6474c33bff341b5c46dcffca62bf2e1a82..fb6ea7ad5da5de9c460cc11edb3b962731726b5d 100644 (file)
@@ -392,7 +392,7 @@ defellipsis(void)
 {
     struct castr *ca = ef_cadef(cur_type);
 
-    if (ca[0].ca_table != cur_type)
+    if (ca[0].ca_table != cur_type || (ca[0].ca_flags & NSC_EXTRA))
        return gripe("Table %s doesn't support ...", ef_nameof(cur_type));
     ellipsis = is_partial = 1;
     return 0;