Below is the list of changes that have just been committed into a local
5.1 repository of andrey. When andrey 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.2168 06/02/24 12:03:32 andrey@lmy004. +8 -0
merge
sql/event_timed.cc
1.37 06/02/24 12:03:25 andrey@lmy004. +4 -3
manual merge
sql/share/errmsg.txt
1.85 06/02/24 12:00:30 andrey@lmy004. +0 -0
Auto merged
sql/sql_yacc.yy
1.466 06/02/24 12:00:29 andrey@lmy004. +0 -0
Auto merged
sql/sql_show.cc
1.310 06/02/24 12:00:28 andrey@lmy004. +0 -0
Auto merged
sql/event_executor.cc
1.32 06/02/24 12:00:28 andrey@lmy004. +0 -0
Auto merged
sql/event.h
1.24 06/02/24 12:00:28 andrey@lmy004. +0 -0
Auto merged
sql/event.cc
1.32 06/02/24 12:00:28 andrey@lmy004. +0 -0
Auto merged
mysql-test/r/events.result
1.25 06/02/24 12:00:28 andrey@lmy004. +0 -1
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: andrey
# Host: lmy004.
# Root: /work/mysql-5.1-bug16411/RESYNC
--- 1.309/sql/sql_show.cc 2006-02-21 17:29:30 +01:00
+++ 1.310/sql/sql_show.cc 2006-02-24 12:00:28 +01:00
@@ -3940,7 +3940,7 @@ fill_events_copy_to_schema_table(THD *th
if (et.load_from_row(thd->mem_root, event_table))
{
- my_error(ER_EVENT_CANNOT_LOAD_FROM_TABLE, MYF(0));
+ my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0));
DBUG_RETURN(1);
}
@@ -3976,6 +3976,7 @@ fill_events_copy_to_schema_table(THD *th
if (event_reconstruct_interval_expression(&show_str, et.interval,
et.expression))
DBUG_RETURN(1);
+
sch_table->field[7]->set_notnull();
sch_table->field[7]->store(show_str.c_ptr(), show_str.length(), scs);
--- 1.465/sql/sql_yacc.yy 2006-02-22 11:59:57 +01:00
+++ 1.466/sql/sql_yacc.yy 2006-02-24 12:00:29 +01:00
@@ -1419,6 +1419,8 @@ ev_schedule_time: EVERY_SYM expr interva
break;
case EVEX_BAD_PARAMS:
my_error(ER_EVENT_INTERVAL_NOT_POSITIVE_OR_TOO_BIG, MYF(0));
+ case EVEX_MICROSECOND_UNSUP:
+ my_error(ER_NOT_SUPPORTED_YET, MYF(0), "MICROSECOND");
YYABORT;
break;
}
--- 1.31/sql/event.cc 2006-02-20 16:05:52 +01:00
+++ 1.32/sql/event.cc 2006-02-24 12:00:28 +01:00
@@ -624,10 +624,18 @@ evex_fill_row(THD *thd, TABLE *table, ev
table->field[EVEX_FIELD_STATUS]->store((longlong)et->status);
+ /*
+ Change the SQL_MODE only if body was present in an ALTER EVENT and of course
+ always during CREATE EVENT.
+ */
if (et->body.str)
+ {
+ table->field[EVEX_FIELD_SQL_MODE]->store((longlong)thd->variables.sql_mode);
+
if (table->field[field_num= EVEX_FIELD_BODY]->
store(et->body.str, et->body.length, system_charset_info))
goto trunc_err;
+ }
if (et->starts.year)
{
@@ -1377,7 +1385,7 @@ evex_show_create_event(THD *thd, sp_name
char show_str_buf[768];
String show_str(show_str_buf, sizeof(show_str_buf), system_charset_info);
List<Item> field_list;
- const char *sql_mode_str;
+ byte *sql_mode_str;
ulong sql_mode_len=0;
show_str.length(0);
--- 1.23/sql/event.h 2006-02-20 16:05:52 +01:00
+++ 1.24/sql/event.h 2006-02-24 12:00:28 +01:00
@@ -113,7 +113,6 @@ public:
enum enum_event_status status;
sp_head *sphead;
ulong sql_mode;
-
const uchar *body_begin;
bool dropped;
--- 1.31/sql/event_executor.cc 2006-02-20 16:05:52 +01:00
+++ 1.32/sql/event_executor.cc 2006-02-24 12:00:28 +01:00
@@ -268,7 +268,7 @@ init_event_thread(THD* thd)
thd->client_capabilities= 0;
thd->security_ctx->master_access= 0;
thd->security_ctx->db_access= 0;
- thd->security_ctx->host= (char*)my_localhost;
+ thd->security_ctx->host_or_ip= (char*)my_localhost;
my_net_init(&thd->net, 0);
thd->net.read_timeout = slave_net_timeout;
thd->slave_thread= 0;
--- 1.36/sql/event_timed.cc 2006-02-21 02:40:15 +01:00
+++ 1.37/sql/event_timed.cc 2006-02-24 12:03:25 +01:00
@@ -195,6 +195,7 @@ event_timed::init_execute_at(THD *thd, I
0 OK
EVEX_PARSE_ERROR fix_fields failed
EVEX_BAD_PARAMS Interval is not positive
+ EVEX_MICROSECOND_UNSUP Microseconds are not supported.
*/
int
@@ -254,6 +255,7 @@ event_timed::init_interval(THD *thd, Ite
case INTERVAL_MINUTE_MICROSECOND: // day and hour are 0
case INTERVAL_HOUR_MICROSECOND:// day is anyway 0
case INTERVAL_DAY_MICROSECOND:
+ DBUG_RETURN(EVEX_MICROSECOND_UNSUP);
expression= ((((interval.day*24) + interval.hour)*60+interval.minute)*60 +
interval.second) * 1000000L + interval.second_part;
break;
@@ -264,10 +266,11 @@ event_timed::init_interval(THD *thd, Ite
expression= interval.minute * 60 + interval.second;
break;
case INTERVAL_SECOND_MICROSECOND:
+ DBUG_RETURN(EVEX_MICROSECOND_UNSUP);
expression= interval.second * 1000000L + interval.second_part;
break;
- default:
- break;
+ case INTERVAL_MICROSECOND:
+ DBUG_RETURN(EVEX_MICROSECOND_UNSUP);
}
if (interval.neg || expression > EVEX_MAX_INTERVAL_VALUE)
DBUG_RETURN(EVEX_BAD_PARAMS);
@@ -1005,9 +1008,10 @@ extern LEX_STRING interval_type_to_name[
buf String*, should be already allocated. CREATE EVENT goes inside.
RETURN VALUE
- 0 OK
- 1 Error (for now if mysql.event has been tampered and MICROSECONDS
- interval or derivative has been put there.
+ 0 OK
+ EVEX_MICROSECOND_UNSUP Error (for now if mysql.event has been
+ tampered and MICROSECONDS interval or
+ derivative has been put there.
*/
int
@@ -1023,7 +1027,7 @@ event_timed::get_create_event(THD *thd,
if (expression &&
event_reconstruct_interval_expression(&expr_buf, interval, expression))
- DBUG_RETURN(1);
+ DBUG_RETURN(EVEX_MICROSECOND_UNSUP);
buf->append(STRING_WITH_LEN("CREATE EVENT "));
append_identifier(thd, buf, dbname.str, dbname.length);
@@ -1224,8 +1228,9 @@ event_timed::restore_security_context(TH
instead of thd->mem_root
RETURN VALUE
- 0 success
- EVEX_COMPILE_ERROR error during compilation
+ 0 success
+ EVEX_COMPILE_ERROR error during compilation
+ EVEX_MICROSECOND_UNSUP mysql.event was tampered
*/
int
@@ -1248,7 +1253,20 @@ event_timed::compile(THD *thd, MEM_ROOT
*old_collation_connection,
*old_character_set_results;
+ DBUG_ENTER("event_timed::compile");
+
show_create.length(0);
+
+ switch (get_create_event(thd, &show_create)) {
+ case EVEX_MICROSECOND_UNSUP:
+ sql_print_error("Scheduler");
+ DBUG_RETURN(EVEX_MICROSECOND_UNSUP);
+ case 0:
+ break;
+ default:
+ DBUG_ASSERT(0);
+ }
+
old_character_set_client= thd->variables.character_set_client;
old_character_set_results= thd->variables.character_set_results;
old_collation_connection= thd->variables.collation_connection;
@@ -1275,8 +1293,6 @@ event_timed::compile(THD *thd, MEM_ROOT
old_db_length= thd->db_length;
thd->db= dbname.str;
thd->db_length= dbname.length;
-
- get_create_event(thd, &show_create);
thd->query= show_create.c_ptr();
thd->query_length= show_create.length();
--- 1.84/sql/share/errmsg.txt 2006-02-20 16:05:52 +01:00
+++ 1.85/sql/share/errmsg.txt 2006-02-24 12:00:30 +01:00
@@ -5660,8 +5660,8 @@ ER_PARTITION_NOT_DEFINED_ERROR
eng "For the partitioned engine it is necessary to define all %-.64s"
ER_TOO_MANY_PARTITIONS_ERROR
- eng "Too many partitions were defined"
+ eng "Too many partitions (including subpartitions) were defined"
ER_SUBPARTITION_ERROR
eng "It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning"
@@ -5810,3 +5810,8 @@ ER_ILLEGAL_HA_CREATE_OPTION
eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
ER_CANT_CHANGE_TX_ISOLATION 25001
eng "Transaction isolation level can't be changed while a transaction is in progress"
+ER_WARN_DEPRECATED_STATEMENT
+ eng "The '%s' statement is deprecated and will be removed in MySQL %s. Please use client programs (e.g. %s) instead."
+
+ER_SP_NO_AGGREGATE 42000
+ eng "AGGREGATE is not supported for stored functions"
| Thread |
|---|
| • bk commit into 5.1 tree (andrey:1.2168) | ahristov | 24 Feb |