By the way, it would be a lot better if we could do it so that the statement
is only marked unsafe if it modifies more than one row. I would guess that
UPDATE of a unique key are by far most common with single-row updates, and
such updates should be safe. So it would be great if they did not get affected
and cause warnings in the error log.

But I am not sure if that can be achieved easily. It is probably not ok to
delay the decide_logging_format() call until we actually see a second row
being updated - at that point it is too late to switch to row-based
binlogging, we would lose the update to the first row, I think.

Perhaps the optimiser can in some cases see that a query will touch only one
row, eg. ... WHERE unique_key=XXX condition? If this information is available
in mysql_update() somehow, it could prevent needlessly marking statements
unsafe in some cases, at least. Maybe the optimiser people know if there is
such information available.

Well, just an idea, may or may not be feasible.

 - Kristian.

_______________________________________________
Mailing list: https://launchpad.net/~maria-developers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~maria-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to