REGRESSION: Correctly handle data in temporary file for SAVE subcommand.
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 4 Jan 2016 04:12:29 +0000 (20:12 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 4 Jan 2016 04:13:38 +0000 (20:13 -0800)
commit5e180775fa5a79e6f14b2798bd4a3d4ea9f51939
treefa90fb3e58baded6d2d31eb818bda3034207d40b
parent464cfa22be730169c6a7f3026af3ee29e93d35e1
REGRESSION: Correctly handle data in temporary file for SAVE subcommand.

The format of the data in the temporary file used by the SAVE subcommand is
basically unrelated to the format of the data in the active file, but the
code that created and wrote cases to it created them as clones of cases
in the active file.  This is simply incorrect behavior and causes nasty
failures when the active file has an inconvenient number of variables or
contains long string variables.

This commit fixes the problem by correctly creating the cases for the
temporary file using that file's own caseproto.

In addition, the assignment of caseproto indexes to variables in the
temporary file was broken for /SAVE=PRED, because it would skip index 0.
This commit also fixes that problem.

Bug #44877.
Reported by Scott.
src/language/stats/regression.c
tests/language/stats/regression.at