Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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, 2007-03-05 23:33:57+03:00, evgen@stripped +4 -0
Merge epotemkin@stripped:/home/bk/mysql-4.1-opt
into moonbone.local:/mnt/gentoo64/work/clean-5.0-opt-mysql
MERGE: 1.1616.2965.5
mysql-test/r/update.result@stripped, 2007-03-05 23:33:56+03:00, evgen@stripped +0 -0
Manually merged
MERGE: 1.22.1.9
mysql-test/t/update.test@stripped, 2007-03-05 23:16:30+03:00, evgen@stripped +0 -0
Auto merged
MERGE: 1.19.1.10
sql/sql_base.cc@stripped, 2007-03-05 23:33:56+03:00, evgen@stripped +4 -25
Manually merged
MERGE: 1.145.1.131
sql/sql_select.cc@stripped, 2007-03-05 23:33:56+03:00, evgen@stripped +0 -1
Manually merged
MERGE: 1.216.125.20
# 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: evgen
# Host: moonbone.local
# Root: /mnt/gentoo64/work/clean-5.0-opt-mysql/RESYNC
--- 1.369/sql/sql_base.cc 2007-03-02 13:23:54 +03:00
+++ 1.370/sql/sql_base.cc 2007-03-05 23:33:56 +03:00
@@ -4420,12 +4420,15 @@
bool save_set_query_id= thd->set_query_id;
nesting_map save_allow_sum_func= thd->lex->allow_sum_func;
List_iterator<Item> it(fields);
+ bool save_is_item_list_lookup;
DBUG_ENTER("setup_fields");
thd->set_query_id=set_query_id;
if (allow_sum_func)
thd->lex->allow_sum_func|= 1 <<
thd->lex->current_select->nest_level;
thd->where= THD::DEFAULT_WHERE;
+ save_is_item_list_lookup= thd->lex->current_select->is_item_list_lookup;
+ thd->lex->current_select->is_item_list_lookup= 0;
/*
To prevent fail on forward lookup we fill it with zerows,
@@ -4448,6 +4451,7 @@
if (!item->fixed && item->fix_fields(thd, it.ref()) ||
(item= *(it.ref()))->check_cols(1))
{
+ thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
thd->lex->allow_sum_func= save_allow_sum_func;
thd->set_query_id= save_set_query_id;
DBUG_RETURN(TRUE); /* purecov: inspected */
@@ -4460,6 +4464,7 @@
thd->used_tables|= item->used_tables();
thd->lex->current_select->cur_pos_in_select_list++;
}
+ thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
thd->lex->current_select->cur_pos_in_select_list= UNDEF_POS;
thd->lex->allow_sum_func= save_allow_sum_func;
@@ -4956,6 +4961,8 @@
*/
bool it_is_update= (select_lex == &thd->lex->select_lex) &&
thd->lex->which_check_option_applicable();
+ bool save_is_item_list_lookup= select_lex->is_item_list_lookup;
+ select_lex->is_item_list_lookup= 0;
DBUG_ENTER("setup_conds");
if (select_lex->conds_processed_with_permanent_arena ||
@@ -5030,9 +5037,11 @@
select_lex->where= *conds;
select_lex->conds_processed_with_permanent_arena= 1;
}
+ thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
DBUG_RETURN(test(thd->net.report_error));
err_no_arena:
+ select_lex->is_item_list_lookup= save_is_item_list_lookup;
DBUG_RETURN(1);
}
--- 1.495/sql/sql_select.cc 2007-02-27 11:37:15 +03:00
+++ 1.496/sql/sql_select.cc 2007-03-05 23:33:56 +03:00
@@ -396,6 +396,7 @@
join_list= &select_lex->top_join_list;
union_part= (unit_arg->first_select()->next_select() != 0);
+ thd->lex->current_select->is_item_list_lookup= 1;
/*
If we have already executed SELECT, then it have not sense to prevent
its table from update (see unique_table())
@@ -13265,16 +13266,11 @@
We check order_item->fixed because Item_func_group_concat can put
arguments for which fix_fields already was called.
*/
- thd->lex->current_select->is_item_list_lookup= 1;
if (!order_item->fixed &&
(order_item->fix_fields(thd, order->item) ||
(order_item= *order->item)->check_cols(1) ||
thd->is_fatal_error))
- {
- thd->lex->current_select->is_item_list_lookup= 0;
return TRUE; /* Wrong field. */
- }
- thd->lex->current_select->is_item_list_lookup= 0;
uint el= all_fields.elements;
all_fields.push_front(order_item); /* Add new field to field list. */
--- 1.32/mysql-test/r/update.result 2007-02-22 16:11:00 +03:00
+++ 1.33/mysql-test/r/update.result 2007-03-05 23:33:56 +03:00
@@ -377,6 +377,10 @@
insert into t1 values (1,1);
update t1 set `*f2`=1;
drop table t1;
+create table t1(f1 int);
+update t1 set f2=1 order by f2;
+ERROR 42S22: Unknown column 'f2' in 'order clause'
+drop table t1;
CREATE TABLE t1 (
request_id int unsigned NOT NULL auto_increment,
user_id varchar(12) default NULL,
--- 1.30/mysql-test/t/update.test 2007-02-22 16:11:00 +03:00
+++ 1.31/mysql-test/t/update.test 2007-03-05 23:16:30 +03:00
@@ -306,6 +306,14 @@
insert into t1 values (1,1);
update t1 set `*f2`=1;
drop table t1;
+
+#
+# Bug#25126: Wrongly resolved field leads to a crash
+#
+create table t1(f1 int);
+--error 1054
+update t1 set f2=1 order by f2;
+drop table t1;
# End of 4.1 tests
#
| Thread |
|---|
| • bk commit into 5.0 tree (evgen:1.2431) | eugene | 6 Mar |