SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Aug 2003
    Location
    KL
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question MySql + InnoDB + Transaction?

    My database is MySql with InnoDB tables.

    I have a process_trans.php that will update trans table and it's runtime takes about 5-10 minutes or more. Something like this

    <?php
    set_time_limit(0);
    begin_trans(); // this is a function
    // processing, this will updates trans table and others
    commit_trans();
    ?>

    1) I would like to know if this will automatically handle concurrent access to trans and the other involved tables while process_trans.php is running?

    2) Let's say insert_trans.php runs while process_trans.php is running. What will happen to insert_trans.php? Pause and resume after process_trans.php is finish? What about vice versa situation?

  2. #2
    SitePoint Enthusiast HogMan's Avatar
    Join Date
    Mar 2003
    Location
    Nebraska
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you haven't already, you may want to read up on the different types of transaction isolation levels. This might help explain how the access will work depending on how you are doing your transactions. Can you post how you are handling the transactions, some sample code?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •