[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-recutils] Bug in recins ??
From: |
Jose E. Marchesi |
Subject: |
Re: [bug-recutils] Bug in recins ?? |
Date: |
Sun, 23 Jun 2013 21:10:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hi John.
I have a recfile:
%rec: Marks
%type: Class enum A B C
Name: Alfred
Class: A
Name: Bertram
Class: B
And I run the command
recins -f Name -v Xavier -f Class -v X myrec.rec
I expected this to give an error, since X is not a valid value for Class.
But instead,
the new record gets inserted without error. Is this a bug?
That operation is supporsed to insert a new _anonymous_ record in the
database, i.e. something like:
Name: Xavier
Class: X
%rec: Marks
%type: Class enum A B C
Name: Alfred
Class: A
Name: Bertram
Class: B
The code is doing exactly that, and thus not reporting any integrity
problem. However, a bug in rec-db was inserting the newly created
anonymous rset at the end of the rec_db_t list instead of the
beginning. As the result the writer was writing the record for Xavier
after the records of type Marks, thus creating the illusion the new
record was incorrectly added to that record set.
I just pushed a fix for this along with a new test and a documentation
snippet clarifying how recins behaves when no -t argument is provided in
the command line.
Thanks for the report :)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [bug-recutils] Bug in recins ??,
Jose E. Marchesi <=