From: Date: February 21 2006 2:40am Subject: bk commit into 5.1 tree (andrey:1.2147) BUG#16407 List-Archive: http://lists.mysql.com/commits/2942 X-Bug: 16407 Message-Id: <20060221014035.57A4D2EAD6@andrey.hristov.com> 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.2147 06/02/21 02:40:23 andrey@lmy004. +5 -0 fix for bug#16407 (EVENTS: sql_mode) post-review fixes sql/sql_show.cc 1.310 06/02/21 02:40:15 andrey@lmy004. +1 -1 fix compile problem on windows sql/event_timed.cc 1.36 06/02/21 02:40:15 andrey@lmy004. +9 -5 a bit more debug infor fix a problem introduced with previous push :( . clean everything that's whitespace. found because of new test cases which were crashing. sql/event_executor.cc 1.31 06/02/21 02:40:15 andrey@lmy004. +1 -1 show the right host in show processlist (should be event_scheduler@localhost) sql/event.cc 1.32 06/02/21 02:40:15 andrey@lmy004. +1 -1 fix compilation problem on windows mysql-test/r/events_bugs.result 1.2 06/02/21 02:40:15 andrey@lmy004. +11 -11 fix result # 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-bug16407 --- 1.309/sql/sql_show.cc 2006-02-20 23:54:50 +01:00 +++ 1.310/sql/sql_show.cc 2006-02-21 02:40:15 +01:00 @@ -3956,7 +3956,7 @@ fill_events_copy_to_schema_table(THD *th // [9] is SQL_MODE { - const char *sql_mode_str=""; + byte *sql_mode_str; ulong sql_mode_len=0; sql_mode_str= sys_var_thd_sql_mode::symbolic_mode_representation(thd, et.sql_mode, --- 1.1/mysql-test/r/events_bugs.result 2006-02-20 23:52:12 +01:00 +++ 1.2/mysql-test/r/events_bugs.result 2006-02-21 02:40:15 +01:00 @@ -18,8 +18,8 @@ end| show processlist; Id User Host db Command Time State Info # root localhost events_test Query # NULL show processlist -# event_scheduler NULL Connect # Sleeping NULL -# root events_test Connect # User lock select get_lock('test_bug16407', 60) +# event_scheduler localhost NULL Connect # Sleeping NULL +# root localhost events_test Connect # User lock select get_lock('test_bug16407', 60) select release_lock('test_bug16407'); release_lock('test_bug16407') 1 @@ -72,17 +72,17 @@ set global event_scheduler= 1; show processlist; Id User Host db Command Time State Info # root localhost events_test Query # NULL show processlist -# event_scheduler NULL Connect # Sleeping NULL -# root events_test Connect # User lock select get_lock('ee_16407_2', 60) -# root events_test Connect # User lock select get_lock('ee_16407_2', 60) -# root events_test Connect # User lock select get_lock('ee_16407_2', 60) +# event_scheduler localhost NULL Connect # Sleeping NULL +# root localhost events_test Connect # User lock select get_lock('ee_16407_2', 60) +# root localhost events_test Connect # User lock select get_lock('ee_16407_2', 60) +# root localhost events_test Connect # User lock select get_lock('ee_16407_2', 60) select release_lock('ee_16407_2'); release_lock('ee_16407_2') 1 show processlist; Id User Host db Command Time State Info # root localhost events_test Query # NULL show processlist -# event_scheduler NULL Connect # Sleeping NULL +# event_scheduler localhost NULL Connect # Sleeping NULL set global event_scheduler= 0; select * from events_smode_test order by ev_name, a; ev_name a @@ -121,16 +121,16 @@ set global event_scheduler= 1; show processlist; Id User Host db Command Time State Info # root localhost events_test Query # NULL show processlist -# event_scheduler NULL Connect # Sleeping NULL -# root events_test Connect # User lock select get_lock('ee_16407_5', 60) -# root events_test Connect # User lock select get_lock('ee_16407_5', 60) +# event_scheduler localhost NULL Connect # Sleeping NULL +# root localhost events_test Connect # User lock select get_lock('ee_16407_5', 60) +# root localhost events_test Connect # User lock select get_lock('ee_16407_5', 60) select release_lock('ee_16407_5'); release_lock('ee_16407_5') 1 show processlist; Id User Host db Command Time State Info # root localhost events_test Query # NULL show processlist -# event_scheduler NULL Connect # Sleeping NULL +# event_scheduler localhost NULL Connect # Sleeping NULL select * from events_smode_test order by ev_name, a; ev_name a ee_16407_6 2004-02-29 --- 1.31/sql/event.cc 2006-02-20 23:54:50 +01:00 +++ 1.32/sql/event.cc 2006-02-21 02:40:15 +01:00 @@ -1384,7 +1384,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 field_list; - const char *sql_mode_str; + byte *sql_mode_str; ulong sql_mode_len=0; show_str.length(0); --- 1.30/sql/event_executor.cc 2006-02-16 01:27:30 +01:00 +++ 1.31/sql/event_executor.cc 2006-02-21 02:40:15 +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.35/sql/event_timed.cc 2006-02-21 00:01:32 +01:00 +++ 1.36/sql/event_timed.cc 2006-02-21 02:40:15 +01:00 @@ -111,17 +111,21 @@ void event_timed::init_body(THD *thd) { DBUG_ENTER("event_timed::init_body"); - MEM_ROOT *root= thd->mem_root; + DBUG_PRINT("info", ("body=[%s] body_begin=0x%ld end=0x%ld", body_begin, + body_begin, thd->lex->ptr)); body.length= thd->lex->ptr - body_begin; // Trim nuls at the end while (body.length && body_begin[body.length-1] == '\0') body.length--; - //the first is always space which I cannot skip in the parser - DBUG_ASSERT(my_isspace(thd->variables.character_set_client, *body_begin)); - body.length--; - body.str= strmake_root(root, (char *)body_begin + 1, body.length); + /* the first is always whitespace which I cannot skip in the parser */ + while (my_isspace(thd->variables.character_set_client, *body_begin)) + { + ++body_begin; + --body.length; + } + body.str= strmake_root(thd->mem_root, (char *)body_begin, body.length); DBUG_VOID_RETURN; }