mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mc05.(none):/space2/tomas/mysql-4.1-ndb-test
This commit is contained in:
@@ -110,7 +110,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=xilink6.exe
|
LINK32=xilink6.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\dbug.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /debug /machine:I386
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /debug /machine:I386
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /map /machine:I386 /out:"../client_release/mysqld-nt.exe"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /map /machine:I386 /out:"../client_release/mysqld-nt.exe"
|
||||||
# SUBTRACT LINK32 /pdb:none /debug
|
# SUBTRACT LINK32 /pdb:none /debug
|
||||||
|
|
||||||
|
@@ -2661,6 +2661,9 @@ AC_SUBST(netware_dir)
|
|||||||
AC_SUBST(linked_netware_sources)
|
AC_SUBST(linked_netware_sources)
|
||||||
AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware")
|
AM_CONDITIONAL(HAVE_NETWARE, test "$netware_dir" = "netware")
|
||||||
|
|
||||||
|
# Ensure that table handlers gets all modifications to CFLAGS/CXXFLAGS
|
||||||
|
export CC CXX CFLAGS CXXFLAGS LD LDFLAGS AR
|
||||||
|
|
||||||
if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
|
if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
|
||||||
then
|
then
|
||||||
AC_DEFINE(THREAD)
|
AC_DEFINE(THREAD)
|
||||||
|
@@ -57,6 +57,10 @@ extern "C" {
|
|||||||
#undef HAVE_CRYPT
|
#undef HAVE_CRYPT
|
||||||
#endif /* HAVE_OPENSSL */
|
#endif /* HAVE_OPENSSL */
|
||||||
|
|
||||||
|
/* Configure can't detect this because it uses AC_TRY_RUN */
|
||||||
|
#undef HAVE_COMPRESS
|
||||||
|
#define HAVE_COMPRESS
|
||||||
|
|
||||||
/* include the old function apis */
|
/* include the old function apis */
|
||||||
#define USE_OLD_FUNCTIONS 1
|
#define USE_OLD_FUNCTIONS 1
|
||||||
|
|
||||||
|
@@ -225,7 +225,7 @@ extern long strtol(const char *str, char **ptr, int base);
|
|||||||
extern ulong strtoul(const char *str, char **ptr, int base);
|
extern ulong strtoul(const char *str, char **ptr, int base);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern char *int2str(long val, char *dst, int radix, char upcase);
|
extern char *int2str(long val, char *dst, int radix, int upcase);
|
||||||
extern char *int10_to_str(long val,char *dst,int radix);
|
extern char *int10_to_str(long val,char *dst,int radix);
|
||||||
extern char *str2int(const char *src,int radix,long lower,long upper,
|
extern char *str2int(const char *src,int radix,long lower,long upper,
|
||||||
long *val);
|
long *val);
|
||||||
|
@@ -1740,7 +1740,7 @@ os_file_pread(
|
|||||||
|
|
||||||
os_n_file_reads++;
|
os_n_file_reads++;
|
||||||
|
|
||||||
#ifdef HAVE_PREAD
|
#if defined(HAVE_PREAD) && !defined(HAVE_BROKEN_PREAD)
|
||||||
os_mutex_enter(os_file_count_mutex);
|
os_mutex_enter(os_file_count_mutex);
|
||||||
os_file_n_pending_preads++;
|
os_file_n_pending_preads++;
|
||||||
os_mutex_exit(os_file_count_mutex);
|
os_mutex_exit(os_file_count_mutex);
|
||||||
@@ -1815,7 +1815,7 @@ os_file_pwrite(
|
|||||||
|
|
||||||
os_n_file_writes++;
|
os_n_file_writes++;
|
||||||
|
|
||||||
#ifdef HAVE_PWRITE
|
#if defined(HAVE_PWRITE) && !defined(HAVE_BROKEN_PREAD)
|
||||||
os_mutex_enter(os_file_count_mutex);
|
os_mutex_enter(os_file_count_mutex);
|
||||||
os_file_n_pending_pwrites++;
|
os_file_n_pending_pwrites++;
|
||||||
os_mutex_exit(os_file_count_mutex);
|
os_mutex_exit(os_file_count_mutex);
|
||||||
|
@@ -421,7 +421,7 @@ err:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* returns 1 if str0 ~= /\<str1\>/ */
|
/* returns 1 if str0 ~= /\bstr1\b/ */
|
||||||
static int _ftb_strstr(const byte *s0, const byte *e0,
|
static int _ftb_strstr(const byte *s0, const byte *e0,
|
||||||
const byte *s1, const byte *e1,
|
const byte *s1, const byte *e1,
|
||||||
CHARSET_INFO *cs)
|
CHARSET_INFO *cs)
|
||||||
|
@@ -400,7 +400,7 @@ ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of ''
|
|||||||
set global myisam_max_sort_file_size=4294967296;
|
set global myisam_max_sort_file_size=4294967296;
|
||||||
show global variables like 'myisam_max_sort_file_size';
|
show global variables like 'myisam_max_sort_file_size';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
myisam_max_sort_file_size 4294967296
|
myisam_max_sort_file_size MAX_FILE_SIZE
|
||||||
set global myisam_max_sort_file_size=default;
|
set global myisam_max_sort_file_size=default;
|
||||||
select @@global.max_user_connections,@@local.max_join_size;
|
select @@global.max_user_connections,@@local.max_join_size;
|
||||||
@@global.max_user_connections @@session.max_join_size
|
@@global.max_user_connections @@session.max_join_size
|
||||||
|
@@ -69,7 +69,7 @@ select * from t1 where MATCH a,b AGAINST ('+(support collections) +foobar*' IN B
|
|||||||
select * from t1 where MATCH a,b AGAINST ('+(+(support collections)) +foobar*' IN BOOLEAN MODE);
|
select * from t1 where MATCH a,b AGAINST ('+(+(support collections)) +foobar*' IN BOOLEAN MODE);
|
||||||
select * from t1 where MATCH a,b AGAINST ('"xt indexes"' IN BOOLEAN MODE);
|
select * from t1 where MATCH a,b AGAINST ('"xt indexes"' IN BOOLEAN MODE);
|
||||||
|
|
||||||
# bug#2708 crash
|
# bug#2708, bug#3870 crash
|
||||||
|
|
||||||
select * from t1 where MATCH a,b AGAINST('"space model' IN BOOLEAN MODE);
|
select * from t1 where MATCH a,b AGAINST('"space model' IN BOOLEAN MODE);
|
||||||
|
|
||||||
|
@@ -291,6 +291,7 @@ set global ft_boolean_syntax = @@init_connect;
|
|||||||
# variables are set
|
# variables are set
|
||||||
|
|
||||||
set global myisam_max_sort_file_size=4294967296;
|
set global myisam_max_sort_file_size=4294967296;
|
||||||
|
--replace_result 4294967296 MAX_FILE_SIZE 2146435072 MAX_FILE_SIZE
|
||||||
show global variables like 'myisam_max_sort_file_size';
|
show global variables like 'myisam_max_sort_file_size';
|
||||||
set global myisam_max_sort_file_size=default;
|
set global myisam_max_sort_file_size=default;
|
||||||
|
|
||||||
|
@@ -67,6 +67,7 @@ void check_data_vol();
|
|||||||
void check_setup();
|
void check_setup();
|
||||||
void check_tables();
|
void check_tables();
|
||||||
void mysql_start(int, char*[]);
|
void mysql_start(int, char*[]);
|
||||||
|
void parse_setvar(char *arg);
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
||||||
@@ -321,7 +322,8 @@ void parse_args(int argc, char *argv[])
|
|||||||
OPT_ERR_LOG,
|
OPT_ERR_LOG,
|
||||||
OPT_SAFE_LOG,
|
OPT_SAFE_LOG,
|
||||||
OPT_MYSQLD,
|
OPT_MYSQLD,
|
||||||
OPT_HELP
|
OPT_HELP,
|
||||||
|
OPT_SETVAR
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct option options[] =
|
static struct option options[] =
|
||||||
@@ -337,6 +339,7 @@ void parse_args(int argc, char *argv[])
|
|||||||
{"safe-log", required_argument, 0, OPT_SAFE_LOG},
|
{"safe-log", required_argument, 0, OPT_SAFE_LOG},
|
||||||
{"mysqld", required_argument, 0, OPT_MYSQLD},
|
{"mysqld", required_argument, 0, OPT_MYSQLD},
|
||||||
{"help", no_argument, 0, OPT_HELP},
|
{"help", no_argument, 0, OPT_HELP},
|
||||||
|
{"set-variable", required_argument, 0, OPT_SETVAR},
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -385,6 +388,10 @@ void parse_args(int argc, char *argv[])
|
|||||||
strcpy(mysqld, optarg);
|
strcpy(mysqld, optarg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OPT_SETVAR:
|
||||||
|
parse_setvar(optarg);
|
||||||
|
break;
|
||||||
|
|
||||||
case OPT_HELP:
|
case OPT_HELP:
|
||||||
usage();
|
usage();
|
||||||
break;
|
break;
|
||||||
@@ -396,6 +403,25 @@ void parse_args(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
parse_setvar(char *arg)
|
||||||
|
Pasrsing for port just to display the port num on the mysqld_safe screen
|
||||||
|
*/
|
||||||
|
void parse_setvar(char *arg)
|
||||||
|
{
|
||||||
|
char *pos;
|
||||||
|
|
||||||
|
if ((pos= strindex(arg, "port")))
|
||||||
|
{
|
||||||
|
for (; *pos && *pos != '='; pos++) ;
|
||||||
|
if (*pos)
|
||||||
|
strcpy(port, pos + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/******************************************************************************
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
||||||
get_options()
|
get_options()
|
||||||
@@ -599,32 +625,32 @@ void check_tables()
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
void mysql_start(int argc, char *argv[])
|
void mysql_start(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
arg_list_t al;
|
arg_list_t al;
|
||||||
int i, j, err;
|
int i, j, err;
|
||||||
struct stat info;
|
struct stat info;
|
||||||
time_t cal;
|
time_t cal;
|
||||||
struct tm lt;
|
struct tm lt;
|
||||||
char stamp[PATH_MAX];
|
char stamp[PATH_MAX];
|
||||||
char skip;
|
char skip;
|
||||||
|
|
||||||
// private options
|
// private options
|
||||||
static char *private_options[] =
|
static char *private_options[] =
|
||||||
{
|
{
|
||||||
"--autoclose",
|
"--autoclose",
|
||||||
"--check-tables",
|
"--check-tables",
|
||||||
"--help",
|
"--help",
|
||||||
"--err-log=",
|
"--err-log=",
|
||||||
"--mysqld=",
|
"--mysqld=",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
// args
|
// args
|
||||||
init_args(&al);
|
init_args(&al);
|
||||||
add_arg(&al, "%s", mysqld);
|
add_arg(&al, "%s", mysqld);
|
||||||
|
|
||||||
// parent args
|
// parent args
|
||||||
for(i = 1; i < argc; i++)
|
for(i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
skip = FALSE;
|
skip = FALSE;
|
||||||
|
|
||||||
// skip private arguments
|
// skip private arguments
|
||||||
@@ -633,38 +659,42 @@ void mysql_start(int argc, char *argv[])
|
|||||||
if(!strnicmp(argv[i], private_options[j], strlen(private_options[j])))
|
if(!strnicmp(argv[i], private_options[j], strlen(private_options[j])))
|
||||||
{
|
{
|
||||||
skip = TRUE;
|
skip = TRUE;
|
||||||
|
consoleprintf("The argument skipped is %s\n",argv[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!skip) add_arg(&al, "%s", argv[i]);
|
if (!skip)
|
||||||
}
|
{
|
||||||
|
add_arg(&al, "%s", argv[i]);
|
||||||
|
consoleprintf("The final argument is %s\n",argv[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
// spawn
|
// spawn
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
// check the database tables
|
// check the database tables
|
||||||
if (checktables) check_tables();
|
if (checktables) check_tables();
|
||||||
|
|
||||||
// status
|
// status
|
||||||
time(&cal);
|
time(&cal);
|
||||||
localtime_r(&cal, <);
|
localtime_r(&cal, <);
|
||||||
strftime(stamp, PATH_MAX, "%d %b %Y %H:%M:%S", <);
|
strftime(stamp, PATH_MAX, "%d %b %Y %H:%M:%S", <);
|
||||||
log("mysql started : %s\n", stamp);
|
log("mysql started : %s\n", stamp);
|
||||||
|
|
||||||
// spawn mysqld
|
// spawn mysqld
|
||||||
spawn(mysqld, &al, TRUE, NULL, NULL, err_log);
|
spawn(mysqld, &al, TRUE, NULL, NULL, err_log);
|
||||||
}
|
}
|
||||||
while (!stat(pid_file, &info));
|
while (!stat(pid_file, &info));
|
||||||
|
|
||||||
// status
|
// status
|
||||||
time(&cal);
|
time(&cal);
|
||||||
localtime_r(&cal, <);
|
localtime_r(&cal, <);
|
||||||
strftime(stamp, PATH_MAX, "%d %b %Y %H:%M:%S", <);
|
strftime(stamp, PATH_MAX, "%d %b %Y %H:%M:%S", <);
|
||||||
log("mysql stopped : %s\n\n", stamp);
|
log("mysql stopped : %s\n\n", stamp);
|
||||||
|
|
||||||
// free args
|
// free args
|
||||||
free_args(&al);
|
free_args(&al);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
@@ -302,10 +302,12 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
#
|
#
|
||||||
# Fix some windows files
|
# Fix some windows files to avoid compiler warnings
|
||||||
#
|
#
|
||||||
|
|
||||||
./extra/replace std:: "" -- $BASE/sql/sql_yacc.cpp
|
./extra/replace std:: "" < $BASE/sql/sql_yacc.cpp | sed '/^ *switch (yytype)$/ { N; /\n *{$/ { N; /\n *default:$/ { N; /\n *break;$/ { N; /\n *}$/ d; };};};} ' > $BASE/sql/sql_yacc.cpp-new
|
||||||
|
mv $BASE/sql/sql_yacc.cpp-new $BASE/sql/sql_yacc.cpp
|
||||||
|
|
||||||
|
|
||||||
unix_to_dos $BASE/README
|
unix_to_dos $BASE/README
|
||||||
mv $BASE/README $BASE/README.txt
|
mv $BASE/README $BASE/README.txt
|
||||||
|
@@ -34,7 +34,7 @@ char NEAR _dig_vec_lower[] =
|
|||||||
val - value to convert
|
val - value to convert
|
||||||
dst - points to buffer where string representation should be stored
|
dst - points to buffer where string representation should be stored
|
||||||
radix - radix of scale of notation
|
radix - radix of scale of notation
|
||||||
upcase - flag indicating that whenever we should use upper-case digits
|
upcase - set to 1 if we should use upper-case digits
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
Converts the (long) integer value to its character form and moves it to
|
Converts the (long) integer value to its character form and moves it to
|
||||||
@@ -52,34 +52,39 @@ char NEAR _dig_vec_lower[] =
|
|||||||
|
|
||||||
char *
|
char *
|
||||||
int2str(register long int val, register char *dst, register int radix,
|
int2str(register long int val, register char *dst, register int radix,
|
||||||
char upcase)
|
int upcase)
|
||||||
{
|
{
|
||||||
char buffer[65];
|
char buffer[65];
|
||||||
register char *p;
|
register char *p;
|
||||||
long int new_val;
|
long int new_val;
|
||||||
char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
|
char *dig_vec= upcase ? _dig_vec_upper : _dig_vec_lower;
|
||||||
|
|
||||||
if (radix < 0) {
|
if (radix < 0)
|
||||||
if (radix < -36 || radix > -2) return NullS;
|
{
|
||||||
if (val < 0) {
|
if (radix < -36 || radix > -2)
|
||||||
|
return NullS;
|
||||||
|
if (val < 0)
|
||||||
|
{
|
||||||
*dst++ = '-';
|
*dst++ = '-';
|
||||||
val = -val;
|
val = -val;
|
||||||
}
|
}
|
||||||
radix = -radix;
|
radix = -radix;
|
||||||
} else {
|
|
||||||
if (radix > 36 || radix < 2) return NullS;
|
|
||||||
}
|
}
|
||||||
/* The slightly contorted code which follows is due to the
|
else if (radix > 36 || radix < 2)
|
||||||
fact that few machines directly support unsigned long / and %.
|
return NullS;
|
||||||
Certainly the VAX C compiler generates a subroutine call. In
|
|
||||||
the interests of efficiency (hollow laugh) I let this happen
|
/*
|
||||||
for the first digit only; after that "val" will be in range so
|
The slightly contorted code which follows is due to the fact that
|
||||||
that signed integer division will do. Sorry 'bout that.
|
few machines directly support unsigned long / and %. Certainly
|
||||||
CHECK THE CODE PRODUCED BY YOUR C COMPILER. The first % and /
|
the VAX C compiler generates a subroutine call. In the interests
|
||||||
should be unsigned, the second % and / signed, but C compilers
|
of efficiency (hollow laugh) I let this happen for the first digit
|
||||||
tend to be extraordinarily sensitive to minor details of style.
|
only; after that "val" will be in range so that signed integer
|
||||||
This works on a VAX, that's all I claim for it.
|
division will do. Sorry 'bout that. CHECK THE CODE PRODUCED BY
|
||||||
*/
|
YOUR C COMPILER. The first % and / should be unsigned, the second
|
||||||
|
% and / signed, but C compilers tend to be extraordinarily
|
||||||
|
sensitive to minor details of style. This works on a VAX, that's
|
||||||
|
all I claim for it.
|
||||||
|
*/
|
||||||
p = &buffer[sizeof(buffer)-1];
|
p = &buffer[sizeof(buffer)-1];
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
new_val=(ulong) val / (ulong) radix;
|
new_val=(ulong) val / (ulong) radix;
|
||||||
|
Reference in New Issue
Block a user