Commit 2dd1e4f9 authored by jani@ua141d10.elisa.omakaista.fi's avatar jani@ua141d10.elisa.omakaista.fi

Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1-tmp

into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
parents fbd5140f cf173e55
...@@ -1021,7 +1021,7 @@ case $SYSTEM_TYPE in ...@@ -1021,7 +1021,7 @@ case $SYSTEM_TYPE in
*darwin5*) *darwin5*)
if test "$ac_cv_prog_gcc" = "yes" if test "$ac_cv_prog_gcc" = "yes"
then then
FLAGS="-traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH" FLAGS="-traditional-cpp -DHAVE_DARWIN5_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH"
CFLAGS="$CFLAGS $FLAGS" CFLAGS="$CFLAGS $FLAGS"
CXXFLAGS="$CXXFLAGS $FLAGS" CXXFLAGS="$CXXFLAGS $FLAGS"
MAX_C_OPTIMIZE="-O" MAX_C_OPTIMIZE="-O"
...@@ -1031,23 +1031,13 @@ case $SYSTEM_TYPE in ...@@ -1031,23 +1031,13 @@ case $SYSTEM_TYPE in
*darwin6*) *darwin6*)
if test "$ac_cv_prog_gcc" = "yes" if test "$ac_cv_prog_gcc" = "yes"
then then
FLAGS="-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH" FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH"
CFLAGS="$CFLAGS $FLAGS" CFLAGS="$CFLAGS $FLAGS"
CXXFLAGS="$CXXFLAGS $FLAGS" CXXFLAGS="$CXXFLAGS $FLAGS"
MAX_C_OPTIMIZE="-O" MAX_C_OPTIMIZE="-O"
fi fi
;; ;;
*darwin[[7-8]]*) *darwin*)
# don't forget to escape [] like above
if test "$ac_cv_prog_gcc" = "yes"
then
FLAGS="-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT"
CFLAGS="$CFLAGS $FLAGS"
CXXFLAGS="$CXXFLAGS $FLAGS"
MAX_C_OPTIMIZE="-O"
fi
;;
*darwin9*)
if test "$ac_cv_prog_gcc" = "yes" if test "$ac_cv_prog_gcc" = "yes"
then then
FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT" FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT"
......
...@@ -193,7 +193,7 @@ typedef uint rf_SetTimer; ...@@ -193,7 +193,7 @@ typedef uint rf_SetTimer;
/* Convert some simple functions to Posix */ /* Convert some simple functions to Posix */
#define sigset(A,B) signal((A),(B)) #define my_sigset(A,B) signal((A),(B))
#define finite(A) _finite(A) #define finite(A) _finite(A)
#define sleep(A) Sleep((A)*1000) #define sleep(A) Sleep((A)*1000)
#define popen(A) popen(A,B) _popen((A),(B)) #define popen(A) popen(A,B) _popen((A),(B))
......
...@@ -129,15 +129,6 @@ extern void bmove_align(gptr dst,const gptr src,uint len); ...@@ -129,15 +129,6 @@ extern void bmove_align(gptr dst,const gptr src,uint len);
#define bmove512(A,B,C) memcpy(A,B,C) #define bmove512(A,B,C) memcpy(A,B,C)
#endif #endif
#ifdef HAVE_purify
#define memcpy_overlap(A,B,C) \
DBUG_ASSERT((A) <= (B) || ((B)+(C)) <= (A)); \
bmove((byte*) (A),(byte*) (B),(size_t) (C));
#else
#define memcpy_overlap(A,B,C) memcpy((A), (B), (C))
#endif /* HAVE_purify */
/* Prototypes for string functions */ /* Prototypes for string functions */
#if !defined(bfill) && !defined(HAVE_BFILL) #if !defined(bfill) && !defined(HAVE_BFILL)
......
...@@ -292,8 +292,6 @@ extern int my_pthread_create_detached; ...@@ -292,8 +292,6 @@ extern int my_pthread_create_detached;
#undef HAVE_PTHREAD_RWLOCK_RDLOCK #undef HAVE_PTHREAD_RWLOCK_RDLOCK
#undef HAVE_SNPRINTF #undef HAVE_SNPRINTF
#define sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
#define signal(A,B) pthread_signal((A),(void (*)(int)) (B))
#define my_pthread_attr_setprio(A,B) #define my_pthread_attr_setprio(A,B)
#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */ #endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
...@@ -325,14 +323,26 @@ extern int my_pthread_cond_init(pthread_cond_t *mp, ...@@ -325,14 +323,26 @@ extern int my_pthread_cond_init(pthread_cond_t *mp,
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX) #if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */ int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
#endif #endif
#if !defined(HAVE_SIGSET) && !defined(HAVE_mit_thread) && !defined(sigset)
#define sigset(A,B) do { struct sigaction s; sigset_t set; \
sigemptyset(&set); \ /*
s.sa_handler = (B); \ We define my_sigset() and use that instead of the system sigset() so that
s.sa_mask = set; \ we can favor an implementation based on sigaction(). On some systems, such
s.sa_flags = 0; \ as Mac OS X, sigset() results in flags such as SA_RESTART being set, and
sigaction((A), &s, (struct sigaction *) NULL); \ we want to make sure that no such flags are set.
} while (0) */
#if defined(HAVE_SIGACTION) && !defined(my_sigset)
#define my_sigset(A,B) do { struct sigaction s; sigset_t set; \
sigemptyset(&set); \
s.sa_handler = (B); \
s.sa_mask = set; \
s.sa_flags = 0; \
sigaction((A), &s, (struct sigaction *) NULL); \
} while (0)
#elif defined(HAVE_SIGSET) && !defined(my_sigset)
#define my_sigset(A,B) sigset((A),(B))
#elif !defined(my_sigset)
#define my_sigset(A,B) signal((A),(B))
#endif #endif
#ifndef my_pthread_setprio #ifndef my_pthread_setprio
...@@ -412,16 +422,13 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res); ...@@ -412,16 +422,13 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res);
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); } #define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
#endif #endif
#ifdef HAVE_DARWIN_THREADS #ifdef HAVE_DARWIN5_THREADS
#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
#define pthread_kill(A,B) pthread_dummy(0) #define pthread_kill(A,B) pthread_dummy(0)
#define pthread_condattr_init(A) pthread_dummy(0) #define pthread_condattr_init(A) pthread_dummy(0)
#define pthread_condattr_destroy(A) pthread_dummy(0) #define pthread_condattr_destroy(A) pthread_dummy(0)
#define pthread_signal(A,B) pthread_dummy(0)
#undef pthread_detach_this_thread #undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); } #define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
#undef sigset
#define sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
#endif #endif
#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER) #if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER)
......
...@@ -986,7 +986,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, ...@@ -986,7 +986,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
} }
DBUG_PRINT("info",("key: %lx from: %lx length: %u", DBUG_PRINT("info",("key: %lx from: %lx length: %u",
(long) key, (long) from, length)); (long) key, (long) from, length));
memcpy_overlap((byte*) key, (byte*) from, (size_t) length); memmove((byte*) key, (byte*) from, (size_t) length);
key+=length; key+=length;
from+=length; from+=length;
} }
......
...@@ -170,3 +170,22 @@ SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE ...@@ -170,3 +170,22 @@ SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE
HEX(a) HEX(a)
A741ADCCA66EB6DC20A7DAADCCABDCA66E A741ADCCA66EB6DC20A7DAADCCABDCA66E
DROP TABLE t1; DROP TABLE t1;
set names big5;
create table t1 (a char character set big5);
insert into t1 values (0xF9D6),(0xF9D7),(0xF9D8),(0xF9D9);
insert into t1 values (0xF9DA),(0xF9DB),(0xF9DC);
select hex(a) a, hex(@u:=convert(a using utf8)) b,
hex(convert(@u using big5)) c from t1 order by a;
a b c
F9D6 E7A281 F9D6
F9D7 E98AB9 F9D7
F9D8 E8A38F F9D8
F9D9 E5A2BB F9D9
F9DA E68192 F9DA
F9DB E7B2A7 F9DB
F9DC E5ABBA F9DC
alter table t1 convert to character set utf8;
select hex(a) from t1 where a = _big5 0xF9DC;
hex(a)
E5ABBA
drop table t1;
...@@ -3078,3 +3078,13 @@ from a inner join (b right join c on b.id = c.b_id) on a.id = c.a_id; ...@@ -3078,3 +3078,13 @@ from a inner join (b right join c on b.id = c.b_id) on a.id = c.a_id;
count(*) count(*)
6 6
drop table a, b, c; drop table a, b, c;
create table t1 (f1 int not null auto_increment primary key, f2 varchar(10));
create table t11 like t1;
insert into t1 values(1,""),(2,"");
show table status like 't1%';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 9 Dynamic 2 20 X X X X X X X X latin1_swedish_ci NULL
t11 MyISAM 9 Dynamic 0 0 X X X X X X X X latin1_swedish_ci NULL
select 123 as a from t1 where f1 is null;
a
drop table t1,t11;
select 1;
1
1
select 2;
ERROR HY000: MySQL server has gone away
select 3;
3
3
...@@ -38,4 +38,19 @@ INSERT INTO t1 VALUES(0xA741ADCCA66EB6DC20A7DAADCCABDCA66E); ...@@ -38,4 +38,19 @@ INSERT INTO t1 VALUES(0xA741ADCCA66EB6DC20A7DAADCCABDCA66E);
SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE); SELECT HEX(a) FROM t1 WHERE MATCH(a) AGAINST (0xA741ADCCA66EB6DC IN BOOLEAN MODE);
DROP TABLE t1; DROP TABLE t1;
#
# Bug#12476 Some big5 codes are still missing.
#
set names big5;
create table t1 (a char character set big5);
insert into t1 values (0xF9D6),(0xF9D7),(0xF9D8),(0xF9D9);
insert into t1 values (0xF9DA),(0xF9DB),(0xF9DC);
# Check round trip
select hex(a) a, hex(@u:=convert(a using utf8)) b,
hex(convert(@u using big5)) c from t1 order by a;
# Check that there is no "illegal mix of collations" error with Unicode.
alter table t1 convert to character set utf8;
select hex(a) from t1 where a = _big5 0xF9DC;
drop table t1;
# End of 4.1 tests # End of 4.1 tests
...@@ -2206,6 +2206,16 @@ select * from t1,t2 where f1=f3 and (f1,f2) = (2,null); ...@@ -2206,6 +2206,16 @@ select * from t1,t2 where f1=f3 and (f1,f2) = (2,null);
select * from t1,t2 where f1=f3 and (f1,f2) <=> (2,null); select * from t1,t2 where f1=f3 and (f1,f2) <=> (2,null);
drop table t1,t2; drop table t1,t2;
#
# Bug #13535
#
create table t1 (f1 int not null auto_increment primary key, f2 varchar(10));
create table t11 like t1;
insert into t1 values(1,""),(2,"");
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
show table status like 't1%';
select 123 as a from t1 where f1 is null;
drop table t1,t11;
# End of 4.1 tests # End of 4.1 tests
# #
......
#
# Bug #8731: wait_timeout does not work on Mac OS X
#
--disable_reconnect
select 1;
# wait_timeout is 2, so we should get disconnected now
--sleep 5
--error 2006
select 2;
--enable_reconnect
select 3;
...@@ -404,23 +404,6 @@ int sigwait(sigset_t *setp, int *sigp) ...@@ -404,23 +404,6 @@ int sigwait(sigset_t *setp, int *sigp)
#endif /* DONT_USE_SIGSUSPEND */ #endif /* DONT_USE_SIGSUSPEND */
#endif /* HAVE_SIGWAIT */ #endif /* HAVE_SIGWAIT */
/*****************************************************************************
** Implement pthread_signal for systems that can't use signal() with threads
** Currently this is only used with BSDI 3.0
*****************************************************************************/
#ifdef USE_PTHREAD_SIGNAL
int pthread_signal(int sig, void (*func)())
{
struct sigaction sact;
sact.sa_flags= 0;
sact.sa_handler= func;
sigemptyset(&sact.sa_mask);
sigaction(sig, &sact, (struct sigaction*) 0);
return 0;
}
#endif
/**************************************************************************** /****************************************************************************
The following functions fixes that all pthread functions should work The following functions fixes that all pthread functions should work
......
...@@ -80,17 +80,7 @@ void init_thr_alarm(uint max_alarms) ...@@ -80,17 +80,7 @@ void init_thr_alarm(uint max_alarms)
pthread_mutex_init(&LOCK_alarm,MY_MUTEX_INIT_FAST); pthread_mutex_init(&LOCK_alarm,MY_MUTEX_INIT_FAST);
pthread_cond_init(&COND_alarm,NULL); pthread_cond_init(&COND_alarm,NULL);
#if THR_CLIENT_ALARM != SIGALRM || defined(USE_ALARM_THREAD) #if THR_CLIENT_ALARM != SIGALRM || defined(USE_ALARM_THREAD)
#if defined(HAVE_mit_thread) my_sigset(THR_CLIENT_ALARM,thread_alarm);
sigset(THR_CLIENT_ALARM,thread_alarm); /* int. thread system calls */
#else
{
struct sigaction sact;
sact.sa_flags = 0;
bzero((char*) &sact, sizeof(sact));
sact.sa_handler = thread_alarm;
sigaction(THR_CLIENT_ALARM, &sact, (struct sigaction*) 0);
}
#endif
#endif #endif
sigemptyset(&s); sigemptyset(&s);
sigaddset(&s, THR_SERVER_ALARM); sigaddset(&s, THR_SERVER_ALARM);
...@@ -110,12 +100,12 @@ void init_thr_alarm(uint max_alarms) ...@@ -110,12 +100,12 @@ void init_thr_alarm(uint max_alarms)
#elif defined(USE_ONE_SIGNAL_HAND) #elif defined(USE_ONE_SIGNAL_HAND)
pthread_sigmask(SIG_BLOCK, &s, NULL); /* used with sigwait() */ pthread_sigmask(SIG_BLOCK, &s, NULL); /* used with sigwait() */
#if THR_SERVER_ALARM == THR_CLIENT_ALARM #if THR_SERVER_ALARM == THR_CLIENT_ALARM
sigset(THR_CLIENT_ALARM,process_alarm); /* Linuxthreads */ my_sigset(THR_CLIENT_ALARM,process_alarm); /* Linuxthreads */
pthread_sigmask(SIG_UNBLOCK, &s, NULL); pthread_sigmask(SIG_UNBLOCK, &s, NULL);
#endif #endif
#else #else
my_sigset(THR_SERVER_ALARM, process_alarm);
pthread_sigmask(SIG_UNBLOCK, &s, NULL); pthread_sigmask(SIG_UNBLOCK, &s, NULL);
sigset(THR_SERVER_ALARM,process_alarm);
#endif #endif
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
...@@ -290,7 +280,7 @@ sig_handler process_alarm(int sig __attribute__((unused))) ...@@ -290,7 +280,7 @@ sig_handler process_alarm(int sig __attribute__((unused)))
printf("thread_alarm\n"); fflush(stdout); printf("thread_alarm\n"); fflush(stdout);
#endif #endif
#ifdef DONT_REMEMBER_SIGNAL #ifdef DONT_REMEMBER_SIGNAL
sigset(THR_CLIENT_ALARM,process_alarm); /* int. thread system calls */ my_sigset(THR_CLIENT_ALARM,process_alarm); /* int. thread system calls */
#endif #endif
return; return;
} }
...@@ -310,7 +300,7 @@ sig_handler process_alarm(int sig __attribute__((unused))) ...@@ -310,7 +300,7 @@ sig_handler process_alarm(int sig __attribute__((unused)))
process_alarm_part2(sig); process_alarm_part2(sig);
#ifndef USE_ALARM_THREAD #ifndef USE_ALARM_THREAD
#if defined(DONT_REMEMBER_SIGNAL) && !defined(USE_ONE_SIGNAL_HAND) #if defined(DONT_REMEMBER_SIGNAL) && !defined(USE_ONE_SIGNAL_HAND)
sigset(THR_SERVER_ALARM,process_alarm); my_sigset(THR_SERVER_ALARM,process_alarm);
#endif #endif
pthread_mutex_unlock(&LOCK_alarm); pthread_mutex_unlock(&LOCK_alarm);
pthread_sigmask(SIG_SETMASK,&old_mask,NULL); pthread_sigmask(SIG_SETMASK,&old_mask,NULL);
...@@ -512,7 +502,7 @@ static sig_handler thread_alarm(int sig) ...@@ -512,7 +502,7 @@ static sig_handler thread_alarm(int sig)
printf("thread_alarm\n"); fflush(stdout); printf("thread_alarm\n"); fflush(stdout);
#endif #endif
#ifdef DONT_REMEMBER_SIGNAL #ifdef DONT_REMEMBER_SIGNAL
sigset(sig,thread_alarm); /* int. thread system calls */ my_sigset(sig,thread_alarm); /* int. thread system calls */
#endif #endif
} }
#endif #endif
...@@ -916,7 +906,7 @@ static sig_handler print_signal_warning(int sig) ...@@ -916,7 +906,7 @@ static sig_handler print_signal_warning(int sig)
printf("Warning: Got signal %d from thread %s\n",sig,my_thread_name()); printf("Warning: Got signal %d from thread %s\n",sig,my_thread_name());
fflush(stdout); fflush(stdout);
#ifdef DONT_REMEMBER_SIGNAL #ifdef DONT_REMEMBER_SIGNAL
sigset(sig,print_signal_warning); /* int. thread system calls */ my_sigset(sig,print_signal_warning); /* int. thread system calls */
#endif #endif
#ifndef OS2 #ifndef OS2
if (sig == SIGALRM) if (sig == SIGALRM)
......
...@@ -19,9 +19,9 @@ export AR='mwldnlm' ...@@ -19,9 +19,9 @@ export AR='mwldnlm'
export AR_FLAGS='-type library -o' export AR_FLAGS='-type library -o'
export AS='mwasmnlm' export AS='mwasmnlm'
export CC='mwccnlm -gccincludes' export CC='mwccnlm -gccincludes'
export CFLAGS='-enum int -O3 -align 8 -proc 686 -relax_pointers -dialect c' export CFLAGS='-enum int -align 8 -proc 686 -relax_pointers -dialect c'
export CXX='mwccnlm -gccincludes' export CXX='mwccnlm -gccincludes'
export CXXFLAGS='-enum int -O3 -align 8 -proc 686 -relax_pointers -dialect c++ -bool on -wchar_t on -D_WCHAR_T' export CXXFLAGS='-enum int -align 8 -proc 686 -relax_pointers -dialect c++ -bool on -wchar_t on -D_WCHAR_T'
export LD='mwldnlm' export LD='mwldnlm'
export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -map -flags pseudopreemption' export LDFLAGS='-entry _LibCPrelude -exit _LibCPostlude -map -flags pseudopreemption'
export RANLIB=: export RANLIB=:
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
MODULE libc.nlm MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved." COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL ISAM Table Pack Tool" DESCRIPTION "MySQL ISAM Table Pack Tool"
SCREENNAME "MySQL ISAM Table Pack Tool"
VERSION 4, 0 VERSION 4, 0
XDCDATA ../netware/mysql.xdc XDCDATA ../netware/mysql.xdc
#DEBUG #DEBUG
......
...@@ -271,6 +271,10 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh \ ...@@ -271,6 +271,10 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh \
if [ $BASE_SYSTEM = "netware" ] ; then if [ $BASE_SYSTEM = "netware" ] ; then
echo "CREATE DATABASE mysql;" > $BASE/bin/init_db.sql echo "CREATE DATABASE mysql;" > $BASE/bin/init_db.sql
echo "CREATE DATABASE test;" >> $BASE/bin/init_db.sql echo "CREATE DATABASE test;" >> $BASE/bin/init_db.sql
sh ./scripts/mysql_create_system_tables.sh real "" "%" 0 \
>> $BASE/bin/init_db.sql
sh ./scripts/mysql_create_system_tables.sh test "" "%" 0 \
> $BASE/bin/test_db.sql
sh ./scripts/mysql_create_system_tables.sh real >> $BASE/bin/init_db.sql sh ./scripts/mysql_create_system_tables.sh real >> $BASE/bin/init_db.sql
sh ./scripts/mysql_create_system_tables.sh test > $BASE/bin/test_db.sql sh ./scripts/mysql_create_system_tables.sh test > $BASE/bin/test_db.sql
fi fi
......
...@@ -928,7 +928,7 @@ static void __cdecl kill_server(int sig_ptr) ...@@ -928,7 +928,7 @@ static void __cdecl kill_server(int sig_ptr)
RETURN_FROM_KILL_SERVER; RETURN_FROM_KILL_SERVER;
kill_in_progress=TRUE; kill_in_progress=TRUE;
abort_loop=1; // This should be set abort_loop=1; // This should be set
signal(sig,SIG_IGN); my_sigset(sig,SIG_IGN);
if (sig == MYSQL_KILL_SIGNAL || sig == 0) if (sig == MYSQL_KILL_SIGNAL || sig == 0)
sql_print_information(ER(ER_NORMAL_SHUTDOWN),my_progname); sql_print_information(ER(ER_NORMAL_SHUTDOWN),my_progname);
else else
...@@ -977,11 +977,6 @@ pthread_handler_t kill_server_thread(void *arg __attribute__((unused))) ...@@ -977,11 +977,6 @@ pthread_handler_t kill_server_thread(void *arg __attribute__((unused)))
} }
#endif #endif
#if defined(__amiga__)
#undef sigset
#define sigset signal
#endif
extern "C" sig_handler print_signal_warning(int sig) extern "C" sig_handler print_signal_warning(int sig)
{ {
if (!DBUG_IN_USE) if (!DBUG_IN_USE)
...@@ -991,7 +986,7 @@ extern "C" sig_handler print_signal_warning(int sig) ...@@ -991,7 +986,7 @@ extern "C" sig_handler print_signal_warning(int sig)
sig,my_thread_id()); sig,my_thread_id());
} }
#ifdef DONT_REMEMBER_SIGNAL #ifdef DONT_REMEMBER_SIGNAL
sigset(sig,print_signal_warning); /* int. thread system calls */ my_sigset(sig,print_signal_warning); /* int. thread system calls */
#endif #endif
#if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__) #if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__)
if (sig == SIGALRM) if (sig == SIGALRM)
...@@ -2074,8 +2069,8 @@ static void init_signals(void) ...@@ -2074,8 +2069,8 @@ static void init_signals(void)
DBUG_ENTER("init_signals"); DBUG_ENTER("init_signals");
if (test_flags & TEST_SIGINT) if (test_flags & TEST_SIGINT)
sigset(THR_KILL_SIGNAL,end_thread_signal); my_sigset(THR_KILL_SIGNAL,end_thread_signal);
sigset(THR_SERVER_ALARM,print_signal_warning); // Should never be called! my_sigset(THR_SERVER_ALARM,print_signal_warning); // Should never be called!
if (!(test_flags & TEST_NO_STACKTRACE) || (test_flags & TEST_CORE_ON_SIGNAL)) if (!(test_flags & TEST_NO_STACKTRACE) || (test_flags & TEST_CORE_ON_SIGNAL))
{ {
...@@ -2109,13 +2104,8 @@ static void init_signals(void) ...@@ -2109,13 +2104,8 @@ static void init_signals(void)
} }
#endif #endif
(void) sigemptyset(&set); (void) sigemptyset(&set);
#ifdef THREAD_SPECIFIC_SIGPIPE my_sigset(SIGPIPE,SIG_IGN);
sigset(SIGPIPE,abort_thread);
sigaddset(&set,SIGPIPE); sigaddset(&set,SIGPIPE);
#else
(void) signal(SIGPIPE,SIG_IGN); // Can't know which thread
sigaddset(&set,SIGPIPE);
#endif
sigaddset(&set,SIGINT); sigaddset(&set,SIGINT);
#ifndef IGNORE_SIGHUP_SIGQUIT #ifndef IGNORE_SIGHUP_SIGQUIT
sigaddset(&set,SIGQUIT); sigaddset(&set,SIGQUIT);
......
...@@ -1711,7 +1711,7 @@ static uint16 tab_big5_uni0[]={ ...@@ -1711,7 +1711,7 @@ static uint16 tab_big5_uni0[]={
0x2467,0x2468,0x2469,0x2474,0x2475,0x2476,0x2477,0x2478, 0x2467,0x2468,0x2469,0x2474,0x2475,0x2476,0x2477,0x2478,
0x2479,0x247A,0x247B,0x247C,0x247D}; 0x2479,0x247A,0x247B,0x247C,0x247D};
/* page 1 0xC940-0xF9D5 */ /* page 1 0xC940-0xF9DC */
static uint16 tab_big5_uni1[]={ static uint16 tab_big5_uni1[]={
0x4E42,0x4E5C,0x51F5,0x531A,0x5382,0x4E07,0x4E0C,0x4E47, 0x4E42,0x4E5C,0x51F5,0x531A,0x5382,0x4E07,0x4E0C,0x4E47,
0x4E8D,0x56D7,0xFA0C,0x5C6E,0x5F73,0x4E0F,0x5187,0x4E0E, 0x4E8D,0x56D7,0xFA0C,0x5C6E,0x5F73,0x4E0F,0x5187,0x4E0E,
...@@ -3267,12 +3267,13 @@ static uint16 tab_big5_uni1[]={ ...@@ -3267,12 +3267,13 @@ static uint16 tab_big5_uni1[]={
0x9E17,0x9F48,0x6207,0x6B1E,0x7227,0x864C,0x8EA8,0x9482, 0x9E17,0x9F48,0x6207,0x6B1E,0x7227,0x864C,0x8EA8,0x9482,
0x9480,0x9481,0x9A69,0x9A68,0x9B2E,0x9E19,0x7229,0x864B, 0x9480,0x9481,0x9A69,0x9A68,0x9B2E,0x9E19,0x7229,0x864B,
0x8B9F,0x9483,0x9C79,0x9EB7,0x7675,0x9A6B,0x9C7A,0x9E1D, 0x8B9F,0x9483,0x9C79,0x9EB7,0x7675,0x9A6B,0x9C7A,0x9E1D,
0x7069,0x706A,0x9EA4,0x9F7E,0x9F49,0x9F98}; 0x7069,0x706A,0x9EA4,0x9F7E,0x9F49,0x9F98,0x7881,0x92B9,
0x88CF,0x58BB,0x6052,0x7CA7,0x5AFA};
static int func_big5_uni_onechar(int code){ static int func_big5_uni_onechar(int code){
if ((code>=0xA140)&&(code<=0xC7FC)) if ((code>=0xA140)&&(code<=0xC7FC))
return(tab_big5_uni0[code-0xA140]); return(tab_big5_uni0[code-0xA140]);
if ((code>=0xC940)&&(code<=0xF9D5)) if ((code>=0xC940)&&(code<=0xF9DC))
return(tab_big5_uni1[code-0xC940]); return(tab_big5_uni1[code-0xC940]);
return(0); return(0);
} }
...@@ -3901,7 +3902,7 @@ static uint16 tab_uni_big57[]={ ...@@ -3901,7 +3902,7 @@ static uint16 tab_uni_big57[]={
0xE54D,0xE552, 0,0xE54E, 0,0xE551,0xBC5C, 0, 0xE54D,0xE552, 0,0xE54E, 0,0xE551,0xBC5C, 0,
0xBEA5,0xBC5B, 0,0xE54A,0xE550, 0,0xBC5A,0xE54F, 0xBEA5,0xBC5B, 0,0xE54A,0xE550, 0,0xBC5A,0xE54F,
0,0xE54C, 0,0xBC58, 0, 0, 0, 0, 0,0xE54C, 0,0xBC58, 0, 0, 0, 0,
0, 0,0xE94D, 0,0xE94F,0xE94A,0xBEC1,0xE94C, 0, 0,0xE94D,0xF9D9,0xE94F,0xE94A,0xBEC1,0xE94C,
0,0xBEC0,0xE94E, 0, 0,0xBEC3,0xE950,0xBEC2, 0,0xBEC0,0xE94E, 0, 0,0xBEC3,0xE950,0xBEC2,
0xE949,0xE94B, 0, 0, 0, 0,0xC0A5,0xECCC, 0xE949,0xE94B, 0, 0, 0, 0,0xC0A5,0xECCC,
0,0xC0A4,0xECCD,0xC0A3,0xECCB,0xC0A2,0xECCA, 0, 0,0xC0A4,0xECCD,0xC0A3,0xECCB,0xC0A2,0xECCA, 0,
...@@ -3973,7 +3974,7 @@ static uint16 tab_uni_big57[]={ ...@@ -3973,7 +3974,7 @@ static uint16 tab_uni_big57[]={
0xE175,0xB9DE,0xE174,0xB9E4, 0,0xE16D,0xB9DF, 0, 0xE175,0xB9DE,0xE174,0xB9E4, 0,0xE16D,0xB9DF, 0,
0xE17B,0xB9E0,0xE16F,0xE172,0xE177,0xE171,0xE16C, 0, 0xE17B,0xB9E0,0xE16F,0xE172,0xE177,0xE171,0xE16C, 0,
0, 0, 0,0xE173,0xE555,0xBC61,0xE558,0xE557, 0, 0, 0,0xE173,0xE555,0xBC61,0xE558,0xE557,
0xE55A,0xE55C, 0,0xBC5F, 0,0xE556, 0,0xE554, 0xE55A,0xE55C,0xF9DC,0xBC5F, 0,0xE556, 0,0xE554,
0,0xE55D,0xE55B,0xE559, 0,0xE55F, 0,0xE55E, 0,0xE55D,0xE55B,0xE559, 0,0xE55F, 0,0xE55E,
0xBC63,0xBC5E, 0,0xBC60,0xBC62, 0, 0,0xE560, 0xBC63,0xBC5E, 0,0xBC60,0xBC62, 0, 0,0xE560,
0xE957, 0, 0,0xE956,0xE955, 0,0xE958,0xE951, 0xE957, 0, 0,0xE956,0xE955, 0,0xE958,0xE951,
...@@ -4144,7 +4145,7 @@ static uint16 tab_uni_big57[]={ ...@@ -4144,7 +4145,7 @@ static uint16 tab_uni_big57[]={
0,0xCEC0, 0, 0, 0, 0, 0, 0, 0,0xCEC0, 0, 0, 0, 0, 0, 0,
0xCECA,0xD1A1,0xCECB,0xABEE,0xCECE,0xCEC4,0xABED,0xCEC6, 0xCECA,0xD1A1,0xCECB,0xABEE,0xCECE,0xCEC4,0xABED,0xCEC6,
0,0xCEC7, 0, 0,0xCEC9,0xABE9, 0, 0, 0,0xCEC7, 0, 0,0xCEC9,0xABE9, 0, 0,
0xAEA3, 0, 0,0xCEC5,0xCEC1,0xAEA4, 0, 0, 0xAEA3, 0,0xF9DA,0xCEC5,0xCEC1,0xAEA4, 0, 0,
0xCECF,0xAE7E,0xD17D,0xCEC8, 0,0xD17C,0xCEC3,0xCECC, 0xCECF,0xAE7E,0xD17D,0xCEC8, 0,0xD17C,0xCEC3,0xCECC,
0, 0,0xABEC,0xAEA1,0xABF2,0xAEA2,0xCED0,0xD17E, 0, 0,0xABEC,0xAEA1,0xABF2,0xAEA2,0xCED0,0xD17E,
0xABEB,0xAEA6,0xABF1,0xABF0,0xABEF,0xAEA5,0xCED1,0xAEA7, 0xABEB,0xAEA6,0xABF1,0xABF0,0xABEF,0xAEA5,0xCED1,0xAEA7,
...@@ -4918,7 +4919,7 @@ static uint16 tab_uni_big57[]={ ...@@ -4918,7 +4919,7 @@ static uint16 tab_uni_big57[]={
0xDACF,0xDACE,0xDACB,0xB2B8,0xB577,0xDAC9,0xDACC,0xB578, 0xDACF,0xDACE,0xDACB,0xB2B8,0xB577,0xDAC9,0xDACC,0xB578,
0xDACD,0xDACA, 0, 0, 0, 0, 0, 0, 0xDACD,0xDACA, 0, 0, 0, 0, 0, 0,
0,0xDEEE, 0,0xDEF2,0xB84E, 0,0xE2F0,0xB851, 0,0xDEEE, 0,0xDEF2,0xB84E, 0,0xE2F0,0xB851,
0xDEF0, 0, 0,0xDEED,0xDEE8,0xDEEA,0xDEEB,0xDEE4, 0xDEF0,0xF9D6, 0,0xDEED,0xDEE8,0xDEEA,0xDEEB,0xDEE4,
0,0xB84D, 0, 0,0xB84C, 0,0xB848,0xDEE7, 0,0xB84D, 0, 0,0xB84C, 0,0xB848,0xDEE7,
0,0xB84F, 0,0xB850,0xDEE6,0xDEE9,0xDEF1,0xB84A, 0,0xB84F, 0,0xB850,0xDEE6,0xDEE9,0xDEF1,0xB84A,
0xB84B,0xDEEF,0xDEE5, 0, 0, 0,0xE2F2,0xBAD0, 0xB84B,0xDEEF,0xDEE5, 0, 0, 0,0xE2F2,0xBAD0,
...@@ -5050,7 +5051,7 @@ static uint16 tab_uni_big57[]={ ...@@ -5050,7 +5051,7 @@ static uint16 tab_uni_big57[]={
0xD34D,0xAFBB,0xD34B, 0,0xD34C,0xD34E, 0, 0, 0xD34D,0xAFBB,0xD34B, 0,0xD34C,0xD34E, 0, 0,
0,0xD34A,0xB2C9, 0,0xD6DE,0xB2CB,0xD6E0,0xB2CA, 0,0xD34A,0xB2C9, 0,0xD6DE,0xB2CB,0xD6E0,0xB2CA,
0xD6DF, 0, 0, 0, 0, 0,0xDAE8,0xB5AF, 0xD6DF, 0, 0, 0, 0, 0,0xDAE8,0xB5AF,
0,0xDAEA,0xDAE7,0xD6E1, 0,0xB5B0, 0, 0, 0,0xDAEA,0xDAE7,0xD6E1, 0,0xB5B0, 0,0xF9DB,
0xDAE9, 0, 0, 0, 0, 0, 0,0xDF56, 0xDAE9, 0, 0, 0, 0, 0, 0,0xDF56,
0,0xB864,0xDF54,0xB865,0xDF55,0xB866, 0, 0, 0,0xB864,0xDF54,0xB865,0xDF55,0xB866, 0, 0,
0,0xBAE9,0xE361,0xE35E,0xE360,0xBAEA,0xBAEB,0xE35F, 0,0xBAE9,0xE361,0xE35E,0xE360,0xBAEA,0xBAEB,0xE35F,
...@@ -5439,7 +5440,7 @@ static uint16 tab_uni_big57[]={ ...@@ -5439,7 +5440,7 @@ static uint16 tab_uni_big57[]={
0,0xB5F6,0xDBCD, 0, 0, 0,0xDBC9,0xDBCB, 0,0xB5F6,0xDBCD, 0, 0, 0,0xDBC9,0xDBCB,
0xDBC6,0xDBC5,0xDBC3, 0,0xDBCA,0xDBCC,0xDBC8, 0, 0xDBC6,0xDBC5,0xDBC3, 0,0xDBCA,0xDBCC,0xDBC8, 0,
0xDBC7,0xB5F4,0xB5F5, 0, 0, 0, 0, 0, 0xDBC7,0xB5F4,0xB5F5, 0, 0, 0, 0, 0,
0,0xDBCF,0xB8CD,0xDFF2,0xDFF8,0xDFF3,0xDFF4, 0, 0,0xDBCF,0xB8CD,0xDFF2,0xDFF8,0xDFF3,0xDFF4,0xF9D8,
0xDFF9, 0,0xB8CF, 0,0xB8C7,0xB8CE,0xDFF1,0xDBC4, 0xDFF9, 0,0xB8CF, 0,0xB8C7,0xB8CE,0xDFF1,0xDBC4,
0xB8CA,0xB8C8,0xDFF7,0xDFF6,0xB8C9,0xB8CB,0xDFF5,0xB8C6, 0xB8CA,0xB8C8,0xDFF7,0xDFF6,0xB8C9,0xB8CB,0xDFF5,0xB8C6,
0,0xB8CC, 0, 0, 0, 0, 0,0xE3F6, 0,0xB8CC, 0, 0, 0, 0, 0,0xE3F6,
...@@ -5757,7 +5758,7 @@ static uint16 tab_uni_big57[]={ ...@@ -5757,7 +5758,7 @@ static uint16 tab_uni_big57[]={
0xE47B,0xE4AF,0xE4AC,0xE4A7,0xE477,0xE476,0xE4A1,0xE4B4, 0xE47B,0xE4AF,0xE4AC,0xE4A7,0xE477,0xE476,0xE4A1,0xE4B4,
0xBBCF,0xE4B7,0xE47D,0xE4A3,0xBE52, 0, 0, 0, 0xBBCF,0xE4B7,0xE47D,0xE4A3,0xBE52, 0, 0, 0,
0, 0,0xBE5A,0xBE55,0xE8A4,0xE8A1,0xE867,0xBE50, 0, 0,0xBE5A,0xBE55,0xE8A4,0xE8A1,0xE867,0xBE50,
0, 0, 0,0xBE4F,0xBE56, 0, 0, 0, 0,0xF9D7, 0,0xBE4F,0xBE56, 0, 0, 0,
0xE865,0xBE54,0xE871,0xE863,0xE864,0xBE4E,0xE8A3,0xBE58, 0xE865,0xBE54,0xE871,0xE863,0xE864,0xBE4E,0xE8A3,0xBE58,
0xE874,0xE879,0xE873,0xEBEE,0xE86F,0xE877,0xE875,0xE868, 0xE874,0xE879,0xE873,0xEBEE,0xE86F,0xE877,0xE875,0xE868,
0xE862,0xE87D,0xBE57,0xE87E, 0,0xE878, 0,0xE86D, 0xE862,0xE87D,0xBE57,0xE87E, 0,0xE878, 0,0xE86D,
......
...@@ -498,7 +498,7 @@ static uint thai2sortable(uchar *tstr, uint len) ...@@ -498,7 +498,7 @@ static uint thai2sortable(uchar *tstr, uint len)
l2bias use to control position weight of l2char l2bias use to control position weight of l2char
example (*=l2char) XX*X must come before X*XX example (*=l2char) XX*X must come before X*XX
*/ */
memcpy_overlap((char*) p, (char*) (p+1), tlen-1); memmove((char*) p, (char*) (p+1), tlen-1);
tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1; tstr[len-1]= l2bias + t_ctype0[1]- L2_GARAN +1;
p--; p--;
continue; continue;
......
...@@ -19,7 +19,10 @@ ...@@ -19,7 +19,10 @@
#include <m_string.h> #include <m_string.h>
#undef ULONGLONG_MAX #undef ULONGLONG_MAX
/* Needed under MetroWerks Compiler, since MetroWerks compiler does not properly handle a constant expression containing a mod operator */ /*
Needed under MetroWerks Compiler, since MetroWerks compiler does not
properly handle a constant expression containing a mod operator
*/
#if defined(__NETWARE__) && defined(__MWERKS__) #if defined(__NETWARE__) && defined(__MWERKS__)
static ulonglong ulonglong_max= ~(ulonglong) 0; static ulonglong ulonglong_max= ~(ulonglong) 0;
#define ULONGLONG_MAX ulonglong_max #define ULONGLONG_MAX ulonglong_max
......
...@@ -81,7 +81,7 @@ static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a) ...@@ -81,7 +81,7 @@ static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a)
a->beg=p->cur; a->beg=p->cur;
a->end=p->cur; a->end=p->cur;
if (!bcmp(p->cur,"<!--",4)) if ((p->end - p->cur > 3) && !bcmp(p->cur,"<!--",4))
{ {
for( ; (p->cur < p->end) && bcmp(p->cur, "-->", 3); p->cur++) for( ; (p->cur < p->end) && bcmp(p->cur, "-->", 3); p->cur++)
{} {}
......
...@@ -149,10 +149,18 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags) ...@@ -149,10 +149,18 @@ Vio *vio_new(my_socket sd, enum enum_vio_type type, uint flags)
vio->sd); vio->sd);
#if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2) #if !defined(__WIN__) && !defined(__EMX__) && !defined(OS2)
#if !defined(NO_FCNTL_NONBLOCK) #if !defined(NO_FCNTL_NONBLOCK)
#if defined(__FreeBSD__) /*
fcntl(sd, F_SETFL, vio->fcntl_mode); /* Yahoo! FreeBSD patch */ We call fcntl() to set the flags and then immediately read them back
#endif to make sure that we and the system are in agreement on the state of
vio->fcntl_mode = fcntl(sd, F_GETFL); things.
An example of why we need to do this is FreeBSD (and apparently some
other BSD-derived systems, like Mac OS X), where the system sometimes
reports that the socket is set for non-blocking when it really will
block.
*/
fcntl(sd, F_SETFL, vio->fcntl_mode);
vio->fcntl_mode= fcntl(sd, F_GETFL);
#elif defined(HAVE_SYS_IOCTL_H) /* hpux */ #elif defined(HAVE_SYS_IOCTL_H) /* hpux */
/* Non blocking sockets doesn't work good on HPUX 11.0 */ /* Non blocking sockets doesn't work good on HPUX 11.0 */
(void) ioctl(sd,FIOSNBIO,0); (void) ioctl(sd,FIOSNBIO,0);
......
...@@ -138,7 +138,14 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode, ...@@ -138,7 +138,14 @@ int vio_blocking(Vio * vio __attribute__((unused)), my_bool set_blocking_mode,
else else
vio->fcntl_mode |= O_NONBLOCK; /* set bit */ vio->fcntl_mode |= O_NONBLOCK; /* set bit */
if (old_fcntl != vio->fcntl_mode) if (old_fcntl != vio->fcntl_mode)
r = fcntl(vio->sd, F_SETFL, vio->fcntl_mode); {
r= fcntl(vio->sd, F_SETFL, vio->fcntl_mode);
if (r == -1)
{
DBUG_PRINT("info", ("fcntl failed, errno %d", errno));
vio->fcntl_mode= old_fcntl;
}
}
} }
#else #else
r= set_blocking_mode ? 0 : 1; r= set_blocking_mode ? 0 : 1;
......
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