Below is the list of changes that have just been committed into a local
5.2 repository of msvensson. When msvensson 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.2151 06/03/08 19:06:14 msvensson@shellback.(none) +4 -0
Merge shellback.(none):/home/msvensson/mysql/mysql-5.1
into shellback.(none):/home/msvensson/mysql/mysql-5.2
sql/sql_yacc.yy
1.464 06/03/08 19:06:08 msvensson@shellback.(none) +0 -0
Auto merged
sql/sql_trigger.cc
1.52 06/03/08 19:06:08 msvensson@shellback.(none) +0 -0
Auto merged
sql/item.cc
1.173 06/03/08 19:06:07 msvensson@shellback.(none) +0 -0
Auto merged
mysql-test/t/trigger-grant.test
1.9 06/03/08 19:06:07 msvensson@shellback.(none) +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: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/mysql-5.2/RESYNC
--- 1.172/sql/item.cc 2006-03-08 15:21:04 +01:00
+++ 1.173/sql/item.cc 2006-03-08 19:06:07 +01:00
@@ -6020,7 +6020,7 @@
const char *old_cs, *old_derivation;
old_cs= collation.collation->name;
old_derivation= collation.derivation_name();
- if (collation.aggregate(item->collation))
+ if (collation.aggregate(item->collation, MY_COLL_ALLOW_CONV))
{
my_error(ER_CANT_AGGREGATE_2COLLATIONS, MYF(0),
old_cs, old_derivation,
--- 1.463/sql/sql_yacc.yy 2006-03-08 15:21:04 +01:00
+++ 1.464/sql/sql_yacc.yy 2006-03-08 19:06:08 +01:00
@@ -42,6 +42,12 @@
#include <myisam.h>
#include <myisammrg.h>
+typedef struct p_elem_val
+{
+ longlong value;
+ bool null_value;
+} part_elem_value;
+
int yylex(void *yylval, void *yythd);
const LEX_STRING null_lex_str={0,0};
@@ -105,6 +111,7 @@
sp_name *spname;
struct st_lex *lex;
sp_head *sphead;
+ struct p_elem_val *p_elem_value;
}
%{
@@ -752,7 +759,7 @@
%type <ulonglong_number>
ulonglong_num size_number
-%type <longlong_number>
+%type <p_elem_value>
part_bit_expr
%type <lock_type>
@@ -3781,7 +3788,7 @@
part_range_func:
'(' part_bit_expr ')'
{
- Lex->part_info->curr_part_elem->range_value= $2;
+ Lex->part_info->curr_part_elem->range_value= $2->value;
}
;
@@ -3793,12 +3800,12 @@
part_list_item:
part_bit_expr
{
- longlong *value_ptr;
- if (!(value_ptr= (longlong*)sql_alloc(sizeof(longlong))) ||
- ((*value_ptr= $1, FALSE) ||
- Lex->part_info->curr_part_elem->list_val_list.push_back(value_ptr)))
+ part_elem_value *value_ptr= $1;
+ if (!value_ptr->null_value &&
+ Lex->part_info->curr_part_elem->
+ list_val_list.push_back((longlong*) &value_ptr->value))
{
- mem_alloc_error(sizeof(longlong));
+ mem_alloc_error(sizeof(part_elem_value));
YYABORT;
}
}
@@ -3818,6 +3825,15 @@
context->table_list= 0;
thd->where= "partition function";
+
+ part_elem_value *value_ptr=
+ (part_elem_value*)sql_alloc(sizeof(part_elem_value));
+ if (!value_ptr)
+ {
+ mem_alloc_error(sizeof(part_elem_value));
+ YYABORT;
+ }
+
if (part_expr->fix_fields(YYTHD, (Item**)0) ||
((context->table_list= save_list), FALSE) ||
(!part_expr->const_item()) ||
@@ -3827,13 +3843,23 @@
YYABORT;
}
thd->where= save_where;
- if (part_expr->result_type() != INT_RESULT)
+ value_ptr->value= part_expr->val_int();
+ if ((value_ptr->null_value= part_expr->null_value))
+ {
+ if (Lex->part_info->curr_part_elem->has_null_value)
+ {
+ my_error(ER_MULTIPLE_DEF_CONST_IN_LIST_PART_ERROR, MYF(0));
+ YYABORT;
+ }
+ Lex->part_info->curr_part_elem->has_null_value= TRUE;
+ }
+ else if (part_expr->result_type() != INT_RESULT &&
+ !part_expr->null_value)
{
yyerror(ER(ER_INCONSISTENT_TYPE_OF_FUNCTIONS_ERROR));
YYABORT;
}
- item_value= part_expr->val_int();
- $$= item_value;
+ $$= value_ptr;
}
;
@@ -7150,9 +7176,8 @@
{
LEX *lex= Lex;
lex->derived_tables|= DERIVED_SUBQUERY;
- if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN &&
- lex->sql_command <= (int)SQLCOM_HA_READ) ||
- lex->sql_command == (int)SQLCOM_KILL)
+ if (lex->sql_command == (int)SQLCOM_HA_READ ||
+ lex->sql_command == (int)SQLCOM_KILL)
{
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
@@ -8647,18 +8672,18 @@
/* kill threads */
kill:
- KILL_SYM kill_option expr
+ KILL_SYM { Lex->sql_command= SQLCOM_KILL; } kill_option expr
{
LEX *lex=Lex;
lex->value_list.empty();
- lex->value_list.push_front($3);
- lex->sql_command= SQLCOM_KILL;
+ lex->value_list.push_front($4);
};
kill_option:
/* empty */ { Lex->type= 0; }
| CONNECTION_SYM { Lex->type= 0; }
- | QUERY_SYM { Lex->type= ONLY_KILL_QUERY; };
+ | QUERY_SYM { Lex->type= ONLY_KILL_QUERY; }
+ ;
/* change database */
@@ -8671,7 +8696,7 @@
/* import, export of files */
-load: LOAD DATA_SYM
+load: LOAD DATA_SYM
{
LEX *lex=Lex;
if (lex->sphead)
@@ -10739,9 +10764,8 @@
'(' SELECT_SYM
{
LEX *lex=Lex;
- if (((int)lex->sql_command >= (int)SQLCOM_HA_OPEN &&
- lex->sql_command <= (int)SQLCOM_HA_READ) ||
- lex->sql_command == (int)SQLCOM_KILL)
+ if (lex->sql_command == (int)SQLCOM_HA_READ ||
+ lex->sql_command == (int)SQLCOM_KILL)
{
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
--- 1.8/mysql-test/t/trigger-grant.test 2006-02-09 16:32:54 +01:00
+++ 1.9/mysql-test/t/trigger-grant.test 2006-03-08 19:06:07 +01:00
@@ -362,9 +362,9 @@
FOR EACH ROW
SET @a = 5;
---exec egrep -v '^definers=' $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG >
$MYSQLTEST_VARDIR/tmp/t1.TRG
---exec echo "definers='' '@' '@abc@def@@' '@hostname' '@abcdef@@@hostname'" >>
$MYSQLTEST_VARDIR/tmp/t1.TRG
---exec mv $MYSQLTEST_VARDIR/tmp/t1.TRG $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG
+--system grep -v '^definers=' $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG >
$MYSQLTEST_VARDIR/tmp/t1.TRG
+--system echo "definers='' '@' '@abc@def@@' '@hostname' '@abcdef@@@hostname'" >>
$MYSQLTEST_VARDIR/tmp/t1.TRG
+--system mv $MYSQLTEST_VARDIR/tmp/t1.TRG
$MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG
--echo
| Thread |
|---|
| • bk commit into 5.2 tree (msvensson:1.2151) | msvensson | 8 Mar |