Below is the list of changes that have just been committed into a local
5.0 repository of elkin. When elkin 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.2119 06/05/07 16:02:55 aelkin@stripped +4 -0
Merge mysql.com:/usr_rh9/home/elkin.rh9/4.1
into mysql.com:/usr_rh9/home/elkin.rh9/MySQL/Merge/5.0-bug19136
mysql-test/t/rpl_user_variables.test
1.13 06/05/07 16:02:51 aelkin@stripped +3 -3
manual merge use version 5.0's "show binlog events from 98"
mysql-test/r/rpl_user_variables.result
1.15 06/05/07 16:02:51 aelkin@stripped +0 -1
manual merge use local
sql/sql_select.cc
1.410 06/05/07 15:56:42 aelkin@stripped +0 -0
Auto merged
sql/item_func.cc
1.284 06/05/07 15:56:41 aelkin@stripped +0 -0
Auto merged
# 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: aelkin
# Host: dsl-hkigw8-feb0de00-199.dhcp.inet.fi
# Root: /usr_rh9/home/elkin.rh9/MySQL/Merge/5.0-bug19136/RESYNC
--- 1.283/sql/item_func.cc 2006-05-06 10:18:36 +03:00
+++ 1.284/sql/item_func.cc 2006-05-07 15:56:41 +03:00
@@ -3946,14 +3946,24 @@
sql_set_variables(), we could instead manually call check() and update();
this would save memory and time; but calling sql_set_variables() makes
one unique place to maintain (sql_set_variables()).
+
+ Manipulation with lex is necessary since free_underlaid_joins
+ is going to release memory belonging to the main query.
*/
List<set_var_base> tmp_var_list;
+ LEX *sav_lex= thd->lex, lex_tmp;
+ thd->lex= &lex_tmp;
+ lex_start(thd, NULL, 0);
tmp_var_list.push_back(new set_var_user(new Item_func_set_user_var(name,
new Item_null())));
/* Create the variable */
if (sql_set_variables(thd, &tmp_var_list))
+ {
+ thd->lex= sav_lex;
goto err;
+ }
+ thd->lex= sav_lex;
if (!(var_entry= get_variable(&thd->user_vars, name, 0)))
goto err;
}
--- 1.409/sql/sql_select.cc 2006-05-04 05:38:30 +03:00
+++ 1.410/sql/sql_select.cc 2006-05-07 15:56:42 +03:00
@@ -2407,7 +2407,8 @@
new_fields->null_rejecting);
}
else if (old->eq_func && new_fields->eq_func &&
- (old->val->is_null() || new_fields->val->is_null()))
+ ((!old->val->used_tables() && old->val->is_null()) ||
+ new_fields->val->is_null()))
{
/* field = expression OR field IS NULL */
old->level= and_level;
--- 1.12/mysql-test/t/rpl_user_variables.test 2005-07-28 16:12:37 +03:00
+++ 1.13/mysql-test/t/rpl_user_variables.test 2006-05-07 16:02:51 +03:00
@@ -48,9 +48,15 @@
select * from t1;
--replace_column 2 # 5 #
show binlog events from 98;
+#
+# BUG19136: Crashing log-bin and uninitialized user variables in a derived table
+# just to check nothing bad happens anymore
+#
connection master;
+insert into t1 select * FROM (select @var1 union select @var2) AS t2;
drop table t1;
save_master_pos;
+
connection slave;
sync_with_master;
stop slave;
| Thread |
|---|
| • bk commit into 5.0 tree (aelkin:1.2119) | Andrei Elkin | 7 May |