in reply to atomic tie?

You're implying that this might be a problem with a database key, but I suspect you're wrong -- because that's one of the problems that databases were specifically designed to solve. For example, if you do something inside a database transaction that involves incrementing a counter and then using it, there should never be a problem.

Give us a concrete example of what you're talking about (maybe to do with threads?), and we'll have a better idea of how to respond.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Replies are listed 'Best First'.
Re^2: atomic tie?
by cavac (Prior) on Aug 12, 2024 at 16:31 UTC

    if you do something inside a database transaction

    To paraphrase a lesson i had to give a coworker a couple of years ago: "If you ever do something outside of a proper transaction in one of my database systems *again*, you will get your keyboard permanently revoked so fast that it will leave burn marks on your fingertips"...

    PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
    Also check out my sisters artwork and my weekly webcomics
      Not all DB engines support transactions, and those who pretend they do show sometimes weird side effects.

      (Yes MySQL)

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      see Wikisyntax for the Monastery