List:Internals« Previous MessageNext Message »
From:pem Date:October 17 2005 3:49pm
Subject:bk commit into 5.0 tree (pem:1.2004)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of pem. When pem does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.2004 05/10/17 15:12:38 pem@stripped +4 -0
  Merge mysql.com:/usr/local/bk/mysql-5.0
  into  mysql.com:/home/pem/work/bug7049/mysql-5.0

  sql/sp_head.cc
    1.191 05/10/17 15:12:29 pem@stripped +0 -0
    Auto merged

  sql/mysqld.cc
    1.514 05/10/17 15:12:28 pem@stripped +0 -0
    Auto merged

  mysql-test/t/sp.test
    1.158 05/10/17 15:12:28 pem@stripped +0 -0
    Auto merged

  mysql-test/r/sp.result
    1.164 05/10/17 15:12:28 pem@stripped +0 -0
    Auto merged

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	pem
# Host:	mysql.comhem.se
# Root:	/home/pem/work/bug7049/mysql-5.0/RESYNC

--- 1.513/sql/mysqld.cc	2005-10-13 17:23:47 +02:00
+++ 1.514/sql/mysqld.cc	2005-10-17 15:12:28 +02:00
@@ -2332,6 +2332,8 @@
     if (thd->spcont &&
         thd->spcont->find_handler(error, MYSQL_ERROR::WARN_LEVEL_ERROR))
     {
+      if (! thd->spcont->found_handler_here())
+        thd->net.report_error= 1; /* Make "select" abort correctly */ 
       DBUG_RETURN(0);
     }
 

--- 1.163/mysql-test/r/sp.result	2005-10-17 15:07:22 +02:00
+++ 1.164/mysql-test/r/sp.result	2005-10-17 15:12:28 +02:00
@@ -1916,7 +1916,7 @@
 bug3788()
 2005-03-04
 drop function bug3788|
-create function bug3788() returns binary(5) return 5|
+create function bug3788() returns binary(1) return 5|
 select bug3788()|
 bug3788()
 5
@@ -3206,18 +3206,6 @@
 return f1;
 end|
 drop function bug9048|
-drop function if exists bug12812|
-create function bug12812() returns char(2)
-begin
-return 'ok';
-end;
-create user user_bug12812@localhost IDENTIFIED BY 'ABC'|
-SELECT test.bug12812()|
-ERROR 42000: execute command denied to user 'user_bug12812'@'localhost' for routine 'test.bug12812'
-CREATE VIEW v1 AS SELECT test.bug12812()|
-ERROR 42000: execute command denied to user 'user_bug12812'@'localhost' for routine 'test.bug12812'
-DROP USER user_bug12812@localhost|
-drop function bug12812|
 drop procedure if exists bug12849_1|
 create procedure bug12849_1(inout x char) select x into x|
 set @var='a'|

--- 1.157/mysql-test/t/sp.test	2005-10-11 15:57:17 +02:00
+++ 1.158/mysql-test/t/sp.test	2005-10-17 15:12:28 +02:00
@@ -2431,7 +2431,7 @@
 select bug3788()|
 drop function bug3788|
 
-create function bug3788() returns binary(5) return 5|
+create function bug3788() returns binary(1) return 5|
 select bug3788()|
 drop function bug3788|
  
@@ -4037,28 +4037,6 @@
 end|
 drop function bug9048|
 
-#
-# BUG#12812 create view calling a function works without execute right
-#           on function
---disable_warnings
-drop function if exists bug12812|
---enable_warnings
-create function bug12812() returns char(2)
-begin
-  return 'ok';
-end;
-create user user_bug12812@localhost IDENTIFIED BY 'ABC'|
---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
-connect (test_user_12812,localhost,user_bug12812,ABC,test)|
---error 1370
-SELECT test.bug12812()|
---error 1370
-CREATE VIEW v1 AS SELECT test.bug12812()|
-# Cleanup
-connection default|
-disconnect test_user_12812|
-DROP USER user_bug12812@localhost|
-drop function bug12812|
 # Bug #12849 Stored Procedure: Crash on procedure call with CHAR type
 # 'INOUT' parameter
 #

--- 1.190/sql/sp_head.cc	2005-10-12 16:39:30 +02:00
+++ 1.191/sql/sp_head.cc	2005-10-17 15:12:29 +02:00
@@ -2656,9 +2656,24 @@
                                 sp->m_definer_host.str,
                                 sp->m_db.str))
     {
+#ifdef NOT_YET_REPLICATION_SAFE
+      /*
+        Until we don't properly replicate information about stored routine
+        definer with stored routine creation statement all stored routines
+        on slave are created under ''@'' definer. Therefore we won't be able
+        to run any routine which was replicated from master on slave server
+        if we emit error here. This will cause big problems for users
+        who use slave for fail-over. So until we fully implement WL#2897
+        "Complete definer support in the stored routines" we run suid
+        stored routines for which we were unable to find definer under
+        invoker security context.
+      */
       my_error(ER_NO_SUCH_USER, MYF(0), sp->m_definer_user.str,
                sp->m_definer_host.str);
       return TRUE;
+#else
+      return FALSE;
+#endif
     }
     *backup= thd->security_ctx;
     thd->security_ctx= &sp->m_security_ctx;
Thread
bk commit into 5.0 tree (pem:1.2004)pem17 Oct