List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:May 19 2008 4:39pm
Subject:bk commit into 5.1 tree (davi:1.2571) BUG#27430
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of davi.  When davi 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, 2008-05-19 13:39:31-03:00, davi@skynet.(none) +2 -0
  Bug#27430 Crash in subquery code when in PS and table DDL changed after PREPARE
  
  Add test target to the makefile that will cause all
  statements to be re-prepared before execution.

  Makefile.am@stripped, 2008-05-19 13:39:29-03:00, davi@skynet.(none) +6 -1
    Add test-reprepare target. In combination with the
    --ps-protocol this will cause that every statement
    in the test suite be re-prepared before execution.

  sql/sql_base.cc@stripped, 2008-05-19 13:39:30-03:00, davi@skynet.(none) +4 -3
    Re-prepare each statement before execution.

diff -Nrup a/Makefile.am b/Makefile.am
--- a/Makefile.am	2007-12-11 18:07:40 -02:00
+++ b/Makefile.am	2008-05-19 13:39:29 -03:00
@@ -66,7 +66,7 @@ tags:
   test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
   test-unit test-ps test-nr test-pr test-ns test-binlog-statement \
   test-ext-funcs test-ext-rpl test-ext-partitions test-ext-jp \
-  test-ext-stress test-ext test-embedded \
+  test-ext-stress test-ext test-embedded test-reprepare \
   test-fast test-fast-cursor test-fast-view test-fast-prepare \
   test-full-qa
 
@@ -110,6 +110,11 @@ test-embedded:
 	else \
 	  echo "no program found for 'embedded' tests - skipped testing" ; \
 	fi
+
+test-reprepare:
+	cd mysql-test ; \
+	    @PERL@ ./mysql-test-run.pl $(force) $(mem) --ps-protocol \
+		--mysqld=--debug=+d,reprepare_each_statement
 
 test:	test-unit test-ns test-pr
 
diff -Nrup a/sql/sql_base.cc b/sql/sql_base.cc
--- a/sql/sql_base.cc	2008-05-17 18:51:13 -03:00
+++ b/sql/sql_base.cc	2008-05-19 13:39:30 -03:00
@@ -3770,16 +3770,17 @@ check_and_update_table_version(THD *thd,
     /* Always maintain the latest version and type */
     tables->set_metadata_id(table_share);
   }
-#if 0
+
 #ifndef DBUG_OFF
   /* Spuriously reprepare each statement. */
-  if (thd->m_metadata_observer && thd->stmt_arena->is_reprepared == FALSE)
+  if (_db_strict_keyword_("reprepare_each_statement") &&
+      thd->m_metadata_observer && thd->stmt_arena->is_reprepared == FALSE)
   {
     thd->m_metadata_observer->report_error(thd);
     return TRUE;
   }
 #endif
-#endif
+
   return FALSE;
 }
 
Thread
bk commit into 5.1 tree (davi:1.2571) BUG#27430Davi Arnaut19 May