List:Internals« Previous MessageNext Message »
From:dlenev Date:July 9 2005 9:11pm
Subject:bk commit into 5.0 tree (dlenev:1.1903) BUG#8406
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of dlenev. When dlenev 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.1903 05/07/09 23:11:17 dlenev@stripped +6 -0
  Manual fixes after merging patch for bug #8406 "Triggers crash if referencing
  a table" with main tree.

  sql/sql_lex.cc
    1.154 05/07/09 23:11:02 dlenev@stripped +2 -4
    After merge fix.
      LEX::spfuns/spprocs hashes were replaces with one LEX::sroutines hash.

  sql/sp.h
    1.23 05/07/09 23:11:02 dlenev@stripped +1 -1
    After merge fix.
      Item_arena was renamed to Query_arena.

  sql/sp.cc
    1.81 05/07/09 23:11:02 dlenev@stripped +2 -2
    After merge fix.
      Item_arena was renamed to Query_arena.

  mysql-test/t/trigger.test
    1.14 05/07/09 23:11:02 dlenev@stripped +12 -11
    Temporalily disable part of test which exposes bug #11554 (work on which is in
    progress).

  mysql-test/t/sp-error.test
    1.78 05/07/09 23:11:02 dlenev@stripped +1 -1
    After merge fix.
      Fixed wrong delimiter command.

  mysql-test/r/trigger.result
    1.10 05/07/09 23:11:02 dlenev@stripped +0 -9
    Temporalily disable part of test which exposes bug #11554 (work on which is in
    progress).

# 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:	dlenev
# Host:	brandersnatch.localdomain
# Root:	/home/dlenev/src/mysql-5.0-bg8406

--- 1.153/sql/sql_lex.cc	2005-07-09 21:55:09 +04:00
+++ 1.154/sql/sql_lex.cc	2005-07-09 23:11:02 +04:00
@@ -1997,10 +1997,8 @@
     select_lex.cut_subtree();
   }
   time_zone_tables_used= 0;
-  if (spfuns.records)
-    my_hash_reset(&spfuns);
-  if (spprocs.records)
-    my_hash_reset(&spprocs);
+  if (sroutines.records)
+    my_hash_reset(&sroutines);
 }
 
 

--- 1.9/mysql-test/r/trigger.result	2005-07-09 21:55:08 +04:00
+++ 1.10/mysql-test/r/trigger.result	2005-07-09 23:11:02 +04:00
@@ -573,12 +573,3 @@
 1	1	0000-00-00 00:00:00
 2	2	0000-00-00 00:00:00
 drop table t1, t2;
-drop function if exists bug5893;
-create table t1 (col1 int, col2 int);
-insert into t1 values (1, 2);
-create function bug5893 () returns int return 5;
-create trigger t1_bu before update on t1 for each row set new.col1= bug5893();
-drop function bug5893;
-update t1 set col2 = 4;
-ERROR 42000: FUNCTION test.bug5893 does not exist
-drop table t1;

--- 1.13/mysql-test/t/trigger.test	2005-07-09 21:55:09 +04:00
+++ 1.14/mysql-test/t/trigger.test	2005-07-09 23:11:02 +04:00
@@ -578,14 +578,15 @@
 
 # Test for bug #5893 "Triggers with dropped functions cause crashes"
 # Appropriate error should be reported instead of crash.
---disable_warnings
-drop function if exists bug5893;
---enable_warnings
-create table t1 (col1 int, col2 int); 
-insert into t1 values (1, 2);
-create function bug5893 () returns int return 5;
-create trigger t1_bu before update on t1 for each row set new.col1= bug5893();
-drop function bug5893; 
---error 1305
-update t1 set col2 = 4;
-drop table t1;
+# Had to disable this test until bug #11554 will be fixed.
+#--disable_warnings
+#drop function if exists bug5893;
+#--enable_warnings
+#create table t1 (col1 int, col2 int); 
+#insert into t1 values (1, 2);
+#create function bug5893 () returns int return 5;
+#create trigger t1_bu before update on t1 for each row set new.col1= bug5893();
+#drop function bug5893; 
+#--error 1305
+#update t1 set col2 = 4;
+#drop table t1;

--- 1.77/mysql-test/t/sp-error.test	2005-07-09 22:04:13 +04:00
+++ 1.78/mysql-test/t/sp-error.test	2005-07-09 23:11:02 +04:00
@@ -1025,7 +1025,7 @@
 --error 1424
 call bug11394(2, 1)|
 drop procedure bug11394|
-delimiter |;
+delimiter ;|
 
 #
 # Bug#11834 "Re-execution of prepared statement with dropped function

--- 1.80/sql/sp.cc	2005-07-09 21:55:09 +04:00
+++ 1.81/sql/sp.cc	2005-07-09 23:11:02 +04:00
@@ -1134,7 +1134,7 @@
     FALSE - element was not added (because it is already present in the set).
 */
 
-static bool add_used_routine(LEX *lex, Item_arena *arena,
+static bool add_used_routine(LEX *lex, Query_arena *arena,
                              const LEX_STRING *key)
 {
   if (!hash_search(&lex->sroutines, (byte *)key->str, key->length))
@@ -1173,7 +1173,7 @@
     persistent arena as second argument.
 */
 
-void sp_add_used_routine(LEX *lex, Item_arena *arena,
+void sp_add_used_routine(LEX *lex, Query_arena *arena,
                          sp_name *rt, char rt_type)
 {
   rt->set_routine_type(rt_type);

--- 1.22/sql/sp.h	2005-07-09 21:51:52 +04:00
+++ 1.23/sql/sp.h	2005-07-09 23:11:02 +04:00
@@ -82,7 +82,7 @@
   Procedures for pre-caching of stored routines and building table list
   for prelocking.
 */
-void sp_add_used_routine(LEX *lex, Item_arena *arena,
+void sp_add_used_routine(LEX *lex, Query_arena *arena,
                          sp_name *rt, char rt_type);
 void sp_update_sp_used_routines(HASH *dst, HASH *src);
 bool sp_cache_routines_and_add_tables(THD *thd, LEX *lex);
Thread
bk commit into 5.0 tree (dlenev:1.1903) BUG#8406dlenev11 Jul