Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Change in qsql_sqlite.cpp
Forum Updated to NodeBB v4.3 + New Features

Change in qsql_sqlite.cpp

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 243 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    FRDU
    wrote on last edited by
    #1

    We developed an application with QT embedded version 5.9.
    This application uses lot of Thread, and each Tread access Sqlite database in read write with no problem since 2017. And on a lot of platform.
    Lately we had to use another version of QT for a new embedded platform.
    Unfortunately, application start to crash.
    After investigation we found that there has had a modification:
    https://code.qt.io/cgit/qt/qtbase.git/commit/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp?id=610a9e8f319eafcbcf193e4b90119a6f89d0caf9
    SQLite: Disable mutex on connections
    This modification is still effective up to the latest QT version.
    Why brick something that works well jusy because developer taught the documentation was incorrect.

    We fixed the problem for our purpose but think about all developer in the world that can't use Sqlite correctly because of this patch.

    Please fix it for new QT release.

    Regards,

    Christian EhrlicherC 1 Reply Last reply
    0
    • F FRDU

      We developed an application with QT embedded version 5.9.
      This application uses lot of Thread, and each Tread access Sqlite database in read write with no problem since 2017. And on a lot of platform.
      Lately we had to use another version of QT for a new embedded platform.
      Unfortunately, application start to crash.
      After investigation we found that there has had a modification:
      https://code.qt.io/cgit/qt/qtbase.git/commit/src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp?id=610a9e8f319eafcbcf193e4b90119a6f89d0caf9
      SQLite: Disable mutex on connections
      This modification is still effective up to the latest QT version.
      Why brick something that works well jusy because developer taught the documentation was incorrect.

      We fixed the problem for our purpose but think about all developer in the world that can't use Sqlite correctly because of this patch.

      Please fix it for new QT release.

      Regards,

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by Christian Ehrlicher
      #2

      @FRDU said in Change in qsql_sqlite.cpp:

      Why brick something that works well jusy because developer taught the documentation was incorrect.

      Because it was wrong in the Qt context - you have to open a QSqlDatabase connection in the thread where you want to use it, you must not share it over threads and therefore the mutex is not needed (and just wastes cpu cycles)

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • C Offline
        C Offline
        ChrisW67
        wrote on last edited by
        #3

        This requirement has been present in the docs since Qt 4:
        Threads and the SQL Module

        1 Reply Last reply
        2

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved