Merge trift2.:/MySQL/M51/mysql-5.1
into trift2.:/MySQL/M51/push-5.1
This commit is contained in:
commit
f20a72e114
@ -139,9 +139,17 @@ fi
|
|||||||
#
|
#
|
||||||
base_configs="--prefix=$prefix --enable-assembler "
|
base_configs="--prefix=$prefix --enable-assembler "
|
||||||
base_configs="$base_configs --with-extra-charsets=complex "
|
base_configs="$base_configs --with-extra-charsets=complex "
|
||||||
base_configs="$base_configs --enable-thread-safe-client --with-readline "
|
base_configs="$base_configs --enable-thread-safe-client "
|
||||||
base_configs="$base_configs --with-big-tables"
|
base_configs="$base_configs --with-big-tables"
|
||||||
|
|
||||||
|
if test -d "$path/../cmd-line-utils/readline"
|
||||||
|
then
|
||||||
|
base_configs="$base_configs --with-readline"
|
||||||
|
elif test -d "$path/../cmd-line-utils/libedit"
|
||||||
|
then
|
||||||
|
base_configs="$base_configs --with-libedit"
|
||||||
|
fi
|
||||||
|
|
||||||
static_link="--with-mysqld-ldflags=-all-static "
|
static_link="--with-mysqld-ldflags=-all-static "
|
||||||
static_link="$static_link --with-client-ldflags=-all-static"
|
static_link="$static_link --with-client-ldflags=-all-static"
|
||||||
# we need local-infile in all binaries for rpl000001
|
# we need local-infile in all binaries for rpl000001
|
||||||
|
@ -1408,7 +1408,7 @@ static char **new_mysql_completion (const char *text, int start, int end);
|
|||||||
#if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_LIBEDIT_INTERFACE)
|
#if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_LIBEDIT_INTERFACE)
|
||||||
char *no_completion(const char*,int)
|
char *no_completion(const char*,int)
|
||||||
#else
|
#else
|
||||||
int no_completion()
|
char *no_completion()
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
return 0; /* No filename completion */
|
return 0; /* No filename completion */
|
||||||
@ -1496,10 +1496,10 @@ static void initialize_readline (char *name)
|
|||||||
setlocale(LC_ALL,""); /* so as libedit use isprint */
|
setlocale(LC_ALL,""); /* so as libedit use isprint */
|
||||||
#endif
|
#endif
|
||||||
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
|
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
|
||||||
rl_completion_entry_function= (Function*)&no_completion;
|
rl_completion_entry_function= &no_completion;
|
||||||
#else
|
#else
|
||||||
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
|
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
|
||||||
rl_completion_entry_function= (Function*)&no_completion;
|
rl_completion_entry_function= &no_completion;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ int rl_attempted_completion_over = 0;
|
|||||||
char *rl_basic_word_break_characters = break_chars;
|
char *rl_basic_word_break_characters = break_chars;
|
||||||
char *rl_completer_word_break_characters = NULL;
|
char *rl_completer_word_break_characters = NULL;
|
||||||
char *rl_completer_quote_characters = NULL;
|
char *rl_completer_quote_characters = NULL;
|
||||||
Function *rl_completion_entry_function = NULL;
|
CPFunction *rl_completion_entry_function = NULL;
|
||||||
CPPFunction *rl_attempted_completion_function = NULL;
|
CPPFunction *rl_attempted_completion_function = NULL;
|
||||||
Function *rl_pre_input_hook = NULL;
|
Function *rl_pre_input_hook = NULL;
|
||||||
Function *rl_startup1_hook = NULL;
|
Function *rl_startup1_hook = NULL;
|
||||||
@ -1724,7 +1724,7 @@ rl_display_match_list (matches, len, max)
|
|||||||
static int
|
static int
|
||||||
_rl_complete_internal(int what_to_do)
|
_rl_complete_internal(int what_to_do)
|
||||||
{
|
{
|
||||||
Function *complet_func;
|
CPFunction *complet_func;
|
||||||
const LineInfo *li;
|
const LineInfo *li;
|
||||||
char *temp, **matches;
|
char *temp, **matches;
|
||||||
const char *ctemp;
|
const char *ctemp;
|
||||||
@ -1737,7 +1737,7 @@ _rl_complete_internal(int what_to_do)
|
|||||||
|
|
||||||
complet_func = rl_completion_entry_function;
|
complet_func = rl_completion_entry_function;
|
||||||
if (!complet_func)
|
if (!complet_func)
|
||||||
complet_func = (Function *)(void *)filename_completion_function;
|
complet_func = filename_completion_function;
|
||||||
|
|
||||||
/* We now look backwards for the start of a filename/variable word */
|
/* We now look backwards for the start of a filename/variable word */
|
||||||
li = el_line(e);
|
li = el_line(e);
|
||||||
@ -1764,7 +1764,7 @@ _rl_complete_internal(int what_to_do)
|
|||||||
} else
|
} else
|
||||||
matches = 0;
|
matches = 0;
|
||||||
if (!rl_attempted_completion_function || !matches)
|
if (!rl_attempted_completion_function || !matches)
|
||||||
matches = completion_matches(temp, (CPFunction *)complet_func);
|
matches = completion_matches(temp, complet_func);
|
||||||
|
|
||||||
if (matches) {
|
if (matches) {
|
||||||
int i, retval = CC_REFRESH;
|
int i, retval = CC_REFRESH;
|
||||||
@ -1789,8 +1789,7 @@ _rl_complete_internal(int what_to_do)
|
|||||||
* object is a directory.
|
* object is a directory.
|
||||||
*/
|
*/
|
||||||
size_t alen = strlen(matches[0]);
|
size_t alen = strlen(matches[0]);
|
||||||
if ((complet_func !=
|
if ((complet_func != filename_completion_function
|
||||||
(Function *)filename_completion_function
|
|
||||||
|| (alen > 0 && (matches[0])[alen - 1] != '/'))
|
|| (alen > 0 && (matches[0])[alen - 1] != '/'))
|
||||||
&& rl_completion_append_character) {
|
&& rl_completion_append_character) {
|
||||||
char buf[2];
|
char buf[2];
|
||||||
|
@ -102,7 +102,7 @@ extern int max_input_history;
|
|||||||
extern char *rl_basic_word_break_characters;
|
extern char *rl_basic_word_break_characters;
|
||||||
extern char *rl_completer_word_break_characters;
|
extern char *rl_completer_word_break_characters;
|
||||||
extern char *rl_completer_quote_characters;
|
extern char *rl_completer_quote_characters;
|
||||||
extern Function *rl_completion_entry_function;
|
extern CPFunction *rl_completion_entry_function;
|
||||||
extern CPPFunction *rl_attempted_completion_function;
|
extern CPPFunction *rl_attempted_completion_function;
|
||||||
extern int rl_completion_type;
|
extern int rl_completion_type;
|
||||||
extern int rl_completion_query_items;
|
extern int rl_completion_query_items;
|
||||||
|
20
configure.in
20
configure.in
@ -2354,6 +2354,7 @@ readline_basedir=""
|
|||||||
readline_dir=""
|
readline_dir=""
|
||||||
readline_h_ln_cmd=""
|
readline_h_ln_cmd=""
|
||||||
readline_link=""
|
readline_link=""
|
||||||
|
want_to_use_readline="no"
|
||||||
|
|
||||||
if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null
|
if expr "$SYSTEM_TYPE" : ".*netware.*" > /dev/null
|
||||||
then
|
then
|
||||||
@ -2379,6 +2380,7 @@ then
|
|||||||
readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a"
|
readline_link="\$(top_builddir)/cmd-line-utils/readline/libreadline.a"
|
||||||
readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline"
|
readline_h_ln_cmd="\$(LN) -s \$(top_srcdir)/cmd-line-utils/readline readline"
|
||||||
compile_readline=yes
|
compile_readline=yes
|
||||||
|
want_to_use_readline="yes"
|
||||||
AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
|
AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1)
|
||||||
else
|
else
|
||||||
# Use system readline library
|
# Use system readline library
|
||||||
@ -2388,10 +2390,12 @@ else
|
|||||||
MYSQL_CHECK_NEW_RL_INTERFACE
|
MYSQL_CHECK_NEW_RL_INTERFACE
|
||||||
MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY
|
MYSQL_CHECK_READLINE_DECLARES_HIST_ENTRY
|
||||||
AC_LANG_RESTORE
|
AC_LANG_RESTORE
|
||||||
if [test "$mysql_cv_new_rl_interface" = "yes"]
|
if [test "$mysql_cv_new_rl_interface" = "yes"] && [test -d "./cmd-line-utils/readline"]
|
||||||
then
|
then
|
||||||
# Use the new readline interface
|
# Use the new readline interface, but only if the package includes a bundled libreadline
|
||||||
|
# this way we avoid linking commercial source with GPL readline
|
||||||
readline_link="-lreadline"
|
readline_link="-lreadline"
|
||||||
|
want_to_use_readline="yes"
|
||||||
elif [test "$mysql_cv_libedit_interface" = "yes"]
|
elif [test "$mysql_cv_libedit_interface" = "yes"]
|
||||||
then
|
then
|
||||||
# Use libedit
|
# Use libedit
|
||||||
@ -2402,6 +2406,15 @@ else
|
|||||||
versions of libedit or readline])
|
versions of libedit or readline])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# if there is no readline, but we want to build with readline, we fail
|
||||||
|
if [test "$want_to_use_readline" = "yes"] && [test ! -d "./cmd-line-utils/readline"]
|
||||||
|
then
|
||||||
|
AC_MSG_ERROR([This commercially licensed MySQL source package can't
|
||||||
|
be built with libreadline. Please use --with-libedit to use
|
||||||
|
the bundled version of libedit instead.])
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# if either readline or libedit is enabled - generate Makefile's for both
|
# if either readline or libedit is enabled - generate Makefile's for both
|
||||||
# (to make sure both are included in 'make dist')
|
# (to make sure both are included in 'make dist')
|
||||||
@ -2531,7 +2544,8 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
|
|||||||
sql/sql_builtin.cc sql-common/Makefile dnl
|
sql/sql_builtin.cc sql-common/Makefile dnl
|
||||||
dbug/Makefile scripts/Makefile include/Makefile dnl
|
dbug/Makefile scripts/Makefile include/Makefile dnl
|
||||||
tests/Makefile Docs/Makefile support-files/Makefile dnl
|
tests/Makefile Docs/Makefile support-files/Makefile dnl
|
||||||
support-files/MacOSX/Makefile mysql-test/Makefile dnl
|
support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl
|
||||||
|
mysql-test/Makefile dnl
|
||||||
mysql-test/ndb/Makefile netware/Makefile sql-bench/Makefile dnl
|
mysql-test/ndb/Makefile netware/Makefile sql-bench/Makefile dnl
|
||||||
include/mysql_version.h plugin/Makefile win/Makefile)
|
include/mysql_version.h plugin/Makefile win/Makefile)
|
||||||
|
|
||||||
|
14
dbug/dbug.c
14
dbug/dbug.c
@ -2375,4 +2375,18 @@ va_list ap;
|
|||||||
|
|
||||||
#endif /* NO_VARARGS */
|
#endif /* NO_VARARGS */
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Dummy function, workaround for MySQL bug#14420 related
|
||||||
|
* build failure on a platform where linking with an empty
|
||||||
|
* archive fails.
|
||||||
|
*
|
||||||
|
* This block can be removed as soon as a fix for bug#14420
|
||||||
|
* is implemented.
|
||||||
|
*/
|
||||||
|
int i_am_a_dummy_function() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
#ifdef DBUG_OFF /* We are testing dbug */
|
#ifdef DBUG_OFF /* We are testing dbug */
|
||||||
#undef DBUG_OFF
|
|
||||||
#endif
|
int factorial(register int value) {
|
||||||
|
if(value > 1) {
|
||||||
|
value *= factorial(value-1);
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
|
|
||||||
@ -15,3 +22,6 @@ register int value)
|
|||||||
DBUG_PRINT ("result", ("result is %d", value));
|
DBUG_PRINT ("result", ("result is %d", value));
|
||||||
DBUG_RETURN (value);
|
DBUG_RETURN (value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@ -538,6 +538,11 @@ int init_embedded_server(int argc, char **argv, char **groups)
|
|||||||
sql_print_error("Warning: Can't create thread to manage maintenance");
|
sql_print_error("Warning: Can't create thread to manage maintenance");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME initialize binlog_filter and rpl_filter if not already done
|
||||||
|
// corresponding delete is in clean_up()
|
||||||
|
if(!binlog_filter) binlog_filter = new Rpl_filter;
|
||||||
|
if(!rpl_filter) rpl_filter = new Rpl_filter;
|
||||||
|
|
||||||
if (opt_init_file)
|
if (opt_init_file)
|
||||||
{
|
{
|
||||||
if (read_init_file(opt_init_file))
|
if (read_init_file(opt_init_file))
|
||||||
@ -593,7 +598,7 @@ void *create_embedded_thd(int client_flag)
|
|||||||
thd->set_time();
|
thd->set_time();
|
||||||
thd->init_for_queries();
|
thd->init_for_queries();
|
||||||
thd->client_capabilities= client_flag;
|
thd->client_capabilities= client_flag;
|
||||||
thd->real_id= (pthread_t) thd;
|
thd->real_id= pthread_self();
|
||||||
|
|
||||||
thd->db= NULL;
|
thd->db= NULL;
|
||||||
thd->db_length= 0;
|
thd->db_length= 0;
|
||||||
|
@ -1,16 +1,18 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 1979-1996 TcX AB & Monty Program KB & Detron HB
|
# Copyright (C) 1979-2007 MySQL AB
|
||||||
#
|
#
|
||||||
# This software is distributed with NO WARRANTY OF ANY KIND. No author or
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# distributor accepts any responsibility for the consequences of using it, or
|
# it under the terms of the GNU General Public License as published by
|
||||||
# for whether it serves any particular purpose or works at all, unless he or
|
# the Free Software Foundation; version 2 of the License.
|
||||||
# she says so in writing. Refer to the Free Public License (the "License")
|
|
||||||
# for full details.
|
|
||||||
#
|
#
|
||||||
# Every copy of this file must include a copy of the License, normally in a
|
# This program is distributed in the hope that it will be useful,
|
||||||
# plain ASCII text file named PUBLIC. The License grants you the right to
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# copy, modify and redistribute this file, but only under certain conditions
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# described in the License. Among other things, the License requires that
|
# GNU General Public License for more details.
|
||||||
# the copyright notice and this notice be preserved on all copies.
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; see the file COPYING. If not, write to the
|
||||||
|
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston
|
||||||
|
# MA 02110-1301 USA.
|
||||||
|
|
||||||
@bindir@/replace msqlConnect mysql_connect msqlListDBs mysql_list_dbs msqlNumRows mysql_num_rows msqlFetchRow mysql_fetch_row msqlFetchField mysql_fetch_field msqlFreeResult mysql_free_result msqlListFields mysql_list_fields msqlListTables mysql_list_tables msqlErrMsg 'mysql_error(mysql)' msqlStoreResult mysql_store_result msqlQuery mysql_query msqlField mysql_field msqlSelect mysql_select msqlSelectDB mysql_select_db msqlNumFields mysql_num_fields msqlClose mysql_close msqlDataSeek mysql_data_seek m_field MYSQL_FIELD m_result MYSQL_RES m_row MYSQL_ROW msql mysql mSQL mySQL MSQL MYSQL msqlCreateDB mysql_create_db msqlDropDB mysql_drop_db msqlFieldSeek mysql_field_seek -- $*
|
@bindir@/replace msqlConnect mysql_connect msqlListDBs mysql_list_dbs msqlNumRows mysql_num_rows msqlFetchRow mysql_fetch_row msqlFetchField mysql_fetch_field msqlFreeResult mysql_free_result msqlListFields mysql_list_fields msqlListTables mysql_list_tables msqlErrMsg 'mysql_error(mysql)' msqlStoreResult mysql_store_result msqlQuery mysql_query msqlField mysql_field msqlSelect mysql_select msqlSelectDB mysql_select_db msqlNumFields mysql_num_fields msqlClose mysql_close msqlDataSeek mysql_data_seek m_field MYSQL_FIELD m_result MYSQL_RES m_row MYSQL_ROW msql mysql mSQL mySQL MSQL MYSQL msqlCreateDB mysql_create_db msqlDropDB mysql_drop_db msqlFieldSeek mysql_field_seek -- $*
|
||||||
|
@ -445,10 +445,24 @@ int main(int argc,char **argv)
|
|||||||
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
||||||
printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
|
printf("/*\n\n Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
|
||||||
|
|
||||||
printf("/* Copyright (C) 2001-2004 MySQL AB\n\
|
printf("\
|
||||||
This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\
|
/* Copyright (C) 2001-2004 MySQL AB\n\
|
||||||
and you are welcome to modify and redistribute it under the GPL license\n\
|
\n\
|
||||||
\n*/\n\n");
|
This program is free software; you can redistribute it and/or modify\n\
|
||||||
|
it under the terms of the GNU General Public License as published by\n\
|
||||||
|
the Free Software Foundation; version 2 of the License.\n\
|
||||||
|
\n\
|
||||||
|
This program is distributed in the hope that it will be useful,\n\
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
|
||||||
|
GNU General Public License for more details.\n\
|
||||||
|
\n\
|
||||||
|
You should have received a copy of the GNU General Public License\n\
|
||||||
|
along with this program; see the file COPYING. If not, write to the\n\
|
||||||
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston\n\
|
||||||
|
MA 02110-1301 USA. */\n\
|
||||||
|
\n\
|
||||||
|
");
|
||||||
|
|
||||||
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
/* Broken up to indicate that it's not advice to you, gentle reader. */
|
||||||
printf("/* Do " "not " "edit " "this " "file! This is generated by "
|
printf("/* Do " "not " "edit " "this " "file! This is generated by "
|
||||||
|
@ -3085,7 +3085,13 @@ public:
|
|||||||
int count;
|
int count;
|
||||||
bool locked;
|
bool locked;
|
||||||
pthread_cond_t cond;
|
pthread_cond_t cond;
|
||||||
|
#ifndef EMBEDDED_LIBRARY
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
|
void set_thread(THD *thd) { thread= thd->real_id; }
|
||||||
|
#else
|
||||||
|
THD *thread;
|
||||||
|
void set_thread(THD *thd) { thread= thd; }
|
||||||
|
#endif /*EMBEDDED_LIBRARY*/
|
||||||
ulong thread_id;
|
ulong thread_id;
|
||||||
|
|
||||||
User_level_lock(const char *key_arg,uint length, ulong id)
|
User_level_lock(const char *key_arg,uint length, ulong id)
|
||||||
@ -3239,7 +3245,7 @@ void debug_sync_point(const char* lock_name, uint lock_timeout)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ull->locked=1;
|
ull->locked=1;
|
||||||
ull->thread=thd->real_id;
|
ull->set_thread(thd);
|
||||||
thd->ull=ull;
|
thd->ull=ull;
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&LOCK_user_locks);
|
pthread_mutex_unlock(&LOCK_user_locks);
|
||||||
@ -3314,7 +3320,7 @@ longlong Item_func_get_lock::val_int()
|
|||||||
null_value=1; // Probably out of memory
|
null_value=1; // Probably out of memory
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ull->thread=thd->real_id;
|
ull->set_thread(thd);
|
||||||
thd->ull=ull;
|
thd->ull=ull;
|
||||||
pthread_mutex_unlock(&LOCK_user_locks);
|
pthread_mutex_unlock(&LOCK_user_locks);
|
||||||
return 1; // Got new lock
|
return 1; // Got new lock
|
||||||
@ -3355,7 +3361,7 @@ longlong Item_func_get_lock::val_int()
|
|||||||
else // We got the lock
|
else // We got the lock
|
||||||
{
|
{
|
||||||
ull->locked=1;
|
ull->locked=1;
|
||||||
ull->thread=thd->real_id;
|
ull->set_thread(thd);
|
||||||
ull->thread_id= thd->thread_id;
|
ull->thread_id= thd->thread_id;
|
||||||
thd->ull=ull;
|
thd->ull=ull;
|
||||||
error=0;
|
error=0;
|
||||||
@ -3404,7 +3410,7 @@ longlong Item_func_release_lock::val_int()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef EMBEDDED_LIBRARY
|
#ifdef EMBEDDED_LIBRARY
|
||||||
if (ull->locked && pthread_equal(current_thd->real_id,ull->thread))
|
if (ull->locked && (current_thd == ull->thread))
|
||||||
#else
|
#else
|
||||||
if (ull->locked && pthread_equal(pthread_self(),ull->thread))
|
if (ull->locked && pthread_equal(pthread_self(),ull->thread))
|
||||||
#endif
|
#endif
|
||||||
|
@ -2613,6 +2613,14 @@ static int init_common_variables(const char *conf_file_name, int argc,
|
|||||||
|
|
||||||
max_system_variables.pseudo_thread_id= (ulong)~0;
|
max_system_variables.pseudo_thread_id= (ulong)~0;
|
||||||
start_time=time((time_t*) 0);
|
start_time=time((time_t*) 0);
|
||||||
|
rpl_filter= new Rpl_filter;
|
||||||
|
binlog_filter= new Rpl_filter;
|
||||||
|
if (!rpl_filter || !binlog_filter)
|
||||||
|
{
|
||||||
|
sql_perror("Could not allocate replication and binlog filters");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
if (init_thread_environment())
|
if (init_thread_environment())
|
||||||
return 1;
|
return 1;
|
||||||
mysql_init_variables();
|
mysql_init_variables();
|
||||||
@ -3473,14 +3481,6 @@ int main(int argc, char **argv)
|
|||||||
MY_INIT(argv[0]); // init my_sys library & pthreads
|
MY_INIT(argv[0]); // init my_sys library & pthreads
|
||||||
/* nothing should come before this line ^^^ */
|
/* nothing should come before this line ^^^ */
|
||||||
|
|
||||||
rpl_filter= new Rpl_filter;
|
|
||||||
binlog_filter= new Rpl_filter;
|
|
||||||
if (!rpl_filter || !binlog_filter)
|
|
||||||
{
|
|
||||||
sql_perror("Could not allocate replication and binlog filters");
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Perform basic logger initialization logger. Should be called after
|
Perform basic logger initialization logger. Should be called after
|
||||||
MY_INIT, as it initializes mutexes. Log tables are inited later.
|
MY_INIT, as it initializes mutexes. Log tables are inited later.
|
||||||
|
@ -30,7 +30,7 @@ EXTRA_DIST = mysql.spec.sh \
|
|||||||
MySQL-shared-compat.spec.sh \
|
MySQL-shared-compat.spec.sh \
|
||||||
ndb-config-2-node.ini.sh
|
ndb-config-2-node.ini.sh
|
||||||
|
|
||||||
SUBDIRS = MacOSX
|
SUBDIRS = MacOSX RHEL4-SElinux
|
||||||
|
|
||||||
pkgdata_DATA = my-small.cnf \
|
pkgdata_DATA = my-small.cnf \
|
||||||
my-medium.cnf \
|
my-medium.cnf \
|
||||||
|
23
support-files/RHEL4-SElinux/Makefile.am
Normal file
23
support-files/RHEL4-SElinux/Makefile.am
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# Copyright (C) 2000-2001, 2003-2006 MySQL AB
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Library General Public
|
||||||
|
# License as published by the Free Software Foundation; version 2
|
||||||
|
# of the License.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with this library; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||||
|
# MA 02111-1307, USA
|
||||||
|
|
||||||
|
## Process this file with automake to create Makefile.in
|
||||||
|
|
||||||
|
EXTRA_DIST = mysql.fc mysql.te
|
||||||
|
|
||||||
|
# Don't update the files from bitkeeper
|
||||||
|
%::SCCS/s.%
|
25
support-files/RHEL4-SElinux/mysql.fc
Normal file
25
support-files/RHEL4-SElinux/mysql.fc
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# MySQL Database Server
|
||||||
|
|
||||||
|
#
|
||||||
|
# /etc
|
||||||
|
#
|
||||||
|
/etc/my\.cnf -- gen_context(system_u:object_r:mysqld_etc_t,s0)
|
||||||
|
/etc/mysql(/.*)? gen_context(system_u:object_r:mysqld_etc_t,s0)
|
||||||
|
|
||||||
|
#
|
||||||
|
# /usr
|
||||||
|
# Red Hat compatibility
|
||||||
|
/usr/libexec/mysqld -- gen_context(system_u:object_r:mysqld_exec_t,s0)
|
||||||
|
|
||||||
|
# MySQL AB compatibility
|
||||||
|
/usr/sbin/mysqld(-max)? -- gen_context(system_u:object_r:mysqld_exec_t,s0)
|
||||||
|
|
||||||
|
#
|
||||||
|
# /var
|
||||||
|
#
|
||||||
|
/var/lib/mysql(/.*)? gen_context(system_u:object_r:mysqld_db_t,s0)
|
||||||
|
/var/lib/mysql/mysql\.sock -s gen_context(system_u:object_r:mysqld_var_run_t,s0)
|
||||||
|
|
||||||
|
/var/log/mysql.* -- gen_context(system_u:object_r:mysqld_log_t,s0)
|
||||||
|
|
||||||
|
/var/run/mysqld(/.*)? gen_context(system_u:object_r:mysqld_var_run_t,s0)
|
132
support-files/RHEL4-SElinux/mysql.te
Normal file
132
support-files/RHEL4-SElinux/mysql.te
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
|
||||||
|
policy_module(mysql,1.0.0)
|
||||||
|
|
||||||
|
########################################
|
||||||
|
#
|
||||||
|
# Declarations
|
||||||
|
#
|
||||||
|
|
||||||
|
type mysqld_t;
|
||||||
|
type mysqld_exec_t;
|
||||||
|
init_daemon_domain(mysqld_t,mysqld_exec_t)
|
||||||
|
|
||||||
|
type mysqld_var_run_t;
|
||||||
|
files_pid_file(mysqld_var_run_t)
|
||||||
|
|
||||||
|
type mysqld_db_t;
|
||||||
|
files_type(mysqld_db_t)
|
||||||
|
|
||||||
|
type mysqld_etc_t alias etc_mysqld_t;
|
||||||
|
files_config_file(mysqld_etc_t)
|
||||||
|
|
||||||
|
type mysqld_log_t;
|
||||||
|
logging_log_file(mysqld_log_t)
|
||||||
|
|
||||||
|
type mysqld_tmp_t;
|
||||||
|
files_tmp_file(mysqld_tmp_t)
|
||||||
|
|
||||||
|
########################################
|
||||||
|
#
|
||||||
|
# Local policy
|
||||||
|
#
|
||||||
|
|
||||||
|
allow mysqld_t self:capability { dac_override setgid setuid sys_resource net_bind_service };
|
||||||
|
dontaudit mysqld_t self:capability sys_tty_config;
|
||||||
|
allow mysqld_t self:process { setsched getsched setrlimit signal_perms rlimitinh };
|
||||||
|
allow mysqld_t self:fifo_file { read write };
|
||||||
|
allow mysqld_t self:unix_stream_socket create_stream_socket_perms;
|
||||||
|
allow mysqld_t self:tcp_socket create_stream_socket_perms;
|
||||||
|
allow mysqld_t self:udp_socket create_socket_perms;
|
||||||
|
|
||||||
|
allow mysqld_t mysqld_db_t:dir create_dir_perms;
|
||||||
|
allow mysqld_t mysqld_db_t:file create_file_perms;
|
||||||
|
allow mysqld_t mysqld_db_t:lnk_file create_lnk_perms;
|
||||||
|
files_var_lib_filetrans(mysqld_t,mysqld_db_t,{ dir file })
|
||||||
|
|
||||||
|
allow mysqld_t mysqld_etc_t:file { getattr read };
|
||||||
|
allow mysqld_t mysqld_etc_t:lnk_file { getattr read };
|
||||||
|
allow mysqld_t mysqld_etc_t:dir list_dir_perms;
|
||||||
|
|
||||||
|
allow mysqld_t mysqld_log_t:file create_file_perms;
|
||||||
|
logging_log_filetrans(mysqld_t,mysqld_log_t,file)
|
||||||
|
|
||||||
|
allow mysqld_t mysqld_tmp_t:dir create_dir_perms;
|
||||||
|
allow mysqld_t mysqld_tmp_t:file create_file_perms;
|
||||||
|
files_tmp_filetrans(mysqld_t, mysqld_tmp_t, { file dir })
|
||||||
|
|
||||||
|
allow mysqld_t mysqld_var_run_t:dir rw_dir_perms;
|
||||||
|
allow mysqld_t mysqld_var_run_t:sock_file create_file_perms;
|
||||||
|
allow mysqld_t mysqld_var_run_t:file create_file_perms;
|
||||||
|
files_pid_filetrans(mysqld_t,mysqld_var_run_t,file)
|
||||||
|
|
||||||
|
kernel_read_system_state(mysqld_t)
|
||||||
|
kernel_read_kernel_sysctls(mysqld_t)
|
||||||
|
|
||||||
|
corenet_non_ipsec_sendrecv(mysqld_t)
|
||||||
|
corenet_tcp_sendrecv_all_if(mysqld_t)
|
||||||
|
corenet_udp_sendrecv_all_if(mysqld_t)
|
||||||
|
corenet_tcp_sendrecv_all_nodes(mysqld_t)
|
||||||
|
corenet_udp_sendrecv_all_nodes(mysqld_t)
|
||||||
|
corenet_tcp_sendrecv_all_ports(mysqld_t)
|
||||||
|
corenet_udp_sendrecv_all_ports(mysqld_t)
|
||||||
|
corenet_tcp_bind_all_nodes(mysqld_t)
|
||||||
|
corenet_tcp_bind_mysqld_port(mysqld_t)
|
||||||
|
corenet_tcp_connect_mysqld_port(mysqld_t)
|
||||||
|
corenet_sendrecv_mysqld_client_packets(mysqld_t)
|
||||||
|
corenet_sendrecv_mysqld_server_packets(mysqld_t)
|
||||||
|
|
||||||
|
dev_read_sysfs(mysqld_t)
|
||||||
|
|
||||||
|
fs_getattr_all_fs(mysqld_t)
|
||||||
|
fs_search_auto_mountpoints(mysqld_t)
|
||||||
|
|
||||||
|
term_dontaudit_use_console(mysqld_t)
|
||||||
|
|
||||||
|
domain_use_interactive_fds(mysqld_t)
|
||||||
|
|
||||||
|
files_getattr_var_lib_dirs(mysqld_t)
|
||||||
|
files_read_etc_runtime_files(mysqld_t)
|
||||||
|
files_read_etc_files(mysqld_t)
|
||||||
|
files_read_usr_files(mysqld_t)
|
||||||
|
files_search_var_lib(mysqld_t)
|
||||||
|
|
||||||
|
auth_use_nsswitch(mysqld_t)
|
||||||
|
|
||||||
|
init_use_fds(mysqld_t)
|
||||||
|
init_use_script_ptys(mysqld_t)
|
||||||
|
|
||||||
|
libs_use_ld_so(mysqld_t)
|
||||||
|
libs_use_shared_libs(mysqld_t)
|
||||||
|
|
||||||
|
logging_send_syslog_msg(mysqld_t)
|
||||||
|
|
||||||
|
miscfiles_read_localization(mysqld_t)
|
||||||
|
|
||||||
|
sysnet_read_config(mysqld_t)
|
||||||
|
|
||||||
|
userdom_dontaudit_use_unpriv_user_fds(mysqld_t)
|
||||||
|
# for /root/.my.cnf - should not be needed:
|
||||||
|
userdom_read_sysadm_home_content_files(mysqld_t)
|
||||||
|
|
||||||
|
ifdef(`distro_redhat',`
|
||||||
|
# because Fedora has the sock_file in the database directory
|
||||||
|
type_transition mysqld_t mysqld_db_t:sock_file mysqld_var_run_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
ifdef(`targeted_policy',`
|
||||||
|
term_dontaudit_use_unallocated_ttys(mysqld_t)
|
||||||
|
term_dontaudit_use_generic_ptys(mysqld_t)
|
||||||
|
files_dontaudit_read_root_files(mysqld_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
optional_policy(`
|
||||||
|
daemontools_service_domain(mysqld_t, mysqld_exec_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
optional_policy(`
|
||||||
|
seutil_sigchld_newrole(mysqld_t)
|
||||||
|
')
|
||||||
|
|
||||||
|
optional_policy(`
|
||||||
|
udev_read_db(mysqld_t)
|
||||||
|
')
|
@ -1,3 +1,18 @@
|
|||||||
|
# Copyright (C) 2000-2007 MySQL AB
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; version 2 of the License.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; see the file COPYING. If not, write to the
|
||||||
|
# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston
|
||||||
|
# MA 02110-1301 USA.
|
||||||
|
|
||||||
%define mysql_version @VERSION@
|
%define mysql_version @VERSION@
|
||||||
|
|
||||||
@ -71,12 +86,9 @@ is intended for mission-critical, heavy-load production systems as well
|
|||||||
as for embedding into mass-deployed software. MySQL is a trademark of
|
as for embedding into mass-deployed software. MySQL is a trademark of
|
||||||
MySQL AB.
|
MySQL AB.
|
||||||
|
|
||||||
The MySQL software has Dual Licensing, which means you can use the MySQL
|
Copyright (C) 2000-2007 MySQL AB
|
||||||
software free of charge under the GNU General Public License
|
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
|
||||||
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
|
and you are welcome to modify and redistribute it under the GPL license.
|
||||||
licenses from MySQL AB if you do not wish to be bound by the terms of
|
|
||||||
the GPL. See the chapter "Licensing and Support" in the manual for
|
|
||||||
further info.
|
|
||||||
|
|
||||||
The MySQL web site (http://www.mysql.com/) provides the latest
|
The MySQL web site (http://www.mysql.com/) provides the latest
|
||||||
news and information about the MySQL software. Also please see the
|
news and information about the MySQL software. Also please see the
|
||||||
@ -96,12 +108,9 @@ is intended for mission-critical, heavy-load production systems as well
|
|||||||
as for embedding into mass-deployed software. MySQL is a trademark of
|
as for embedding into mass-deployed software. MySQL is a trademark of
|
||||||
MySQL AB.
|
MySQL AB.
|
||||||
|
|
||||||
The MySQL software has Dual Licensing, which means you can use the MySQL
|
Copyright (C) 2000-2007 MySQL AB
|
||||||
software free of charge under the GNU General Public License
|
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
|
||||||
(http://www.gnu.org/licenses/). You can also purchase commercial MySQL
|
and you are welcome to modify and redistribute it under the GPL license.
|
||||||
licenses from MySQL AB if you do not wish to be bound by the terms of
|
|
||||||
the GPL. See the chapter "Licensing and Support" in the manual for
|
|
||||||
further info.
|
|
||||||
|
|
||||||
The MySQL web site (http://www.mysql.com/) provides the latest
|
The MySQL web site (http://www.mysql.com/) provides the latest
|
||||||
news and information about the MySQL software. Also please see the
|
news and information about the MySQL software. Also please see the
|
||||||
@ -328,7 +337,7 @@ then
|
|||||||
cp -fp mysql-debug-%{mysql_version}/config.log "$MYSQL_DEBUGCONFLOG_DEST"
|
cp -fp mysql-debug-%{mysql_version}/config.log "$MYSQL_DEBUGCONFLOG_DEST"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
(cd mysql-debug-%{mysql_version}/mysql-test ; \
|
(cd mysql-debug-%{mysql_version}/mysql-test ; MTR_BUILD_THREAD=auto ; export MTR_BUILD_THREAD ; \
|
||||||
./mysql-test-run.pl --comment=debug --skip-rpl --skip-ndbcluster --force --report-features ; \
|
./mysql-test-run.pl --comment=debug --skip-rpl --skip-ndbcluster --force --report-features ; \
|
||||||
true)
|
true)
|
||||||
|
|
||||||
@ -360,6 +369,8 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
cd mysql-release-%{mysql_version}/mysql-test
|
cd mysql-release-%{mysql_version}/mysql-test
|
||||||
|
MTR_BUILD_THREAD=auto
|
||||||
|
export MTR_BUILD_THREAD
|
||||||
./mysql-test-run.pl --comment=normal --force --skip-ndbcluster --timer --report-features || true
|
./mysql-test-run.pl --comment=normal --force --skip-ndbcluster --timer --report-features || true
|
||||||
./mysql-test-run.pl --comment=ps --ps-protocol --force --skip-ndbcluster --timer || true
|
./mysql-test-run.pl --comment=ps --ps-protocol --force --skip-ndbcluster --timer || true
|
||||||
./mysql-test-run.pl --comment=normal+rowrepl --mysqld=--binlog-format=row --force --skip-ndbcluster --timer || true
|
./mysql-test-run.pl --comment=normal+rowrepl --mysqld=--binlog-format=row --force --skip-ndbcluster --timer || true
|
||||||
@ -722,17 +733,17 @@ fi
|
|||||||
in the server RPM.
|
in the server RPM.
|
||||||
- The "mysqlmanager" man page got moved from section 1 to 8.
|
- The "mysqlmanager" man page got moved from section 1 to 8.
|
||||||
|
|
||||||
|
* Thu Nov 30 2006 Joerg Bruehe <joerg@mysql.com>
|
||||||
|
|
||||||
|
- Call "make install" using "benchdir_root=%{_datadir}",
|
||||||
|
because that is affecting the regression test suite as well.
|
||||||
|
|
||||||
* Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com>
|
* Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com>
|
||||||
|
|
||||||
- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB)
|
- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB)
|
||||||
replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading
|
replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading
|
||||||
(bug#22081).
|
(bug#22081).
|
||||||
|
|
||||||
* Thu Nov 30 2006 Joerg Bruehe <joerg@mysql.com>
|
|
||||||
|
|
||||||
- Call "make install" using "benchdir_root=%{_datadir}",
|
|
||||||
because that is affecting the regression test suite as well.
|
|
||||||
|
|
||||||
* Mon Nov 13 2006 Joerg Bruehe <joerg@mysql.com>
|
* Mon Nov 13 2006 Joerg Bruehe <joerg@mysql.com>
|
||||||
|
|
||||||
- Add "--with-partition" to all server builds.
|
- Add "--with-partition" to all server builds.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user