Announcement

Collapse
No announcement yet.

MYSQL and SC access - Locking rows?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • MYSQL and SC access - Locking rows?

    Hello.

    Wondering how SC will deal with multiple users accessing mysql tables when deployed.

    The tables are "InnoDB" in mysql so does SC support row locking?

    Just don't want users stepping on each others data when project is deployed.

    How do I keep that from happening?

    Thanks for any help.

  • #2
    The locking mechanism works like it should. That's not an SC issue, but a MySQL (InnoDB) issue. The transaction is opened and then the events are executed. At the end a final commit is performed. That's why you have to do a sc_commit_trans() if you do a sc_redir in one of your events, otherwise the commit would never be done. If there's no commit things will be rolled back.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      So if I understand you when SC accesses the mysql database....mysql will temporarily lock the row for that transaction and then release to prevent stepping on each others data.

      So the mysql locking is automatic on a InnoDB table and I dont have to do anything?

      Will the locking occur in SC when doing Insert, Delete or Edit commands?

      Comment


      • #4
        If you need to be sure you should apply a simple test. But transaction control is done fully within SC itself. However, it might be an issue if you have to put your updates over several forms within one transaction. Afaik the transactions work per form.
        Albert Drent
        aducom software netherlands
        scriptcase partner, reseller, support and (turn-key) development
        www.scriptcase.eu / www.scriptcase.nl

        Comment

        Working...
        X