Opened 4 years ago

Closed 13 months ago

#1733 closed Bug (answered)

Piwik doesn't work with MySQL sql_mode ONLY_FULL_GROUP_BY enabled

Reported by: Cybertinus Owned by:
Priority: major Milestone: Piwik 1.1
Component: Core Keywords:
Cc: Sensitive: no



When somebody has configured there MySQL server with sql_mode ONLY_FULL_GROUP_BY enabled, Piwik chrashes all the time with errors that there are columns SELECTed which aren't specified in the GROUP BY.
I've created a small patch which can detect this setting on the MySQL server and configures the connection Piwik uses, to use the default sql_mode in order to make Piwik work like expected.

Attachments (1)

strict_mode.patch (1.1 KB) - added by Cybertinus 4 years ago.
This patch detects ONLY_FULL_GROUP_BY and disables it.

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by Cybertinus

This patch detects ONLY_FULL_GROUP_BY and disables it.

comment:1 Changed 4 years ago by vipsoft (robocoder)

  • Keywords ONLY_FULL_GROUP_BY failed query removed
  • Milestone set to 1.1 - Piwik 1.1

I'd rather fix whatever SQL query is causing the error.

comment:2 Changed 4 years ago by vipsoft (robocoder)

  • Resolution set to fixed
  • Status changed from new to closed

(In [3185]) fixes #1733 - add non-aggregated columns to GROUP BY clause

comment:3 Changed 13 months ago by perel

  • Resolution fixed deleted
  • Status changed from closed to reopened

I am seeing this issue again in Piwik 1.11.1 and MariaDB 5.5.30 with ONLY_FULL_GROUP_BY enabled. Removing the ONLY_FULL_GROUP_BY option from sql_mode made Piwik work properly again.

comment:4 Changed 13 months ago by matt (mattab)

  • Resolution set to answered
  • Status changed from reopened to closed

Can you create a new bug for your problem and post the full error message and more information.

Note: See TracTickets for help on using tickets.