Make Elasticsearch plugin work with MySQL

Bug #1237198 reported by Aaron Wells on 2013-10-09
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ghada El-Zoghbi

Bug Description

The Elasticsearch plugin currently only works in Postgres. The reason, is that it's dependent upon a series of triggers which were non-trivial to port to MySQL, and the organizations funding the development of the plugin were only using Postgres.

However, it should be a relatively easy job for someone familiar with MySQL triggers to port it over.

Changed in mahara:
assignee: nobody → Ghada El-Zoghbi (ghada-z)
Ghada El-Zoghbi (ghada-z) wrote :

Have committed the changes for review:

Changed in mahara:
status: Confirmed → In Progress
Aaron Wells (u-aaronw) on 2013-10-09
description: updated
Ghada El-Zoghbi (ghada-z) wrote :

Have submitted fixes after code review and testing:

Ghada El-Zoghbi (ghada-z) wrote :

Developer Note:

MySql triggers -

An INSERT BEFORE triggers will not pass the autoincrement ID in the NEW row (i.e. ID is an autoincrement column).

Use an INSERT AFTER trigger to get the value of NEW.ID.

Son Nguyen (ngson2000) wrote :

Hi Ghada;

Are you aiming for MySQL 5.0.10+?

Ghada El-Zoghbi (ghada-z) wrote :

Hi Son,

I've only tested it on 5.5.22 (ubuntu) and 5.5.33a-MariaDB.

But, support for 5.0 has ended:

Is there a requirement to support 5.0.10?

Aaron Wells (u-aaronw) wrote :

Hi Ghada,

The 1.8 release documents only claim to support MySQL 5.1 and later. And I've added an item to the next dev meeting ( ) to discuss raising that to 5.5 at the next dev meeting.


Ghada El-Zoghbi (ghada-z) wrote :

Hi Aaron,

Good plan!


Ghada El-Zoghbi (ghada-z) wrote :


For MySql 5.5, SUPER privilege is not enough to create/drop triggers. The user must have 'TRIGGER' permissions or 'ALL PRIVELEGE'.

Before MySql 5.1.6, the 'TRIGGER' permission did not exist and the user had to have 'SUPER' permissions.

Do we want to make MySql 5.1.6 the minumum supported version?


Robert Lyon (robertl-9) on 2014-01-05
Changed in mahara:
status: In Progress → Fix Committed
tags: added: nominatedfeature
Robert Lyon (robertl-9) on 2014-04-22
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers