List:Internals« Previous MessageNext Message »
From:sinisa Date:March 11 2004 8:26pm
Subject:bk commit into 4.0 tree (Sinisa:1.1745)
View as plain text  
Below is the list of changes that have just been committed into a local
4.0 repository of Sinisa. When Sinisa 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1745 04/03/11 22:26:03 Sinisa@stripped +3 -0
  multi_update.result:
    Test case for a #2996 bug fix
  multi_update.test:
    test case for a #2996 bug fix
  sql_select.cc:
    Fix for a bug #2996 involving multi-table updates over the const tables

  mysql-test/r/multi_update.result
    1.30 04/03/11 22:25:35 Sinisa@stripped +14 -0
    Test case for a #2996 bug fix

  mysql-test/t/multi_update.test
    1.32 04/03/11 22:25:11 Sinisa@stripped +14 -0
    test case for a #2996 bug fix

  sql/sql_select.cc
    1.277 04/03/11 22:24:31 Sinisa@stripped +2 -2
    Fix for a bug #2996 involving multi-table updates over the const tables

# 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:	Sinisa
# Host:	sinisa.nasamreza.org
# Root:	/mnt/work/mysql-4.0

--- 1.276/sql/sql_select.cc	Wed Mar 10 11:50:15 2004
+++ 1.277/sql/sql_select.cc	Thu Mar 11 22:24:31 2004
@@ -4897,8 +4897,8 @@
   if (tab->on_expr && !table->null_row)
   {
     if ((table->null_row= test(tab->on_expr->val_int() == 0)))
-      empty_record(table);
-    }
+      mark_as_null_row(table);  
+  }
   if (!table->null_row)
     table->maybe_null=0;
   DBUG_RETURN(0);

--- 1.29/mysql-test/r/multi_update.result	Wed Mar 10 11:50:14 2004
+++ 1.30/mysql-test/r/multi_update.result	Thu Mar 11 22:25:35 2004
@@ -386,3 +386,17 @@
 a
 1
 DROP TABLE t1,t2;
+create table `t1` (   `p_id` int(10) unsigned NOT NULL auto_increment,   `p_code` varchar(20) NOT NULL default '',   `p_created` datetime NOT NULL default '0000-00-00 00:00:00',   `p_active` tinyint(1) unsigned NOT NULL default '1',   PRIMARY KEY  (`p_id`) );
+create table  `t2` (   `c2_id` int(10) unsigned  NULL auto_increment,   `c2_p_id` int(10) unsigned NOT NULL default '0',   `c2_note` text NOT NULL,   `c2_created` datetime NOT NULL default '0000-00-00 00:00:00',   `c2_active` tinyint(1) unsigned NOT NULL default '1',   PRIMARY KEY  (`c2_id`),   KEY `c2_p_id` (`c2_p_id`) );
+insert into t1 values (0,'A01-Comp',now(),1);
+insert into t1 values (0,'B01-Comp',now(),1);
+insert into t2 values (0,1,'A Note',now(),1);
+update t1 left join t2 on p_id = c2_p_id set c2_note = 'asdf-1' where p_id = 2;
+select * from t1;
+p_id	p_code	p_created	p_active
+1	A01-Comp	2004-03-11 23:21:29	1
+2	B01-Comp	2004-03-11 23:21:29	1
+select * from t2;
+c2_id	c2_p_id	c2_note	c2_created	c2_active
+1	1	A Note	2004-03-11 23:21:29	1
+drop table t1, t2;

--- 1.31/mysql-test/t/multi_update.test	Wed Mar 10 11:50:14 2004
+++ 1.32/mysql-test/t/multi_update.test	Thu Mar 11 22:25:11 2004
@@ -325,3 +325,17 @@
 SELECT * from t1;
 SELECT * from t2;
 DROP TABLE t1,t2;
+
+#
+# Test update with const tables
+#
+
+create table `t1` (   `p_id` int(10) unsigned NOT NULL auto_increment,   `p_code` varchar(20) NOT NULL default '',   `p_created` datetime NOT NULL default '0000-00-00 00:00:00',   `p_active` tinyint(1) unsigned NOT NULL default '1',   PRIMARY KEY  (`p_id`) );
+create table  `t2` (   `c2_id` int(10) unsigned  NULL auto_increment,   `c2_p_id` int(10) unsigned NOT NULL default '0',   `c2_note` text NOT NULL,   `c2_created` datetime NOT NULL default '0000-00-00 00:00:00',   `c2_active` tinyint(1) unsigned NOT NULL default '1',   PRIMARY KEY  (`c2_id`),   KEY `c2_p_id` (`c2_p_id`) );
+insert into t1 values (0,'A01-Comp',now(),1);
+insert into t1 values (0,'B01-Comp',now(),1);
+insert into t2 values (0,1,'A Note',now(),1);
+update t1 left join t2 on p_id = c2_p_id set c2_note = 'asdf-1' where p_id = 2; 
+select * from t1;
+select * from t2;
+drop table t1, t2;
Thread
bk commit into 4.0 tree (Sinisa:1.1745)sinisa11 Mar