Skip to content

Conversation

donald
Copy link
Contributor

@donald donald commented May 9, 2017

Fixes #58

@donald
Copy link
Contributor Author

donald commented May 9, 2017

Tested on the test cluster. Startup is faster, no more errors logged.

Copy link
Contributor

@pmenzel pmenzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d add a space after the comma like in GREATEST(stats_max_real_sec, NEW.stats_real_sec),.

@pmenzel
Copy link
Contributor

pmenzel commented May 9, 2017

Also in the commit message: greater than.

The value of NOW() and friends is fixed during the execution
of a statement. When other threads update the group record and
increase group_mtime, the current thread might see a group_mtime
greater than its NOW().

The calculations sometimes produced negative delta values and
overflowed when added to a UNSIGNED type.

Make sure we never decrease group_mtime.
@donald donald merged commit 9802442 into master May 10, 2017
@donald donald deleted the issue-58 branch May 10, 2017 07:20
@donald
Copy link
Contributor Author

donald commented Jun 2, 2017

Master has been reset to a state before this merge. Needs to be redone.

Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BIGINT UNSIGNED value is out of range in '(OLD.stats_run_sec + (unix_timestamp(NEW.group_mtime) - unix_timestamp(OLD.group_mtime)))'
2 participants