← Back to team overview

mahara-contributors team mailing list archive

[Bug 967001] Re: notification.internal trugger upgrade and MySQL

 

** Changed in: mahara
       Status: Triaged => In Progress

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/967001

Title:
  notification.internal trugger upgrade and MySQL

Status in Mahara ePortfolio:
  In Progress

Bug description:
  If mahara user in mysql has been created using mahara wiki guide
  (grant all on (databasename).* to 'username'@'localhost' identified by
  'password';) everything should work fine, however if some external
  tool like 'mysql administrator' has been used to create mahara user
  initially, TRIGGER permission might not be granted, which will result
  in the error similar to below:

   Could not execute command: CREATE TRIGGER "update_unread_insert_trigger" AFTER INSERT ON "notification_internal_activity" FOR EACH ROW BEGIN IF NEW.read = 0 THEN UPDATE "usr" SET unread = unread + 1 WHERE id = NEW.usr; END IF; END
  Call stack (most recent first):
  execute_sql(" CREATE TRIGGER {update_unread_insert_...") at /home/ruslan/git/services/vle/mahara/htdocs/lib/dml.php:1757
  db_create_trigger("update_unread_insert", "AFTER", "INSERT", "notification_internal_activity", " IF NEW.read = 0 THEN ...") at /home/ruslan/git/services/vle/mahara/htdocs/notification/internal/db/upgrade.php:64
  xmldb_notification_internal_upgrade("2009012700") at /home/ruslan/git/services/vle/mahara/htdocs/lib/upgrade.php:374
  upgrade_plugin(object(stdClass)) at /home/ruslan/git/services/vle/mahara/htdocs/admin/upgrade.json.php:94

  I think upgrade process should be more intuitive and in case of error,
  it should provide information on permission-related problem along with
  possible solution (e.g. Your database user might not have been granted
  TRIGGER permission, please run GRANT TRIGGER on ... ).

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/967001/+subscriptions


References