MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:April 28 2009 9:50am
Subject:bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2873)
Bug#43962
View as plain text  
#At file:///home/gluh/MySQL/mysql-5.1-bug-43962/ based on revid:sergey.glukhov@stripped

 2873 Sergey Glukhov	2009-04-28
      Bug#43962 "Packets out of order" calling a SHOW TABLE STATUS
      Error happens because sp_head::MULTI_RESULTS is not set for SP
      which has 'show table status' command.
      The fix is to add a SQLCOM_SHOW_TABLE_STATUS case into
      sp_get_flags_for_command() func.
     @ mysql-test/r/sp.result
        test result
     @ mysql-test/t/sp.test
        test case
     @ sql/sp_head.cc
        Error happens because sp_head::MULTI_RESULTS is not set for SP
        which has 'show table status' command.
        The fix is to add a SQLCOM_SHOW_TABLE_STATUS case into
        sp_get_flags_for_command() func.

    modified:
      mysql-test/r/sp.result
      mysql-test/t/sp.test
      sql/sp_head.cc
=== modified file 'mysql-test/r/sp.result'
--- a/mysql-test/r/sp.result	2009-04-01 08:58:55 +0000
+++ b/mysql-test/r/sp.result	2009-04-28 09:50:24 +0000
@@ -6994,6 +6994,21 @@ select name from mysql.proc where name =
 name
 p
 drop procedure p;
+CREATE DEFINER = 'root'@'localhost' PROCEDURE p1()
+NOT DETERMINISTIC
+CONTAINS SQL
+SQL SECURITY DEFINER
+COMMENT ''
+BEGIN
+SHOW TABLE STATUS like 't1';
+END;//
+CREATE TABLE t1 (f1 INT);
+CALL p1();
+CALL p1();
+CALL p1();
+CALL p1();
+DROP PROCEDURE p1;
+DROP TABLE t1;
 # ------------------------------------------------------------------
 # -- End of 5.1 tests
 # ------------------------------------------------------------------

=== modified file 'mysql-test/t/sp.test'
--- a/mysql-test/t/sp.test	2009-04-01 08:58:55 +0000
+++ b/mysql-test/t/sp.test	2009-04-28 09:50:24 +0000
@@ -8270,6 +8270,33 @@ select replace(@full_mode, 'ALLOW_INVALI
 select name from mysql.proc where name = 'p' and sql_mode = @full_mode;
 drop procedure p;
 
+#
+# Bug#43962 "Packets out of order" calling a SHOW TABLE STATUS
+#
+DELIMITER //;
+CREATE DEFINER = 'root'@'localhost' PROCEDURE p1()
+NOT DETERMINISTIC
+CONTAINS SQL
+SQL SECURITY DEFINER
+COMMENT ''
+BEGIN
+ SHOW TABLE STATUS like 't1';
+END;//
+DELIMITER ;//
+
+
+CREATE TABLE t1 (f1 INT);
+--disable_result_log
+let $tab_count= 4;
+while ($tab_count)
+{
+ EVAL CALL p1();
+ dec $tab_count ;
+}
+--enable_result_log
+DROP PROCEDURE p1;
+DROP TABLE t1;
+
 --echo # ------------------------------------------------------------------
 --echo # -- End of 5.1 tests
 --echo # ------------------------------------------------------------------

=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2009-04-08 23:58:57 +0000
+++ b/sql/sp_head.cc	2009-04-28 09:50:24 +0000
@@ -207,6 +207,7 @@ sp_get_flags_for_command(LEX *lex)
   case SQLCOM_SHOW_STATUS_PROC:
   case SQLCOM_SHOW_STORAGE_ENGINES:
   case SQLCOM_SHOW_TABLES:
+  case SQLCOM_SHOW_TABLE_STATUS:
   case SQLCOM_SHOW_VARIABLES:
   case SQLCOM_SHOW_WARNS:
   case SQLCOM_REPAIR:


Attachment: [text/bzr-bundle] bzr/sergey.glukhov@sun.com-20090428095024-rt253px7f9967bod.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (Sergey.Glukhov:2873)Bug#43962Sergey Glukhov28 Apr