List:Commits« Previous MessageNext Message »
From:Ignacio Galarza Date:June 28 2006 2:10am
Subject:bk commit into 4.1 tree (iggy:1.2521) BUG#16180
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of iggy. When iggy 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.2521 06/06/27 20:10:49 iggy@stripped +3 -0
  Bug#16180 Setting SQL_LOG_OFF without SUPER privilege is silently ignored

  sql/set_var.cc
    1.183 06/06/27 20:10:46 iggy@stripped +2 -1
    Verify user has appropiate rights before setting the sql_log_off system variable.

  mysql-test/t/grant2.test
    1.17 06/06/27 20:10:46 iggy@stripped +17 -0
    Added test for bug# 16180

  mysql-test/r/grant2.result
    1.16 06/06/27 20:10:46 iggy@stripped +10 -0
    Added results for bug#16180

# 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:	iggy
# Host:	rolltop.ignatz42.dyndns.org
# Root:	/mnt/storeage/mysql-4.1_bug16180

--- 1.182/sql/set_var.cc	2006-05-01 14:52:00 -04:00
+++ 1.183/sql/set_var.cc	2006-06-27 20:10:46 -04:00
@@ -423,7 +423,8 @@ static sys_var_thd_bit	sys_sql_big_table
 static sys_var_thd_bit	sys_big_selects("sql_big_selects", 0,
 					set_option_bit,
 					OPTION_BIG_SELECTS);
-static sys_var_thd_bit	sys_log_off("sql_log_off", 0,
+static sys_var_thd_bit	sys_log_off("sql_log_off",
+				    check_log_update,
 				    set_option_bit,
 				    OPTION_LOG_OFF);
 static sys_var_thd_bit	sys_log_update("sql_log_update",

--- 1.15/mysql-test/r/grant2.result	2006-05-12 12:26:41 -04:00
+++ 1.16/mysql-test/r/grant2.result	2006-06-27 20:10:46 -04:00
@@ -143,3 +143,13 @@ flush privileges;
 drop user mysqltest_3@host3;
 drop user mysqltest_1@host1, mysqltest_2@host2, mysqltest_4@host4,
 mysqltest_5@host5, mysqltest_6@host6, mysqltest_7@host7;
+create database mysqltest_1;
+grant select, insert, update on `mysqltest\_1`.* to mysqltest_1@localhost;
+set sql_log_off = 1;
+ERROR HY000: Access denied; you need the SUPER privilege for this operation
+set sql_log_bin = 0;
+ERROR HY000: Access denied; you need the SUPER privilege for this operation
+delete from mysql.user where user like 'mysqltest\_1';
+delete from mysql.db where user like 'mysqltest\_1';
+drop database mysqltest_1;
+flush privileges;

--- 1.16/mysql-test/t/grant2.test	2006-05-12 12:26:46 -04:00
+++ 1.17/mysql-test/t/grant2.test	2006-06-27 20:10:46 -04:00
@@ -238,5 +238,22 @@ connect (con9,127.0.0.1,root,,test,$MAST
 disconnect con9;
 connection default;
 
+#
+# Bug# 16180 - Setting SQL_LOG_OFF without SUPER privilege is silently ignored
+#
+create database mysqltest_1;
+grant select, insert, update on `mysqltest\_1`.* to mysqltest_1@localhost;
+connect (con10,localhost,mysqltest_1,,);
+connection con10;
+--error 1227
+set sql_log_off = 1;
+--error 1227
+set sql_log_bin = 0;
+disconnect con10;
+connection default;
+delete from mysql.user where user like 'mysqltest\_1';
+delete from mysql.db where user like 'mysqltest\_1';
+drop database mysqltest_1;
+flush privileges;
 
 # End of 4.1 tests
Thread
bk commit into 4.1 tree (iggy:1.2521) BUG#16180Ignacio Galarza28 Jun