cubicweb #3331906 sqlite: crash while executing complex query [validation pending]

trace:

Traceback (most recent call last)
 File "/home/auc/confs/unlish/logilab/common/testlib.py", line 661, in _proceed
   testfunc(*args, **kwargs)
 File "/home/auc/confs/unlish/cubes/unlish/test/test_security.py", line 127, in test_dashboard_sessions
   [e.dc_title() for e in r.execute(rql(r)).entities()])
 File "/home/auc/confs/unlish/cubicweb/dbapi.py", line 525, in execute
   build_descr=build_descr, **self._txid())
 File "/home/auc/confs/unlish/cubicweb/server/repository.py", line 790, in execute
   build_descr)
 File "/home/auc/confs/unlish/cubicweb/devtools/__init__.py", line 745, in new_execute
   rset = base_execute(*args, **kwargs)
 File "/home/auc/confs/unlish/cubicweb/server/querier.py", line 633, in execute
   results = plan.execute()
 File "/home/auc/confs/unlish/cubicweb/server/querier.py", line 174, in execute
   result = step.execute()
 File "/home/auc/confs/unlish/cubicweb/server/ssplanner.py", line 416, in execute
   inputmap)
 File "/home/auc/confs/unlish/cubicweb/server/sources/native.py", line 543, in syntax_tree_search
   cursor = self.doexec(session, sql, args)
 File "/home/auc/confs/unlish/cubicweb/server/sources/native.py", line 743, in doexec
   cursor.execute(str(query), args)
 File "/home/auc/confs/unlish/logilab/database/sqlite.py", line 166, in execute
   self.__class__.__bases__[0].execute(self, final_sql , kwargs)
OperationalError: user-defined aggregate's 'finalize' method raised error

rql:

DISTINCT Any A,B,C,D,E,F,G,H,I,J,K,L ORDERBY D DESC WITH A,B,C,D,E,F,G,H,I,J,K,L BEING ((Any S,N,D,STA,STO,P,E,L,SP,MA,ACT,GROUP_CONCAT(ATT) GROUPBY S,N,D,STA,STO,P,E,L,SP,MA,ACT WHERE S is Session, S name N, S description D?, S starttime STA, S endtime STO, S at_place P?, S use_equipment E?, S level L, S spirit SP, S max_attendees MA?, S activity ACT, ATT? attends S, A eid 1521, A attends S) UNION (Any S,N,D,STA,STO,P,E,L,SP,MA,ACT,GROUP_CONCAT(ATT) GROUPBY S,N,D,STA,STO,P,E,L,SP,MA,ACT WHERE S is Session, S name N, S description D?, S starttime STA, S endtime STO, S at_place P?, S use_equipment E?, S level L, S spirit SP, S max_attendees MA?, S activity ACT, ATT? attends S, A eid 1521, A organize S) UNION (Any S,N,D,STA,STO,P,E,L,SP,MA,ACT,GROUP_CONCAT(ATT) GROUPBY S,N,D,STA,STO,P,E,L,SP,MA,ACT WHERE S is Session, S name N, S description D?, S starttime STA, S endtime STO, S at_place P?, S use_equipment E?, S level L, S spirit SP, S max_attendees MA?, S activity ACT, ATT? attends S, A eid 1521, A friendship B, B attends S) UNION (Any S,N,D,STA,STO,P,E,L,SP,MA,ACT,GROUP_CONCAT(ATT) GROUPBY S,N,D,STA,STO,P,E,L,SP,MA,ACT WHERE S is Session, S name N, S description D?, S starttime STA, S endtime STO, S at_place P?, S use_equipment E?, S level L, S spirit SP, S max_attendees MA?, S activity ACT, ATT? attends S, A eid 1521, A friendship B, B organize S) UNION (Any S,N,D,STA,STO,P,E,L,SP,MA,ACT,GROUP_CONCAT(ATT) GROUPBY S,N,D,STA,STO,P,E,L,SP,MA,ACT WHERE S is Session, S name N, S description D?, S starttime STA, S endtime STO, S at_place P?, S use_equipment E?, S level L, S spirit SP, S max_attendees MA?, S activity ACT, ATT? attends S, A eid 1521, A friendship B, B friendship C, NOT A identity C, C attends S) UNION (Any S,N,D,STA,STO,P,E,L,SP,MA,ACT,GROUP_CONCAT(ATT) GROUPBY S,N,D,STA,STO,P,E,L,SP,MA,ACT WHERE S is Session, S name N, S description D?, S starttime STA, S endtime STO, S at_place P?, S use_equipment E?, S level L, S spirit SP, S max_attendees MA?, S activity ACT, ATT? attends S, A eid 1521, A friendship B, B friendship C, NOT A identity C, C organize S))

prioritynormal
typebug
done in3.17.11
load0.200
load left0.000
closed by#ea12401c0a68 [sqlutils] avoid a crash with sqlite when using group_concat (closes #3331906)
patch[sqlutils] avoid a crash with sqlite when using group_concat (closes #3331906) [folded][sqlutils] avoid a crash with sqlite when using group_concat (closes #3331906) [applied]