Uniface User Forum

 View Only
  • 1.  Sql Lite Locking

    Posted 04-13-2023 05:46

    I am having the issue that SQLite puts a lock on the table if I do a select statement and then the lock is not released.
    I can release the lock by doing an sql "commit", or leaving the application.

    USYS$SLE_PARAMS options for wal and locking are not set

    Is this normal behaviour?

    Example

    sql "select 1 from uform", "def"
    ;;; wait 30 minutes
    ;;;; table is locked


    sql "commit", "def"
    ;;; lock is removed





    ------------------------------
    Osman Shariff
    ------------------------------


  • 2.  RE: Sql Lite Locking

    Posted 04-25-2023 02:56

    Hi Osman,

    AFAIK SQLLite is one of those "black box" database aiming to WriteOneReadMany scenarios; it is NOT a valid choice for a multiuser environment.

    Best Regards,
    Gianni



    ------------------------------
    Gianni Sandigliano
    IT
    ------------------------------



  • 3.  RE: Sql Lite Locking

    Posted 04-25-2023 03:26

    Hi Gianni,

    I am using it as a single user but with 2 sessions (1 ide, 1 runtime that accesses the sqlite DICT).
    For now, this seems to solve it, but I doubt 2 ide sessions would work without locking.

    sql/data sSql, "DEF" 
    nList = $result 
    sql "commit", "DEF"




    ------------------------------
    Osman Shariff
    ------------------------------



  • 4.  RE: Sql Lite Locking

    Posted 04-25-2023 06:35

    Hi Osman,

    from locking perspective 2 sessions on same node/machine are acting like 2 users.

    Regards,
    Gianni



    ------------------------------
    Gianni Sandigliano
    IT
    ------------------------------



  • 5.  RE: Sql Lite Locking

    Posted 04-28-2023 03:29

    Hi Gianni

    Sqllite does work with multi ide sessions and a gui like sqlite studio. So, it can open multi sessions.  Soliddb had no problems either.
    It just seems that the uniface connector has a problem if one wants to open a path to the sqlite database.  If i read data from an sqlite connection, the ide is blocked.

    @Daniel is there a hidden option or can we add it to the wish list.




    ------------------------------
    Osman Shariff
    ------------------------------



  • 6.  RE: Sql Lite Locking

    ROCKETEER
    Posted 05-03-2023 02:30

    The described behavior is as documented. For details see:

    Enabling the "Write-Ahead Log" (WAL) option in the database should solve the mentioned locking problem.

    I hope this clarifies this matter.



    ------------------------------
    Daniel Iseli
    Principal Technical Support Engineer
    Uniface Services
    Rocket Software, Switzerland
    ------------------------------



  • 7.  RE: Sql Lite Locking

    Posted 05-04-2023 10:38

    Before I implemement a WAL, I have a question:

    Might there be an advantage to using uniface painted entities to do a retrieve rather than the sql command? 
    Maybe uniface will handle better the select transaction of a painted entity?



    ------------------------------
    Osman Shariff
    ------------------------------