Skip to content

Activity/SQLJoblib: unify the way to set uid in query

Xiaowu Zhang requested to merge xiaowu.zhang/erp5:fix/set_uid into master

We currently have two different ways of setting @uid before executing queries in SQLBase and SQLJoblib.

in SQLBase: db.query(b"SET @uid := %d" % getrandbits(UID_SAFE_BITSIZE)), introduced in 94739085

in SQLJoblib: db.query(b"SET @uid := %s" % str2bytes(str(getrandbits(UID_SAFE_BITSIZE)))), introduced in d56f662d

I think it would be better to use the same implementation in both places for consistency.

Merge request reports