List:Commits« Previous MessageNext Message »
From:konstantin Date:March 15 2006 5:22pm
Subject:bk commit into 5.1 tree (konstantin:1.2186) BUG#17403
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of kostja. When kostja 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.2186 06/03/15 20:21:59 konstantin@stripped +5 -0
  A fix and test case for Bug#16164 "Easter egg":
  SHOW AUTHORS caused 'Packets out of order' in stored functions:
  add the corresponding SQLCOM to sp_get_flags_for_command so that
  it'd return sp-related flags for it. 
  Fix Bug#17403 "Events: packets out of order with show create event"
  in the same chaneset.

  sql/sp_head.cc
    1.212 06/03/15 20:21:52 konstantin@stripped +2 -0
    Add SHOW AUTHORS to the list of commands that return a result
    set: such commands are not allowed in stored functions and
    triggers. Add SHOW CREATE EVENT for the same reason.

  mysql-test/t/sp-error.test
    1.106 06/03/15 20:21:52 konstantin@stripped +18 -0
    Add a test case for Bug#16164 "Easter egg"

  mysql-test/t/events.test
    1.23 06/03/15 20:21:52 konstantin@stripped +10 -0
    Add a test case for Bug#17403 "Events: packets out of order with
    show create event"

  mysql-test/r/sp-error.result
    1.107 06/03/15 20:21:52 konstantin@stripped +7 -0
    Test results fixed (Bug#16164)

  mysql-test/r/events.result
    1.27 06/03/15 20:21:51 konstantin@stripped +6 -0
    Update the results (Bug#17403)

# 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:	konstantin
# Host:	dragonfly.local
# Root:	/opt/local/work/mysql-5.1-root

--- 1.26/mysql-test/r/events.result	2006-03-06 13:35:32 +03:00
+++ 1.27/mysql-test/r/events.result	2006-03-15 20:21:51 +03:00
@@ -465,4 +465,10 @@
 event_schema	event_name	definer	event_body
 events_test	white_space	root@localhost	select 3
 drop event white_space;
+create event e1 on schedule every 1 year do set @a = 5;
+create table t1 (s1 int);
+create trigger t1_ai after insert on t1 for each row show create event e1;
+ERROR 0A000: Not allowed to return a result set from a trigger
+drop table t1;
+drop event e1;
 drop database events_test;

--- 1.22/mysql-test/t/events.test	2006-02-28 13:46:00 +03:00
+++ 1.23/mysql-test/t/events.test	2006-03-15 20:21:52 +03:00
@@ -427,6 +427,16 @@
 # END:  BUG #17453: Creating Event crash the server
 #
 
+#
+# Bug#17403 "Events: packets out of order with show create event"
+#
+create event e1 on schedule every 1 year do set @a = 5;
+create table t1 (s1 int);
+--error ER_SP_NO_RETSET
+create trigger t1_ai after insert on t1 for each row show create event e1;
+drop table t1;
+drop event e1;
+
 ##set global event_scheduler=1;
 ##select get_lock("test_lock3", 20);
 ##create event закачка on schedule every 10 hour do select get_lock("test_lock3", 20);

--- 1.106/mysql-test/r/sp-error.result	2006-02-25 21:35:06 +03:00
+++ 1.107/mysql-test/r/sp-error.result	2006-03-15 20:21:52 +03:00
@@ -1166,3 +1166,10 @@
 drop function if exists bug16896;
 create aggregate function bug16896() returns int return 1;
 ERROR 42000: AGGREGATE is not supported for stored functions
+drop function if exists bug16164;
+create function bug16164() returns int
+begin
+show authors;
+return 42;
+end|
+ERROR 0A000: Not allowed to return a result set from a function

--- 1.105/mysql-test/t/sp-error.test	2006-02-25 21:35:07 +03:00
+++ 1.106/mysql-test/t/sp-error.test	2006-03-15 20:21:52 +03:00
@@ -1691,6 +1691,24 @@
 --error ER_SP_NO_AGGREGATE
 create aggregate function bug16896() returns int return 1;
 
+#
+# End of 5.0 tests
+#
+
+#
+# Bug#16164 "Easter egg": check that SHOW AUTHORS is disabled in
+# stored functions/triggers
+#
+--disable_warnings
+drop function if exists bug16164;
+--enable_warnings
+delimiter |;
+--error ER_SP_NO_RETSET
+create function bug16164() returns int
+begin
+  show authors;
+  return 42;
+end|
 
 #
 # BUG#NNNN: New bug synopsis

--- 1.211/sql/sp_head.cc	2006-03-09 20:37:52 +03:00
+++ 1.212/sql/sp_head.cc	2006-03-15 20:21:52 +03:00
@@ -176,6 +176,7 @@
   case SQLCOM_SHOW_CREATE_DB:
   case SQLCOM_SHOW_CREATE_FUNC:
   case SQLCOM_SHOW_CREATE_PROC:
+  case SQLCOM_SHOW_CREATE_EVENT:
   case SQLCOM_SHOW_DATABASES:
   case SQLCOM_SHOW_ERRORS:
   case SQLCOM_SHOW_FIELDS:
@@ -200,6 +201,7 @@
   case SQLCOM_SHOW_WARNS:
   case SQLCOM_SHOW_PROC_CODE:
   case SQLCOM_SHOW_FUNC_CODE:
+  case SQLCOM_SHOW_AUTHORS:
   case SQLCOM_REPAIR:
   case SQLCOM_BACKUP_TABLE:
   case SQLCOM_RESTORE_TABLE:
Thread
bk commit into 5.1 tree (konstantin:1.2186) BUG#17403konstantin15 Mar