1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

merge with 3.23.50

BitKeeper/etc/logging_ok:
  auto-union
BUILD/SETUP.sh:
  Auto merged
Build-tools/Do-compile:
  Auto merged
Build-tools/Do-rpm:
  Auto merged
configure.in:
  Auto merged
include/mysql_com.h:
  Auto merged
innobase/btr/btr0btr.c:
  Auto merged
innobase/btr/btr0cur.c:
  Auto merged
innobase/btr/btr0sea.c:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
innobase/dict/dict0load.c:
  Auto merged
innobase/fil/fil0fil.c:
  Auto merged
innobase/fsp/fsp0fsp.c:
  Auto merged
innobase/include/srv0srv.h:
  Auto merged
innobase/include/sync0rw.ic:
  Auto merged
innobase/log/log0log.c:
  Auto merged
innobase/rem/rem0cmp.c:
  Auto merged
innobase/row/row0ins.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
innobase/row/row0upd.c:
  Auto merged
innobase/srv/srv0srv.c:
  Auto merged
innobase/srv/srv0start.c:
  Auto merged
myisam/myisampack.c:
  Auto merged
mysql-test/t/range.test:
  Auto merged
scripts/mysqldumpslow.sh:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/lock.cc:
  Auto merged
sql/share/Makefile.am:
  Auto merged
sql/sql_rename.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
Docs/manual.texi:
  merge
client/mysql.cc:
  merge
client/mysqldump.c:
  merge
innobase/buf/buf0buf.c:
  merge
innobase/os/os0file.c:
  merge
innobase/row/row0mysql.c:
  merge
mysql-test/r/range.result:
  merge
sql/ha_innodb.cc:
  merge
sql/log_event.h:
  merge
sql/mysqld.cc:
  merge
sql/sql_base.cc:
  merge
sql/sql_load.cc:
  merge
This commit is contained in:
unknown
2002-03-27 01:56:10 +02:00
168 changed files with 25428 additions and 800 deletions

View File

@ -162,6 +162,7 @@ static SECURITY_DESCRIPTOR sdPipeDescriptor;
static HANDLE hPipe = INVALID_HANDLE_VALUE;
static pthread_cond_t COND_handler_count;
static uint handler_count;
static bool opt_enable_named_pipe = 0;
#endif
#ifdef __WIN__
static bool opt_console=0,start_mode=0;
@ -482,7 +483,7 @@ static void close_connections(void)
}
}
#ifdef __NT__
if ( hPipe != INVALID_HANDLE_VALUE )
if (hPipe != INVALID_HANDLE_VALUE && opt_enable_named_pipe)
{
HANDLE temp;
DBUG_PRINT( "quit", ("Closing named pipes") );
@ -983,7 +984,8 @@ static void server_init(void)
#ifdef __NT__
/* create named pipe */
if (Service.IsNT() && mysql_unix_port[0] && !opt_bootstrap)
if (Service.IsNT() && mysql_unix_port[0] && !opt_bootstrap &&
opt_enable_named_pipe)
{
sprintf( szPipeName, "\\\\.\\pipe\\%s", mysql_unix_port );
ZeroMemory( &saPipeSecurity, sizeof(saPipeSecurity) );
@ -1722,7 +1724,7 @@ int main(int argc, char **argv)
if (gethostname(glob_hostname,sizeof(glob_hostname)-4) < 0)
strmov(glob_hostname,"mysql");
strmov(pidfile_name,glob_hostname);
strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
strmov(strcend(pidfile_name,'.'),".pid"); // Add extension
#ifndef DBUG_OFF
strxmov(strend(server_version),MYSQL_SERVER_SUFFIX,"-debug",NullS);
@ -2043,9 +2045,11 @@ The server will not act as a slave.");
fflush(stdout);
#ifdef __NT__
if (hPipe == INVALID_HANDLE_VALUE && !have_tcpip)
if (hPipe == INVALID_HANDLE_VALUE &&
(!have_tcpip || opt_disable_networking)
{
sql_print_error("TCP/IP or Named Pipes should be installed on NT OS");
sql_print_error("TCP/IP or --enable-named-pipe should be configured on NT OS");
unireg_abort(1);
}
else
{
@ -2054,7 +2058,7 @@ The server will not act as a slave.");
{
pthread_t hThread;
handler_count=0;
if ( hPipe != INVALID_HANDLE_VALUE )
if (hPipe != INVALID_HANDLE_VALUE && opt_enable_named_pipe)
{
handler_count++;
if (pthread_create(&hThread,&connection_attrib,
@ -2571,9 +2575,9 @@ pthread_handler_decl(handle_connections_namedpipes,arg)
fConnected = ConnectNamedPipe( hPipe, NULL );
if (abort_loop)
break;
if ( !fConnected )
if (!fConnected)
fConnected = GetLastError() == ERROR_PIPE_CONNECTED;
if ( !fConnected )
if (!fConnected)
{
CloseHandle( hPipe );
if ((hPipe = CreateNamedPipe(szPipeName,
@ -2611,7 +2615,7 @@ pthread_handler_decl(handle_connections_namedpipes,arg)
continue; // We have to try again
}
if ( !(thd = new THD))
if (!(thd = new THD))
{
DisconnectNamedPipe( hConnectedPipe );
CloseHandle( hConnectedPipe );
@ -2695,6 +2699,7 @@ enum options {
OPT_SKIP_STACK_TRACE, OPT_SKIP_SYMLINKS,
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_REPORT_HOST,
OPT_REPORT_USER, OPT_REPORT_PASSWORD, OPT_REPORT_PORT,
OPT_SHOW_SLAVE_AUTH_INFO, OPT_OLD_RPL_COMPAT,
@ -2735,6 +2740,7 @@ static struct option long_options[] = {
{"delay-key-write-for-all-tables",
no_argument, 0, (int) OPT_DELAY_KEY_WRITE},
{"enable-locking", no_argument, 0, (int) OPT_ENABLE_LOCK},
{"enable-named-pipe", no_argument, 0, (int) OPT_HAVE_NAMED_PIPE},
{"enable-pstack", no_argument, 0, (int) OPT_DO_PSTACK},
{"exit-info", optional_argument, 0, 'T'},
{"flush", no_argument, 0, (int) OPT_FLUSH},
@ -3119,6 +3125,9 @@ struct show_var_st init_vars[]= {
{"myisam_max_sort_file_size",(char*) &myisam_max_sort_file_size, SHOW_LONG},
{"myisam_recover_options", (char*) &myisam_recover_options_str, SHOW_CHAR_PTR},
{"myisam_sort_buffer_size", (char*) &myisam_sort_buffer_size, SHOW_LONG},
#ifdef __NT__
{"named_pipe", (char*) &opt_enable_named_pipe, SHOW_BOOL},
#endif
{"net_buffer_length", (char*) &net_buffer_length, SHOW_LONG},
{"net_read_timeout", (char*) &net_read_timeout, SHOW_LONG},
{"net_retry_count", (char*) &mysqld_net_retry_count, SHOW_LONG},
@ -3453,10 +3462,12 @@ Starts the MySQL server\n");
-W, --warnings Log some not critical warnings to the log file\n");
#ifdef __WIN__
puts("NT and Win32 specific options:\n\
--console Don't remove the console window\n\
--install Install mysqld as a service (NT)\n\
--remove Remove mysqld from the service list (NT)\n\
--standalone Dummy option to start as a standalone program (NT)\
--console Don't remove the console window\n\
--install Install the default service (NT)\n\
--install-manual Install the default service started manually (NT)\n\
--remove Remove the default service from the service list (NT)\n\
--enable-named-pipe Enable the named pipe (NT)\n\
--standalone Dummy option to start as a standalone program (NT)\
");
#ifdef USE_SYMDIR
puts("--use-symbolic-links Enable symbolic link support");
@ -3543,9 +3554,10 @@ static void set_options(void)
opt_specialflag |= SPECIAL_NO_PRIOR;
#endif
(void) strmov( default_charset, MYSQL_CHARSET);
(void) strmov( language, LANGUAGE);
(void) strmov( mysql_real_data_home, get_relative_path(DATADIR));
(void) strmake(default_charset, MYSQL_CHARSET, sizeof(default_charset)-1);
(void) strmake(language, LANGUAGE, sizeof(language)-1);
(void) strmake(mysql_real_data_home, get_relative_path(DATADIR),
sizeof(mysql_real_data_home-1));
#ifdef __WIN__
/* Allow Win32 users to move MySQL anywhere */
{
@ -3556,9 +3568,9 @@ static void set_options(void)
}
#else
const char *tmpenv;
if ( !(tmpenv = getenv("MY_BASEDIR_VERSION")))
if (!(tmpenv = getenv("MY_BASEDIR_VERSION")))
tmpenv = DEFAULT_MYSQL_HOME;
(void) strmov( mysql_home, tmpenv );
(void) strmake(mysql_home, tmpenv, sizeof(mysql_home)-1);
#endif
#if defined( HAVE_mit_thread ) || defined( __WIN__ ) || defined( HAVE_LINUXTHREADS )
@ -3604,17 +3616,17 @@ static void get_options(int argc,char **argv)
default_tx_isolation= ISO_SERIALIZABLE;
break;
case 'b':
strmov(mysql_home,optarg);
strmake(mysql_home,optarg,sizeof(mysql_home)-1);
break;
case 'l':
opt_log=1;
opt_logname=optarg; // Use hostname.log if null
break;
case 'h':
strmov(mysql_real_data_home,optarg);
strmake(mysql_real_data_home,optarg, sizeof(mysql_real_data_home)-1);
break;
case 'L':
strmov(language,optarg);
strmake(language, optarg, sizeof(language)-1);
break;
case 'n':
opt_specialflag|= SPECIAL_NEW_FUNC;
@ -3972,11 +3984,16 @@ static void get_options(int argc,char **argv)
}
break;
case (int) OPT_PID_FILE:
strmov(pidfile_name,optarg);
strmake(pidfile_name, optarg, sizeof(pidfile_name)-1);
break;
case (int) OPT_INIT_FILE:
opt_init_file=optarg;
break;
case (int) OPT_HAVE_NAMED_PIPE:
#if __NT__
opt_enable_named_pipe=1;
#endif
break;
#ifdef __WIN__
case (int) OPT_STANDALONE: /* Dummy option for NT */
break;
@ -4022,10 +4039,10 @@ static void get_options(int argc,char **argv)
myisam_delay_key_write=0;
break;
case 'C':
strmov(default_charset,optarg);
strmake(default_charset, optarg, sizeof(default_charset)-1);
break;
case OPT_CHARSETS_DIR:
strmov(mysql_charsets_dir, optarg);
strmake(mysql_charsets_dir, optarg, sizeof(mysql_charsets_dir)-1);
charsets_dir = mysql_charsets_dir;
break;
#include "sslopt-case.h"
@ -4295,16 +4312,17 @@ static void fix_paths(void)
char buff[FN_REFLEN],*sharedir=get_relative_path(SHAREDIR);
if (test_if_hard_path(sharedir))
strmov(buff,sharedir); /* purecov: tested */
strmake(buff,sharedir,sizeof(buff)-1); /* purecov: tested */
else
strxmov(buff,mysql_home,sharedir,NullS);
strxnmov(buff,sizeof(buff)-1,mysql_home,sharedir,NullS);
convert_dirname(buff,buff,NullS);
(void) my_load_path(language,language,buff);
/* If --character-sets-dir isn't given, use shared library dir */
if (charsets_dir != mysql_charsets_dir)
{
strmov(strmov(mysql_charsets_dir,buff),CHARSET_DIR);
strxnmov(mysql_charsets_dir, sizeof(mysql_charsets_dir)-1, buff,
CHARSET_DIR, NullS);
charsets_dir=mysql_charsets_dir;
}