If i run the following query from Python 3.7 using the sqlite3 DBAPI adapter or from sqlitebrowser I get a segmentation fault.

The query runs error free on PostgreSQL 9.6

The query fails if the 'in' list has more than two entries.

Any ideas? I could create a test database but it will take a while as it has personal information in which I would have to obfuscate to avoid falling foul of the GDPR.

Query:

select  m.member_no, p.title, p.initials, p.forename, p.surname,
m.address_1, m.address_2, m.address_3, m.post_town, m.county,
m.post_code, m.country, s.class_name, m.joined, s.renewed,
s.expires, s.pmt_method, m.non_renewal, m.share_info,
m.last_changed, p.person_id, r.region
from person p join mem_pers mp on p.person_id = mp.person_id
join member m on mp.member_no = m.member_no
join current_member_status s on m.member_no = s.member_no
left join in_region r on m.county = r.county
 join mem_dates d on s.expires > d.renewal_date where m.non_renewal = ''
and p.person_id in (200,270,271,355,427,484,512,598,685,724,847,922,973,1095,1189,1371,1421,1483,1516,1523,1592,1799,1866,2024,2076,2077)
 order by m.country, m.county, p.surname, p.initials

Core dump (the interesting bit only):

[peter@system04 ppd-memrpt2]$ coredumpctl info 10267
           PID: 10267 (sqlitebrowser)
           UID: 1000 (peter)
           GID: 1000 (peter)
        Signal: 11 (SEGV)
     Timestamp: Tue 2019-03-05 18:55:38 GMT (55min ago)
  Command Line: sqlitebrowser
    Executable: /usr/bin/sqlitebrowser
 Control Group: /user.slice/user-1000.slice/session-1.scope
          Unit: session-1.scope
         Slice: user-1000.slice
       Session: 1
     Owner UID: 1000 (peter)
       Boot ID: f27026461d4944c8a24ca6524def7c0c
    Machine ID: 47f95fceb9d84436be17de2a1639655e
      Hostname: system04
Storage: /var/lib/systemd/coredump/core.sqlitebrowser.1000.f27026461d4944c8a24ca6524def7c0c.10267.15518121380000>
       Message: Process 10267 (sqlitebrowser) of user 1000 dumped core.

                Stack trace of thread 10267:
#0 0x00007ffaf1357223 sqlite3VdbeFindCompare (libsqlite3.so.0) #1 0x00007ffaf12ba157 sqlite3BtreeMovetoUnpacked (libsqlite3.so.0)
                #2  0x00007ffaf134db86 sqlite3VdbeExec (libsqlite3.so.0)
                #3  0x00007ffaf1352920 sqlite3_step (libsqlite3.so.0)
#4 0x0000556bb8b1b09e _ZN10MainWindow12executeQueryEv (sqlitebrowser)
                #5  0x0000556bb8c1da2f n/a (sqlitebrowser)
#6 0x00007ffaf0a4187c _ZN11QMetaObject8activateEP7QObjectiiPPv (libQt5Core.so.5) #7 0x00007ffaf16f5633 _ZN7QAction9triggeredEb (libQt5Widgets.so.5) #8 0x00007ffaf16f7d1a _ZN7QAction8activateENS_11ActionEventE (libQt5Widgets.so.5)
                #9  0x00007ffaf17ea45e n/a (libQt5Widgets.so.5)
#10 0x00007ffaf17ea696 _ZN15QAbstractButton17mouseReleaseEventEP11QMouseEvent (libQt5Widgets.so.5) #11 0x00007ffaf18da04b _ZN11QToolButton17mouseReleaseEventEP11QMouseEvent (libQt5Widgets.so.5) #12 0x00007ffaf173cb68 _ZN7QWidget5eventEP6QEvent (libQt5Widgets.so.5) #13 0x00007ffaf18da0f4 _ZN11QToolButton5eventEP6QEvent (libQt5Widgets.so.5) #14 0x00007ffaf16fbe24 _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent (libQt5Widgets.so.5) #15 0x00007ffaf1703929 _ZN12QApplication6notifyEP7QObjectP6QEvent (libQt5Widgets.so.5) #16 0x00007ffaf0a16e99 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent (libQt5Core.so.5) #17 0x00007ffaf1702c08 _ZN19QApplicationPrivate14sendMouseEventEP7QWidgetP11QMouseEventS1_S1_PS1_R8QPoi>
lines


--
Peter Hardman
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to