SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    viewing the autocommit value?

    I am trying to get a 'set automcommit=0' to work as a php query but to know whether it works or not I would like to 'view' what the current autocommit status is.

    What sql statement allows me to view the autocommit status? is there such one? Searching on mysql doesn't give me any ideas?

    Thanks

    Sarah
    Regular user

  2. #2
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What is autocommit? Forgive my ignorance but I don't think MySQL has such a thing. I can't speak for other db's as I don't have much experience with others. But perhaps knowing what automcommit is might help me know if it's called something else in MySQL.


    Aaron
    Aaron Brazell
    Technosailor



  3. #3
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    well actually its spelt autocommit bad spelling on my part . and yes its a mysql command but only for bdb tables.

    link to mysql website on autocommit is here

    Basically (short version ) its where it locks the rows you require and lets you run loads of insert/update/select/delete statements and at the end if everything worked well you run commit which basically sets everything in stone in the dB if you get an error part way through you can run rollback which will rollback everything to the autocommit statement like it never existed .

    I have found out the begin or begin work might also do the same thing too.

    You also have to create mysql up to be bdb its not automatic.

    Basically when using mysql tool we have set autocommit=0 and then tried to update that particular table - and it won't let us, but when I try and run the same query using PHP it doesn't seem to work correctly SO I was trying to see if my SET AUTOCOMMIT=0 command in php worked.

    Basically when you are looking at concurrent updates / users and the dread of deadlocks on the mysql tables you consider either locking the table or using this method which I think is more strict (very bad english there)

    Sarah
    Regular user

  4. #4
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sounds like a feature in Mysql 4...
    Aaron Brazell
    Technosailor



  5. #5
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    seemingly it has worked for version 3.23 never mind I will test the begin instead and see how that works..

    cheers for the thoughts though

    Sarah
    Regular user


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
  •