Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when primary key is required #16290

Merged
merged 6 commits into from Aug 17, 2020
Merged

Fix error when primary key is required #16290

merged 6 commits into from Aug 17, 2020

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Aug 13, 2020

refs https://wordpress.org/support/topic/error-in-visits-over-time/

refs https://forum.matomo.org/t/matomo-on-digitalocean-managed-database-cluster-mysql-8-sql-require-primary-key-error/37623

Putting this into Matomo 4 since it is required for Matomo for WordPress as people can't change DB settings on wordpress.com etc.

@tsteur tsteur added not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. Needs Review PRs that need a code review labels Aug 13, 2020
@tsteur tsteur added this to the 4.0.0 milestone Aug 13, 2020
$this->logAggregator->getDb()->exec('SET SESSION sql_require_primary_key=' . $val);
} catch (\Exception $e) {
if ($this->logAggregator->getDb()->isErrNo($e, 1193)) {
// ignore General error: 1193 Unknown system variable 'sql_require_primary_key'
Copy link
Member Author

Choose a reason for hiding this comment

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

seems to require mysql8 or so. works for me locally on mysql8

@tsteur tsteur merged commit ef881fd into 4.x-dev Aug 17, 2020
@tsteur tsteur deleted the primarykeyrequired branch August 17, 2020 19:52
@EmilMoe
Copy link

EmilMoe commented Sep 8, 2020

How long will it take before this is released? Matomo is basically useless as it is now.

@tsteur
Copy link
Member Author

tsteur commented Sep 8, 2020

@EmilMoe there will be a beta available likely in the next 2 weeks. The final release might be still 2 months or so away

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants