Check record uid comes first in split config tables

setnum() requires the record uid to come first, so we better ensure it
does.
This commit is contained in:
Markus Armbruster 2011-04-27 07:15:00 +02:00
parent cb3e35cb3a
commit 5b9d31a4b3

View file

@ -408,6 +408,10 @@ chkflds(void)
struct castr *ca = ef_cadef(cur_type); struct castr *ca = ef_cadef(cur_type);
int i, len, cafldsmax, res = 0; int i, len, cafldsmax, res = 0;
/* Record index must come first, to make cur_id work, see setnum() */
if (ca[0].ca_table == cur_type && caflds[0] && fldca[0] != &ca[0])
res = gripe("Header field %s must come first", ca[0].ca_name);
if (is_partial) { if (is_partial) {
/* Need a join field, use 0-th selector */ /* Need a join field, use 0-th selector */
if (!caflds[0]) if (!caflds[0])