List:Commits« Previous MessageNext Message »
From:konstantin Date:March 12 2006 4:46pm
Subject:bk commit into 5.1 tree (konstantin:1.2167) BUG#16164
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.2167 06/03/12 19:46:31 konstantin@stripped +3 -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 the sp-related flags for it. 

  sql/sp_head.cc
    1.212 06/03/12 19:46:24 konstantin@stripped +1 -0
    Add SHOW AUTHORS to the list of commands that return a result
    set: such commands are not allowed in stored functions and
    triggers.

  mysql-test/t/sp-error.test
    1.106 06/03/12 19:46:24 konstantin@stripped +18 -0
    Add a test case for Bug#16164 "Easter egg"

  mysql-test/r/sp-error.result
    1.107 06/03/12 19:46:24 konstantin@stripped +7 -0
    Test results fixed (Bug#16164)

# 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.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-12 19:46:24 +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-12 19:46:24 +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-12 19:46:24 +03:00
@@ -200,6 +200,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.2167) BUG#16164konstantin12 Mar