Commit d1467d7a authored by tomas@mc05.(none)'s avatar tomas@mc05.(none)

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into mc05.(none):/space2/tomas/mysql-4.1-ndb-test
parents 5240fb51 ccc41712
...@@ -110,7 +110,7 @@ BSC32=bscmake.exe ...@@ -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) ...@@ -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" { ...@@ -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); ...@@ -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( ...@@ -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( ...@@ -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: ...@@ -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 '' ...@@ -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 ...@@ -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; ...@@ -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(); ...@@ -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[]) ...@@ -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[]) ...@@ -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[]) ...@@ -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[]) ...@@ -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()
...@@ -633,13 +659,17 @@ void mysql_start(int argc, char *argv[]) ...@@ -633,13 +659,17 @@ 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
{ {
......
...@@ -302,10 +302,12 @@ do ...@@ -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[] = ...@@ -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,33 +52,38 @@ char NEAR _dig_vec_lower[] = ...@@ -52,33 +52,38 @@ 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';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment