[erlang-bugs] Bug in QLC ?

Klas Johansson klas.johansson@REDACTED
Tue Mar 25 12:54:25 CET 2008


On Tue, Mar 25, 2008 at 11:28 AM, Torbjorn Tornkvist
<tobbe@REDACTED> wrote:
> Hi,
>
>  (Sorry if this bug-report is coming out twice, I tried to
>  post it via trapexit.org yesterday but seem to have failed...)
>
>  I've been playing around with my natural DSL engine which generates
>  QLC questions like the one below:
>
>  [{X1#invoice.invno,X2#person.fname,X2#person.lname} ||
>   X1 <- mnesia:table(invoice),
>   X1#invoice.eid == 308,
>   X2 <- mnesia:table(person),
>   X1#invoice.pno == X2#person.pno]
>
>  It causes qlc to crash:
>
>  =ERROR REPORT==== 25-Mar-2008::11:19:03 ===
>  exit: {function_clause,[{file,check_args,[false]},
>                         {file,open,2},
>                         {qlc,'-sort_cursor_list_output/2-fun-0-',4},
>                         {file_sorter,outfun,2},
>                         {file_sorter,merge_files,5},
>                         {file_sorter,last_merge,2},
>                         {file_sorter,do_sort,5},
>                         {qlc,do_sort,5}]}
>
>  So perhaps my QLC-question is wrong, or it is a bug in qlc?
>
>  Running R11B-2 on Linux. The QLC was being run in a dirty context.
>
>  Cheers, Tobbe
>  (Ps. The DSL query was: for every invoice and person record where eid ==
>  308 and inv_pno == pno return invno, fname and lname as a table )
>
>  _______________________________________________
>  erlang-bugs mailing list
>  erlang-bugs@REDACTED
>  http://www.erlang.org/mailman/listinfo/erlang-bugs
>

Hi,

I stumbled upon this bug a year ago.  It was corrected in
stdlib-1.14.4 (which seems to correspond to R11B-4):

 --- stdlib-1.14.4 ------------------------------------------------------------
[...]
    OTP-6562  When sorting the operands of a join operation, QLC called
              file:open/3 with bad arguments. This bug has been fixed.

(from http://www.erlang.org/download/otp_src_R11B-4.readme)


BR,
Klas



More information about the erlang-bugs mailing list