From da3db11179e4a2d7d362eeb2ff8ee9329a6834b4 Mon Sep 17 00:00:00 2001
From: M Parker <mparker17@536298.no-reply.drupal.org>
Date: Mon, 28 Feb 2011 14:21:21 -0500
Subject: [PATCH] Issue #723888 by mparker17: added DEFINER clause when creating functions for compatibility with MySQL 5.0.3 or later

---
 taxonomy_access_user.install |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/taxonomy_access_user.install b/taxonomy_access_user.install
index 0b0cf24..d49f032 100644
--- a/taxonomy_access_user.install
+++ b/taxonomy_access_user.install
@@ -115,7 +115,7 @@ function taxonomy_access_user_sql_install() {
   case 'mysql':
   case 'mysqli':
     $grant[] = <<<EOF
-CREATE FUNCTION {grant_%op} (atid INT, auid INT)
+CREATE DEFINER = CURRENT_USER FUNCTION {grant_%op} (atid INT, auid INT)
 RETURNS INT
 DETERMINISTIC
 BEGIN
@@ -143,7 +143,7 @@ EOF;
   case 'pgsql':
     $grant[] = <<<EOF
 CREATE LANGUAGE plpgsql;
-CREATE FUNCTION {grant_%op}(atid INT, auid INT) RETURNS INT AS $$
+CREATE DEFINER = CURRENT_USER FUNCTION {grant_%op}(atid INT, auid INT) RETURNS INT AS $$
 DECLARE
   my%op integer := 0;
   curtid integer;
-- 
1.7.3.5

