List:Commits« Previous MessageNext Message »
From:gluh Date:November 30 2007 11:30am
Subject:bk commit into 5.1 tree (gluh:1.2667) BUG#32775
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of gluh. When gluh 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-11-30 15:29:59+04:00, gluh@stripped +4 -0
  Bug#32775 problems with SHOW EVENTS and Information_Schema
  removed unnecessary privilege checks for I_S schema

  mysql-test/r/information_schema.result@stripped, 2007-11-30 15:29:56+04:00, gluh@stripped +7 -0
    test result

  mysql-test/t/information_schema.test@stripped, 2007-11-30 15:29:56+04:00, gluh@stripped +8 -0
    test case

  sql/events.cc@stripped, 2007-11-30 15:29:56+04:00, gluh@stripped +2 -2
    There is no events in I_S so we don't need to execute check_access here.

  sql/sql_parse.cc@stripped, 2007-11-30 15:29:56+04:00, gluh@stripped +0 -4
    removed unnecessary check

diff -Nrup a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
--- a/mysql-test/r/information_schema.result	2007-11-13 17:29:39 +04:00
+++ b/mysql-test/r/information_schema.result	2007-11-30 15:29:56 +04:00
@@ -1611,4 +1611,11 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	tables	ALL	NULL	NULL	NULL	NULL	NULL	NULL	Skip_open_table; Scanned all databases
 Warnings:
 Note	1003	select 1 AS `1` from `information_schema`.`tables`
+use information_schema;
+show events;
+Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
+show events from information_schema;
+Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
+show events where Db= 'information_schema';
+Db	Name	Definer	Time zone	Type	Execute at	Interval value	Interval field	Starts	Ends	Status	Originator	character_set_client	collation_connection	Database Collation
 End of 5.1 tests.
diff -Nrup a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test
--- a/mysql-test/t/information_schema.test	2007-11-13 17:29:39 +04:00
+++ b/mysql-test/t/information_schema.test	2007-11-30 15:29:56 +04:00
@@ -1238,4 +1238,12 @@ select * from `information_schema`.`VIEW
 #
 explain extended select 1 from information_schema.tables;
 
+#
+# Bug#32775 problems with SHOW EVENTS and Information_Schema
+#
+use information_schema;
+show events;
+show events from information_schema;
+show events where Db= 'information_schema';
+
 --echo End of 5.1 tests.
diff -Nrup a/sql/events.cc b/sql/events.cc
--- a/sql/events.cc	2007-11-14 15:25:39 +04:00
+++ b/sql/events.cc	2007-11-30 15:29:56 +04:00
@@ -825,8 +825,8 @@ Events::fill_schema_events(THD *thd, TAB
   if (thd->lex->sql_command == SQLCOM_SHOW_EVENTS)
   {
     DBUG_ASSERT(thd->lex->select_lex.db);
-    if (check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0,
-                     is_schema_db(thd->lex->select_lex.db)))
+    if (!is_schema_db(thd->lex->select_lex.db) &&  // There is no events in I_S
+        check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0, 0))
       DBUG_RETURN(1);
     db= thd->lex->select_lex.db;
   }
diff -Nrup a/sql/sql_parse.cc b/sql/sql_parse.cc
--- a/sql/sql_parse.cc	2007-11-27 22:20:08 +04:00
+++ b/sql/sql_parse.cc	2007-11-30 15:29:56 +04:00
@@ -1895,10 +1895,6 @@ mysql_execute_command(THD *thd)
   
   switch (lex->sql_command) {
   case SQLCOM_SHOW_EVENTS:
-    if ((res= check_access(thd, EVENT_ACL, thd->lex->select_lex.db, 0, 0, 0,
-                           is_schema_db(thd->lex->select_lex.db))))
-      break;
-    /* fall through */
   case SQLCOM_SHOW_STATUS_PROC:
   case SQLCOM_SHOW_STATUS_FUNC:
     res= execute_sqlcom_select(thd, all_tables);
Thread
bk commit into 5.1 tree (gluh:1.2667) BUG#32775gluh30 Nov