MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Tatjana A Nuernberg Date:April 30 2007 10:12am
Subject:bk commit into 5.1 tree (tnurnberg:1.2493) BUG#27293
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tnurnberg. When tnurnberg 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@stripped, 2007-04-30 12:12:44+02:00, tnurnberg@stripped +3 -0
  Bug#27293: mysqldump crashes when dumping procedure defined by different user
  
  mysqldump didn't properly handle getting no data on
  SHOW CREATE PROCEDURE.  If S/C/P fails (due to dumping
  user's insufficient privileges on mysql.proc, say),
  mysqldump will print a comment to that effect to the
  output and return an error-code.  If the -f (force) option
  is used, the dump will continue, otherwise, it will abort
  right there and then.
  
  Also fixes Bug#22761, "mysqldump reports no errors when using
  --routines without mysql.proc privileges"
  ---
  Merge mysql.com:/home/tnurnberg/27293/50-27293
  into  mysql.com:/home/tnurnberg/27293/51-27293
  ---
  Merge tnurnberg@stripped:/home/bk/mysql-5.1-maint
  into  mysql.com:/home/tnurnberg/27293/51-27293

  client/mysqldump.c@stripped, 2007-04-30 12:12:40+02:00, tnurnberg@stripped +11 -4
    Bug#27293: mysqldump crashes when dumping procedure defined by different user
    
    handle failure of SHOW CREATE PROCEDURE, give user diagnostics,
    heed -f (force) option
    ---
    manual merge

  mysql-test/r/mysqldump.result@stripped, 2007-04-30 12:12:40+02:00, tnurnberg@stripped +23 -73
    Bug#27293: mysqldump crashes when dumping procedure defined by different user
    
    show that trying to mysqldump --routines with insufficient
    privileges will no longer crash the client
    ---
    manual merge

  mysql-test/t/mysqldump.test@stripped, 2007-04-30 12:12:41+02:00, tnurnberg@stripped +22 -60
    Bug#27293: mysqldump crashes when dumping procedure defined by different user
    
    show that trying to mysqldump --routines with insufficient
    privileges will no longer crash the client
    ---
    manual merge

# 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:	tnurnberg
# Host:	blasphemy.mysql.com
# Root:	/home/tnurnberg/27293/51-27293

--- 1.275/client/mysqldump.c	2007-04-20 23:31:06 +02:00
+++ 1.276/client/mysqldump.c	2007-04-30 12:12:40 +02:00
@@ -1640,9 +1640,16 @@ static uint dump_routines_for_db(char *d
             if the user has EXECUTE privilege he see routine names, but NOT the
             routine body of other routines that are not the creator of!
           */
-          DBUG_PRINT("info",("length of body for %s row[2] '%s' is %ld",
-                             routine_name, row[2], (long) strlen(row[2])));
-          if (strlen(row[2]))
+          DBUG_PRINT("info",("length of body for %s row[2] '%s' is %d",
+                             routine_name, row[2] ? row[2] : "(null)",
+                             row[2] ? (int) strlen(row[2]) : 0));
+          if (row[2] == NULL)
+          {
+            fprintf(sql_file, "\n-- insufficient privileges to %s\n", query_buff);
+            fprintf(sql_file, "-- does %s have permissions on mysql.proc?\n\n", current_user);
+            maybe_die(EX_MYSQLERR,"%s has insufficent privileges to %s!", current_user, query_buff);
+          }
+          else if (strlen(row[2]))
           {
             char *query_str= NULL;
             char *definer_begin;
@@ -1692,7 +1699,7 @@ static uint dump_routines_for_db(char *d
             /*
               we need to change sql_mode only for the CREATE
               PROCEDURE/FUNCTION otherwise we may need to re-quote routine_name
-            */;
+            */
             fprintf(sql_file, "/*!50003 SET SESSION SQL_MODE=\"%s\"*/;;\n",
                     row[1] /* sql_mode */);
             fprintf(sql_file, "/*!50003 %s */;;\n",

--- 1.145/mysql-test/r/mysqldump.result	2007-04-02 10:54:26 +02:00
+++ 1.146/mysql-test/r/mysqldump.result	2007-04-30 12:12:40 +02:00
@@ -3204,83 +3204,33 @@ INSERT INTO t1 VALUES(1,0xff00fef0);
 </database>
 </mysqldump>
 DROP TABLE t1;
+# 
+# Bug 27293: mysqldump crashes when dumping routines
+# defined by a different user
 #
-# Bug#26346:  	stack + buffer overrun in mysqldump
+# Bug #22761: mysqldump reports no errors when using
+# --routines without m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aaaaaaaa
-DROP TABLE t1;
-CREATE TABLE t2 (a int);
-CREATE TABLE t3 (a int);
-CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3);
+create database mysqldump_test_db;
+grant all privileges on mysqldump_test_db.*  to user1;
+grant all privileges on mysqldump_test_db.*  to user2;
+create procedure mysqldump_test_db.sp1() select 'hello';
+DELIMITER ;;
 
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-DROP TABLE IF EXISTS `t1`;
-CREATE TABLE `t1` (
-  `a` int(11) DEFAULT NULL
-) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t2`,`t3`);
-DROP TABLE IF EXISTS `t2`;
-CREATE TABLE `t2` (
-  `a` int(11) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+-- insufficient privileges to SHOW CREATE PROCEDURE `sp1`
+-- does user2 have permissions on mysql.proc?
 
-LOCK TABLES `t2` WRITE;
-/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
-/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `t3`;
-CREATE TABLE `t3` (
-  `a` int(11) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-
-LOCK TABLES `t3` WRITE;
-/*!40000 ALTER TABLE `t3` DISABLE KEYS */;
-/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
-DROP TABLE t1, t2, t3;
-#
-# Bug #23491: MySQLDump prefix function call in a view by database name
-#
-create database bug23491_original;
-create database bug23491_restore;
-use bug23491_original;
-create table t1 (c1 int);
-create view v1 as select * from t1;
-create procedure p1() select 1;
-create function f1() returns int return 1;
-create view v2 as select f1();
-create function f2() returns int return f1();
-create view v3 as select bug23491_original.f1();
-use bug23491_restore;
-show create view bug23491_restore.v2;
-View	Create View
-v2	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `f1`() AS `f1()`
-show create view bug23491_restore.v3;
-View	Create View
-v3	CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `bug23491_original`.`f1`() AS `bug23491_original.f1()`
-drop database bug23491_original;
-drop database bug23491_restore;
-use test;
+DELIMITER ;
+DELIMITER ;;
+/*!50003 SET SESSION SQL_MODE=""*/;;
+/*!50003 CREATE*/ /*!50020 DEFINER=`user1`@`%`*/ /*!50003 PROCEDURE `sp1`()
+select 'hello' */;;
+/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;;
+DELIMITER ;
+drop procedure sp1;
+drop user user1;
+drop user user2;
+drop database mysqldump_test_db;
 #
 # End of 5.0 tests
 #

--- 1.136/mysql-test/t/mysqldump.test	2007-04-07 20:59:48 +02:00
+++ 1.137/mysql-test/t/mysqldump.test	2007-04-30 12:12:41 +02:00
@@ -919,7 +919,7 @@ port=1234
 EOF
 --exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1
 --exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1
---remove_file $MYSQLTEST_VARDIR/tmp/tmp.cnf
+--remov_file $MYSQLTEST_VARDIR/tmp/tmp.cnf
 
 --echo #
 --echo # Test of fix to BUG 12597
@@ -1433,69 +1433,38 @@ DROP TABLE t1;
 
 
 
+--echo # 
+--echo # Bug 27293: mysqldump crashes when dumping routines
+--echo # defined by a different user
 --echo #
---echo # Bug#26346:  	stack + buffer overrun in mysqldump
+--echo # Bug #22761: mysqldump reports no errors when using
+--echo # --routines without mysql.proc privileges
 --echo #
 
-CREATE TABLE t1(a int);
-INSERT INTO t1 VALUES (1), (2);
+create database mysqldump_test_db;
 
-# too long a file path causes an error
---error 1
---exec $MYSQL_DUMP --tab=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!
 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa test
+connect (user27293,localhost,user1,,mysqldump_test_db,$MASTER_MYPORT,$MASTER_MYSOCK);
+connection user27293;
 
---remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
---remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
+create procedure mysqldump_test_db.sp1() select 'hello';
 
-DROP TABLE t1;
+--error 2
+--exec $MYSQL_DUMP -f --compact --user=user2 --password=  -h 127.0.0.1 -P $MASTER_MYPORT --routines mysqldump_test_db
 
-#
-# Bug #25993: crashe with a merge table and -c
-#
+--exec $MYSQL_DUMP -f --compact --user=user1 --password=  -h 127.0.0.1 -P $MASTER_MYPORT --routines mysqldump_test_db
 
-CREATE TABLE t2 (a int);
-CREATE TABLE t3 (a int);
-CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3);
---exec $MYSQL_DUMP --skip-comments -c test
-DROP TABLE t1, t2, t3;
+drop procedure sp1;
+
+connection default;
+drop user user1;
+drop user user2;
+
+drop database mysqldump_test_db;
 
---echo #
---echo # Bug #23491: MySQLDump prefix function call in a view by database name
---echo #
 
-# Setup
-create database bug23491_original;
-create database bug23491_restore;
-use bug23491_original;
-create table t1 (c1 int);
-create view v1 as select * from t1;
-create procedure p1() select 1;
-create function f1() returns int return 1;
-create view v2 as select f1();
-create function f2() returns int return f1();
-create view v3 as select bug23491_original.f1();
-
-# Backup.
---exec $MYSQL_DUMP --skip-comments -uroot --opt --routines bug23491_original > $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql
-
-# Restore.
---exec $MYSQL bug23491_restore < $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql
-
-# Verify
-use bug23491_restore;
-show create view bug23491_restore.v2;
-show create view bug23491_restore.v3;
-
-# Cleanup
-drop database bug23491_original;
-drop database bug23491_restore;
-use test;
 
 --echo #
 --echo # End of 5.0 tests
@@ -1611,13 +1580,6 @@ insert into t1 values (0815);
 drop view v1;
 drop table t1;
 drop database mysqldump_test_db;
-
-#
-# BUG#26121 mysqldump includes LOCK TABLES general_log WRITE
-#
---exec $MYSQL_DUMP --all-databases > $MYSQLTEST_VARDIR/tmp/bug26121.sql
---exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug26121.sql
---remove_file $MYSQLTEST_VARDIR/tmp/bug26121.sql
 
 --echo #
 --echo # End of 5.1 tests
Thread
bk commit into 5.1 tree (tnurnberg:1.2493) BUG#27293Tatjana A Nuernberg30 Apr