I'm experimenting with locks on NDB to see if it behaves the same as InnoDB.
I want to be able to lock a row (with SELECT ... FOR UPDATE) from one session and have other sessions block or not depending on the use case. In other words, the row acts as a mutex with other sessions doing a lock or a try/lock depending on the case.
With Oracle, I can add "NO WAIT" not to block.
With InnoDB, I can do "set session innodb_lock_wait_timeout=N" and if the row is locked, I'll get "ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction" after N seconds.
With NDB, I always get "ERROR 1205..." after a second or so. How can I lock and wait?
I want to be able to lock a row (with SELECT ... FOR UPDATE) from one session and have other sessions block or not depending on the use case. In other words, the row acts as a mutex with other sessions doing a lock or a try/lock depending on the case.
With Oracle, I can add "NO WAIT" not to block.
With InnoDB, I can do "set session innodb_lock_wait_timeout=N" and if the row is locked, I'll get "ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction" after N seconds.
With NDB, I always get "ERROR 1205..." after a second or so. How can I lock and wait?