Make Elasticsearch plugin work with MySQL

Bug #1237198 reported by Aaron Wells on 2013-10-09
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Mahara
High
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:

https://reviews.mahara.org/#/c/2593/

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:

https://reviews.mahara.org/#/c/2593/

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:
http://dev.mysql.com/doc/refman/5.0/en/index.html

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 ( https://wiki.mahara.org/index.php/Developer_Area/Developer_Meetings/29 ) to discuss raising that to 5.5 at the next dev meeting.

Cheers,
Aaron

Ghada El-Zoghbi (ghada-z) wrote :

Hi Aaron,

Good plan!

Cheers,
Ghada

Ghada El-Zoghbi (ghada-z) wrote :

Aaron,

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?

Ghada

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