Below is the list of changes that have just been committed into a local
5.1 repository of gbichot. When gbichot 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.2176 06/05/30 16:21:51 gbichot@stripped +4 -0
Merge gbichot@bk-internal:/home/bk/mysql-5.1-new
into dl145j.mysql.com:/users/gbichot/mysql-5.1-new
sql/sql_yacc.yy
1.478 06/05/30 16:21:34 gbichot@stripped +0 -0
Auto merged
sql/mysqld.cc
1.546 06/05/30 16:21:33 gbichot@stripped +0 -0
Auto merged
mysql-test/mysql-test-run.sh
1.322 06/05/30 16:21:32 gbichot@stripped +0 -0
Auto merged
mysql-test/mysql-test-run.pl
1.118 06/05/30 16:21:31 gbichot@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: gbichot
# Host: dl145j.mysql.com
# Root: /users/gbichot/mysql-5.1-new/RESYNC
--- 1.321/mysql-test/mysql-test-run.sh 2006-05-10 09:54:02 +02:00
+++ 1.322/mysql-test/mysql-test-run.sh 2006-05-30 16:21:32 +02:00
@@ -1345,7 +1345,6 @@
--innodb_data_file_path=ibdata1:128M:autoextend \
--open-files-limit=1024 \
--log-bin-trust-function-creators \
- --loose-binlog-show-xid=0 \
$MASTER_40_ARGS \
$SMALL_SERVER \
$MASTER_MYSQLD_BINLOG_OPT \
@@ -1369,7 +1368,6 @@
--language=$LANGUAGE \
--innodb_data_file_path=ibdata1:128M:autoextend \
--log-bin-trust-function-creators \
- --loose-binlog-show-xid=0 \
$MASTER_40_ARGS \
$SMALL_SERVER \
$MASTER_MYSQLD_BINLOG_OPT \
@@ -1542,7 +1540,6 @@
--master-retry-count=10 \
-O slave_net_timeout=10 \
--log-bin-trust-function-creators \
- --loose-binlog-show-xid=0 \
$SMALL_SERVER \
$SLAVE_MYSQLD_BINLOG_OPT \
$EXTRA_SLAVE_MYSQLD_OPT $EXTRA_SLAVE_OPT \
--- 1.545/sql/mysqld.cc 2006-05-17 22:43:22 +02:00
+++ 1.546/sql/mysqld.cc 2006-05-30 16:21:33 +02:00
@@ -318,7 +318,6 @@
static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0;
static my_bool opt_bdb, opt_isam, opt_ndbcluster;
static my_bool opt_short_log_format= 0;
-static my_bool opt_log_queries_not_using_indexes= 0;
static uint kill_cached_threads, wake_thread;
static ulong killed_threads, thread_created;
static ulong max_used_connections;
@@ -344,6 +343,7 @@
/* Global variables */
bool opt_log, opt_update_log, opt_bin_log, opt_slow_log;
+my_bool opt_log_queries_not_using_indexes= 0;
bool opt_error_log= IF_WIN(1,0);
bool opt_disable_networking=0, opt_skip_show_db=0;
my_bool opt_character_set_client_handshake= 1;
@@ -693,6 +693,7 @@
HANDLE smem_event_connect_request= 0;
#endif
+#define SSL_VARS_NOT_STATIC
#include "sslopt-vars.h"
#ifdef HAVE_OPENSSL
#include <openssl/crypto.h>
@@ -863,8 +864,8 @@
{
DBUG_PRINT("quit",("Informing thread %ld that it's time to die",
tmp->thread_id));
- /* We skip slave threads on this first loop through. */
- if (tmp->slave_thread)
+ /* We skip slave threads & scheduler on this first loop through. */
+ if (tmp->slave_thread || tmp->system_thread == SYSTEM_THREAD_EVENT_SCHEDULER)
continue;
tmp->killed= THD::KILL_CONNECTION;
@@ -883,6 +884,7 @@
}
(void) pthread_mutex_unlock(&LOCK_thread_count); // For unlink from list
+ Events::shutdown();
end_slave();
if (thread_count)
@@ -1022,7 +1024,20 @@
DBUG_VOID_RETURN;
}
- /* Force server down. kill all connections and threads and exit */
+/*
+ Force server down. Kill all connections and threads and exit
+
+ SYNOPSIS
+ kill_server
+
+ sig_ptr Signal number that caused kill_server to be called.
+
+ NOTE!
+ A signal number of 0 mean that the function was not called
+ from a signal handler and there is thus no signal to block
+ or stop, we just want to kill the server.
+
+*/
#if defined(__NETWARE__)
extern "C" void kill_server(int sig_ptr)
@@ -1043,7 +1058,8 @@
RETURN_FROM_KILL_SERVER;
kill_in_progress=TRUE;
abort_loop=1; // This should be set
- my_sigset(sig,SIG_IGN);
+ if (sig != 0) // 0 is not a valid signal number
+ my_sigset(sig,SIG_IGN);
if (sig == MYSQL_KILL_SIGNAL || sig == 0)
sql_print_information(ER(ER_NORMAL_SHUTDOWN),my_progname);
else
@@ -1297,6 +1313,7 @@
(void) pthread_mutex_destroy(&LOCK_bytes_sent);
(void) pthread_mutex_destroy(&LOCK_bytes_received);
(void) pthread_mutex_destroy(&LOCK_user_conn);
+ Events::destroy_mutexes();
#ifdef HAVE_OPENSSL
(void) pthread_mutex_destroy(&LOCK_des_key_file);
#ifndef HAVE_YASSL
@@ -2852,6 +2869,7 @@
(void) pthread_mutex_init(&LOCK_server_started, MY_MUTEX_INIT_FAST);
(void) pthread_cond_init(&COND_server_started,NULL);
sp_cache_init();
+ Events::init_mutexes();
/* Parameter for threads created for connections */
(void) pthread_attr_init(&connection_attrib);
(void) pthread_attr_setdetachstate(&connection_attrib,
@@ -2974,7 +2992,6 @@
ssl_acceptor_fd= 0;
}
#endif /* HAVE_OPENSSL */
- vio_end();
}
@@ -2998,7 +3015,6 @@
#ifdef HAVE_REPLICATION
init_slave_list();
#endif
- init_events();
/* Setup logs */
@@ -3622,6 +3638,10 @@
mysqld_server_started= 1;
pthread_cond_signal(&COND_server_started);
+ if (!opt_noacl)
+ {
+ Events::init();
+ }
#if defined(__NT__) || defined(HAVE_SMEM)
handle_connections_methods();
#else
@@ -3673,7 +3693,6 @@
clean_up(1);
wait_for_signal_thread_to_end();
clean_up_mutexes();
- shutdown_events();
my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
exit(0);
@@ -4664,7 +4683,7 @@
OPT_MAX_BINLOG_DUMP_EVENTS, OPT_SPORADIC_BINLOG_DUMP_FAIL,
OPT_SAFE_USER_CREATE, OPT_SQL_MODE,
OPT_HAVE_NAMED_PIPE,
- OPT_DO_PSTACK, OPT_EVENT_EXECUTOR, OPT_REPORT_HOST,
+ OPT_DO_PSTACK, OPT_EVENT_SCHEDULER, OPT_REPORT_HOST,
OPT_REPORT_USER, OPT_REPORT_PASSWORD, OPT_REPORT_PORT,
OPT_SHOW_SLAVE_AUTH_INFO,
OPT_SLAVE_LOAD_TMPDIR, OPT_NO_MIX_TYPE,
@@ -4989,9 +5008,9 @@
(gptr*) &global_system_variables.engine_condition_pushdown,
(gptr*) &global_system_variables.engine_condition_pushdown,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"event-scheduler", OPT_EVENT_EXECUTOR, "Enable/disable the event scheduler.",
- (gptr*) &opt_event_executor, (gptr*) &opt_event_executor, 0, GET_BOOL, NO_ARG,
- 0/*default*/, 0/*min-value*/, 1/*max-value*/, 0, 0, 0},
+ {"event-scheduler", OPT_EVENT_SCHEDULER, "Enable/disable the event scheduler.",
+ (gptr*) &Events::opt_event_scheduler, (gptr*) &Events::opt_event_scheduler, 0, GET_ULONG,
+ REQUIRED_ARG, 2/*default*/, 0/*min-value*/, 2/*max-value*/, 0, 0, 0},
{"exit-info", 'T', "Used for debugging; Use at your own risk!", 0, 0, 0,
GET_LONG, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"external-locking", OPT_USE_LOCKING, "Use system (external) locking. With this option enabled you can run myisamchk to test (not repair) tables while the MySQL server is running.",
@@ -7318,6 +7337,24 @@
break;
}
#endif
+ case OPT_EVENT_SCHEDULER:
+ if (!argument)
+ Events::opt_event_scheduler= 2;
+ else
+ {
+ int type;
+ if ((type=find_type(argument, &Events::opt_typelib, 1)) <= 0)
+ {
+ fprintf(stderr,"Unknown option to event-scheduler: %s\n",argument);
+ exit(1);
+ }
+ /*
+ type= 1 2 3 4 5 6
+ (OFF | 0) - (ON | 1) - (2 | SUSPEND)
+ */
+ Events::opt_event_scheduler= (type-1) / 2;
+ }
+ break;
case (int) OPT_SKIP_NEW:
opt_specialflag|= SPECIAL_NO_NEW_FUNC;
delay_key_write_options= (uint) DELAY_KEY_WRITE_NONE;
--- 1.477/sql/sql_yacc.yy 2006-05-18 10:08:29 +02:00
+++ 1.478/sql/sql_yacc.yy 2006-05-30 16:21:34 +02:00
@@ -204,6 +204,7 @@
%token CONSTRAINT
%token CONTAINS_SYM
%token CONTINUE_SYM
+%token CONTRIBUTORS_SYM
%token CONVERT_SYM
%token CONVERT_TZ_SYM
%token COUNT_SYM
@@ -568,6 +569,7 @@
%token RTREE_SYM
%token SAVEPOINT_SYM
%token SCHEDULE_SYM
+%token SCHEDULER_SYM
%token SECOND_MICROSECOND_SYM
%token SECOND_SYM
%token SECURITY_SYM
@@ -1401,7 +1403,7 @@
{
LEX *lex=Lex;
if (!lex->et_compile_phase)
- lex->et->status= MYSQL_EVENT_ENABLED;
+ lex->et->status= Event_timed::ENABLED;
$$= 1;
}
| DISABLE_SYM
@@ -1409,7 +1411,7 @@
LEX *lex=Lex;
if (!lex->et_compile_phase)
- lex->et->status= MYSQL_EVENT_DISABLED;
+ lex->et->status= Event_timed::DISABLED;
$$= 1;
}
;
@@ -1473,14 +1475,14 @@
{
LEX *lex=Lex;
if (!lex->et_compile_phase)
- lex->et->on_completion= MYSQL_EVENT_ON_COMPLETION_PRESERVE;
+ lex->et->on_completion= Event_timed::ON_COMPLETION_PRESERVE;
$$= 1;
}
| ON COMPLETION_SYM NOT_SYM PRESERVE_SYM
{
LEX *lex=Lex;
if (!lex->et_compile_phase)
- lex->et->on_completion= MYSQL_EVENT_ON_COMPLETION_DROP;
+ lex->et->on_completion= Event_timed::ON_COMPLETION_DROP;
$$= 1;
}
;
@@ -7496,7 +7498,11 @@
if (lex->result)
((select_dumpvar *)lex->result)->var_list.push_back( new my_var($2,0,0,(enum_field_types)0));
else
- YYABORT;
+ /*
+ The parser won't create select_result instance only
+ if it's an EXPLAIN.
+ */
+ DBUG_ASSERT(lex->describe);
}
| ident_or_text
{
@@ -7508,10 +7514,8 @@
my_error(ER_SP_UNDECLARED_VAR, MYF(0), $1.str);
YYABORT;
}
- if (! lex->result)
- YYABORT;
- else
- {
+ if (lex->result)
+ {
my_var *var;
((select_dumpvar *)lex->result)->
var_list.push_back(var= new my_var($1,1,t->offset,t->type));
@@ -7519,6 +7523,14 @@
if (var)
var->sp= lex->sphead;
#endif
+ }
+ else
+ {
+ /*
+ The parser won't create select_result instance only
+ if it's an EXPLAIN.
+ */
+ DBUG_ASSERT(lex->describe);
}
}
;
@@ -8057,15 +8069,24 @@
if (prepare_schema_table(YYTHD, lex, 0, SCH_TRIGGERS))
YYABORT;
}
- | opt_full EVENTS_SYM opt_db wild_and_where
+ | EVENTS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
lex->sql_command= SQLCOM_SELECT;
lex->orig_sql_command= SQLCOM_SHOW_EVENTS;
- lex->select_lex.db= $3;
+ lex->select_lex.db= $2;
if (prepare_schema_table(YYTHD, lex, 0, SCH_EVENTS))
YYABORT;
}
+ | SCHEDULER_SYM STATUS_SYM
+ {
+#ifndef DBUG_OFF
+ Lex->sql_command= SQLCOM_SHOW_SCHEDULER_STATUS;
+#else
+ yyerror(ER(ER_SYNTAX_ERROR));
+ YYABORT;
+#endif
+ }
| TABLE_SYM STATUS_SYM opt_db wild_and_where
{
LEX *lex= Lex;
@@ -8174,6 +8195,11 @@
LEX *lex=Lex;
lex->sql_command= SQLCOM_SHOW_AUTHORS;
}
+ | CONTRIBUTORS_SYM
+ {
+ LEX *lex=Lex;
+ lex->sql_command= SQLCOM_SHOW_CONTRIBUTORS;
+ }
| PRIVILEGES
{
LEX *lex=Lex;
@@ -9014,12 +9040,18 @@
YYABORT;
}
+ DBUG_ASSERT(!new_row ||
+ (lex->trg_chistics.event == TRG_EVENT_INSERT ||
+ lex->trg_chistics.event == TRG_EVENT_UPDATE));
+ const bool read_only=
+ !(new_row && lex->trg_chistics.action_time == TRG_ACTION_BEFORE);
if (!(trg_fld= new Item_trigger_field(Lex->current_context(),
new_row ?
Item_trigger_field::NEW_ROW:
Item_trigger_field::OLD_ROW,
$3.str,
- Item_trigger_field::AT_READ)))
+ SELECT_ACL,
+ read_only)))
YYABORT;
/*
@@ -9496,6 +9528,7 @@
| ROW_SYM {}
| RTREE_SYM {}
| SCHEDULE_SYM {}
+ | SCHEDULER_SYM {}
| SECOND_SYM {}
| SERIAL_SYM {}
| SERIALIZABLE_SYM {}
@@ -9700,11 +9733,13 @@
it= new Item_null();
}
+ DBUG_ASSERT(lex->trg_chistics.action_time == TRG_ACTION_BEFORE &&
+ (lex->trg_chistics.event == TRG_EVENT_INSERT ||
+ lex->trg_chistics.event == TRG_EVENT_UPDATE));
if (!(trg_fld= new Item_trigger_field(Lex->current_context(),
Item_trigger_field::NEW_ROW,
$2.base_name.str,
- Item_trigger_field::AT_UPDATE)
- ) ||
+ UPDATE_ACL, FALSE)) ||
!(sp_fld= new sp_instr_set_trigger_field(lex->sphead->
instructions(),
lex->spcont,
--- 1.117/mysql-test/mysql-test-run.pl 2006-05-23 20:26:09 +02:00
+++ 1.118/mysql-test/mysql-test-run.pl 2006-05-30 16:21:31 +02:00
@@ -2603,7 +2603,6 @@
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
mtr_add_arg($args, "%s--core", $prefix);
mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
- mtr_add_arg($args, "%s--loose-binlog-show-xid=0", $prefix);
mtr_add_arg($args, "%s--default-character-set=latin1", $prefix);
mtr_add_arg($args, "%s--language=%s", $prefix, $path_language);
mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix);
@@ -2749,7 +2748,6 @@
mtr_add_arg($args, "%s--sort_buffer=256K", $prefix);
mtr_add_arg($args, "%s--max_heap_table_size=1M", $prefix);
mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
- mtr_add_arg($args, "%s--loose-binlog-show-xid=0", $prefix);
if ( $opt_ssl_supported )
{
| Thread |
|---|
| • bk commit into 5.1 tree (gbichot:1.2176) | guilhem | 30 May |