Commit 2ec41637 authored by unknown's avatar unknown

Post-4.0.12 changes from Novell: mostly NetWare-related code changes to utilize new LibC


client/mysql.cc:
  Remove unnecessary pthread_yield calls for NetWare
client/mysqldump.c:
  Remove unnecessary pthread_yield calls for NetWare
include/my_pthread.h:
  Special extern my_pthread_cond_timedwait no longer required for NetWare
mysql-test/t/backup.test:
  replace_result added so test passes correctly on NetWare
mysys/default.c:
  Add conditional to avoid non-applicable file checking on NetWare
mysys/my_init.c:
  Remove working directory change from netware_init()
mysys/my_pthread.c:
  Remove unnecessary NetWare version of my_pthread_cond_timedwait
mysys/thr_mutex.c:
  Remove unnecessary NetWare block
scripts/make_binary_distribution.sh:
  Changes to clear up extraneous EXTRA_BIN_FILES, NetWare sections
parent 0f18ab78
...@@ -1597,9 +1597,6 @@ print_table_data(MYSQL_RES *result) ...@@ -1597,9 +1597,6 @@ print_table_data(MYSQL_RES *result)
MYSQL_ROW cur; MYSQL_ROW cur;
MYSQL_FIELD *field; MYSQL_FIELD *field;
bool *num_flag; bool *num_flag;
#ifdef __NETWARE__
uint lines= 0;
#endif
num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result)); num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
if (info_flag) if (info_flag)
...@@ -1655,10 +1652,6 @@ print_table_data(MYSQL_RES *result) ...@@ -1655,10 +1652,6 @@ print_table_data(MYSQL_RES *result)
length, str); length, str);
} }
(void) tee_fputs("\n", PAGER); (void) tee_fputs("\n", PAGER);
#ifdef __NETWARE__
// on a long result the screen could hog the cpu
if ((lines++ & 1023) == 0) pthread_yield();
#endif
} }
tee_puts(separator.c_ptr(), PAGER); tee_puts(separator.c_ptr(), PAGER);
my_afree((gptr) num_flag); my_afree((gptr) num_flag);
...@@ -1670,9 +1663,6 @@ print_table_data_html(MYSQL_RES *result) ...@@ -1670,9 +1663,6 @@ print_table_data_html(MYSQL_RES *result)
{ {
MYSQL_ROW cur; MYSQL_ROW cur;
MYSQL_FIELD *field; MYSQL_FIELD *field;
#ifdef __NETWARE__
uint lines= 0;
#endif
mysql_field_seek(result,0); mysql_field_seek(result,0);
(void) tee_fputs("<TABLE BORDER=1><TR>", PAGER); (void) tee_fputs("<TABLE BORDER=1><TR>", PAGER);
...@@ -1697,10 +1687,6 @@ print_table_data_html(MYSQL_RES *result) ...@@ -1697,10 +1687,6 @@ print_table_data_html(MYSQL_RES *result)
(void) tee_fputs("</TD>", PAGER); (void) tee_fputs("</TD>", PAGER);
} }
(void) tee_fputs("</TR>", PAGER); (void) tee_fputs("</TR>", PAGER);
#ifdef __NETWARE__
// on a long result the screen could hog the cpu
if ((lines++ & 1023) == 0) pthread_yield();
#endif
} }
(void) tee_fputs("</TABLE>", PAGER); (void) tee_fputs("</TABLE>", PAGER);
} }
...@@ -1711,9 +1697,6 @@ print_table_data_xml(MYSQL_RES *result) ...@@ -1711,9 +1697,6 @@ print_table_data_xml(MYSQL_RES *result)
{ {
MYSQL_ROW cur; MYSQL_ROW cur;
MYSQL_FIELD *fields; MYSQL_FIELD *fields;
#ifdef __NETWARE__
uint lines= 0;
#endif
mysql_field_seek(result,0); mysql_field_seek(result,0);
...@@ -1737,10 +1720,6 @@ print_table_data_xml(MYSQL_RES *result) ...@@ -1737,10 +1720,6 @@ print_table_data_xml(MYSQL_RES *result)
" &nbsp; ") : "NULL")); " &nbsp; ") : "NULL"));
} }
(void) tee_fputs(" </row>\n", PAGER); (void) tee_fputs(" </row>\n", PAGER);
#ifdef __NETWARE__
// on a long result the screen could hog the cpu
if ((lines++ & 1023) == 0) pthread_yield();
#endif
} }
(void) tee_fputs("</resultset>\n", PAGER); (void) tee_fputs("</resultset>\n", PAGER);
} }
...@@ -1773,10 +1752,6 @@ print_table_data_vertically(MYSQL_RES *result) ...@@ -1773,10 +1752,6 @@ print_table_data_vertically(MYSQL_RES *result)
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name); tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
tee_fprintf(PAGER, "%s\n",cur[off] ? (char*) cur[off] : "NULL"); tee_fprintf(PAGER, "%s\n",cur[off] ? (char*) cur[off] : "NULL");
} }
#ifdef __NETWARE__
// on a long result the screen could hog the cpu
if ((row_count & 1023) == 0) pthread_yield();
#endif
} }
} }
......
...@@ -897,9 +897,6 @@ static void dumpTable(uint numFields, char *table) ...@@ -897,9 +897,6 @@ static void dumpTable(uint numFields, char *table)
MYSQL_FIELD *field; MYSQL_FIELD *field;
MYSQL_ROW row; MYSQL_ROW row;
ulong rownr, row_break, total_length, init_length; ulong rownr, row_break, total_length, init_length;
#if defined(__NETWARE__) && defined(THREAD)
uint lines= 0;
#endif
if (verbose) if (verbose)
fprintf(stderr, "-- Sending SELECT query...\n"); fprintf(stderr, "-- Sending SELECT query...\n");
...@@ -1126,11 +1123,6 @@ static void dumpTable(uint numFields, char *table) ...@@ -1126,11 +1123,6 @@ static void dumpTable(uint numFields, char *table)
} }
else if (!opt_xml) else if (!opt_xml)
fputs(");\n", md_result_file); fputs(");\n", md_result_file);
#if defined(__NETWARE__) && defined(THREAD)
/* on a long result the screen could hog the cpu */
if ((lines++ & 1023) == 0)
pthread_yield();
#endif
} }
/* XML - close table tag and supress regular output */ /* XML - close table tag and supress regular output */
......
...@@ -356,14 +356,6 @@ extern int my_pthread_cond_timedwait(pthread_cond_t *cond, ...@@ -356,14 +356,6 @@ extern int my_pthread_cond_timedwait(pthread_cond_t *cond,
#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C)) #define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C))
#endif #endif
#ifdef __NETWARE__
extern int my_pthread_cond_timedwait(pthread_cond_t *cond,
pthread_mutex_t *mutex,
struct timespec *abstime);
#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C))
#endif /* __NETWARE__ */
#if defined(OS2) #if defined(OS2)
#define my_pthread_getspecific(T,A) ((T) &(A)) #define my_pthread_getspecific(T,A) ((T) &(A))
#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A)) #define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A))
......
...@@ -7,10 +7,10 @@ connect (con2,localhost,root,,); ...@@ -7,10 +7,10 @@ connect (con2,localhost,root,,);
connection con1; connection con1;
set SQL_LOG_BIN=0; set SQL_LOG_BIN=0;
create table t4(n int); create table t4(n int);
--replace_result "errno: 2" "errno: X" "errno: 22" "errno: X" "errno: 23" "errno: X" --replace_result "errno: 1" "errno: X" "errno: 2" "errno: X" "errno: 22" "errno: X" "errno: 23" "errno: X"
backup table t4 to '../bogus'; backup table t4 to '../bogus';
backup table t4 to '../tmp'; backup table t4 to '../tmp';
--replace_result "errno: 17" "errno: X" --replace_result "errno: 7" "errno: X" "errno: 17" "errno: X"
backup table t4 to '../tmp'; backup table t4 to '../tmp';
drop table t4; drop table t4;
restore table t4 from '../tmp'; restore table t4 from '../tmp';
......
...@@ -244,7 +244,7 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc, ...@@ -244,7 +244,7 @@ static my_bool search_default_file(DYNAMIC_ARRAY *args, MEM_ROOT *alloc,
strmov(name,config_file); strmov(name,config_file);
} }
fn_format(name,name,"","",4); fn_format(name,name,"","",4);
#if !defined(__WIN__) && !defined(OS2) #if !defined(__WIN__) && !defined(OS2) && !defined(__NETWARE__)
{ {
MY_STAT stat_info; MY_STAT stat_info;
if (!my_stat(name,&stat_info,MYF(0))) if (!my_stat(name,&stat_info,MYF(0)))
......
...@@ -388,16 +388,6 @@ static void netware_init() ...@@ -388,16 +388,6 @@ static void netware_init()
*name = tolower(*name); *name = tolower(*name);
} }
} }
/*
Set the current working directory to the base directory of the file
name (assuming the binary is in 'base-file-name/bin/'
*/
strmov(cwd, my_progname);
if ((name= strindex(cwd, "/bin/")) != NULL)
{
*name= 0;
chdir(cwd);
}
} }
} }
#endif /* __NETWARE__ */ #endif /* __NETWARE__ */
...@@ -426,19 +426,6 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr) ...@@ -426,19 +426,6 @@ int my_pthread_cond_init(pthread_cond_t *mp, const pthread_condattr_t *attr)
#endif #endif
#ifdef __NETWARE__
/* NetWare does not re-acquire the lock if the condition fails */
int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime)
{
int err= pthread_cond_timedwait(cond, mutex, abstime);
if (err)
pthread_mutex_lock(mutex);
return err;
}
#endif /* __NETWARE__ */
/***************************************************************************** /*****************************************************************************
Patches for HPUX Patches for HPUX
We need these because the pthread_mutex.. code returns -1 on error, We need these because the pthread_mutex.. code returns -1 on error,
......
...@@ -241,11 +241,6 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp, ...@@ -241,11 +241,6 @@ int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
fflush(stderr); fflush(stderr);
abort(); abort();
} }
#ifdef __NETWARE__
/* NetWare doesn't re-acquire the mutex on an error */
if (error && pthread_mutex_lock(&mp->mutex))
mp->count--;
#endif /* __NETWARE__ */
mp->thread=pthread_self(); mp->thread=pthread_self();
mp->file= (char*) file; mp->file= (char*) file;
mp->line=line; mp->line=line;
......
...@@ -47,33 +47,29 @@ if [ -d $BASE ] ; then ...@@ -47,33 +47,29 @@ if [ -d $BASE ] ; then
rm -r -f $BASE rm -r -f $BASE
fi fi
BS=""
EXTRA_BIN_FILES=""
BASE_SYSTEM="any" BASE_SYSTEM="any"
MYSQL_SHARE=$BASE/share/mysql MYSQL_SHARE=$BASE/share/mysql
BIN_FILES=""
case $system in case $system in
*netware*) *netware*)
BASE_SYSTEM="netware" BASE_SYSTEM="netware"
BS=".nlm"
MYSQL_SHARE=$BASE/share MYSQL_SHARE=$BASE/share
EXTRA_BIN_FILES="netware/mysqld_safe.nlm netware/mysql_install_db.nlm \
netware/init_db.sql netware/test_db.sql netware/mysql_explain_log.nlm \
netware/mysqlhotcopy.nlm netware/libmysql.nlm netware/init_secure_db.sql"
;; ;;
esac esac
mkdir $BASE $BASE/bin $BASE/data $BASE/data/mysql $BASE/data/test \ mkdir $BASE $BASE/bin \
$BASE/include $BASE/lib $BASE/support-files $BASE/share $BASE/scripts \ $BASE/include $BASE/lib $BASE/support-files $BASE/share $BASE/scripts \
$BASE/mysql-test $BASE/mysql-test/t $BASE/mysql-test/r \ $BASE/mysql-test $BASE/mysql-test/t $BASE/mysql-test/r \
$BASE/mysql-test/include $BASE/mysql-test/std_data $BASE/mysql-test/include $BASE/mysql-test/std_data
if [ $BASE_SYSTEM != "netware" ] ; then if [ $BASE_SYSTEM != "netware" ] ; then
mkdir $BASE/share/mysql $BASE/tests $BASE/sql-bench $BASE/man $BASE/man/man1 mkdir $BASE/share/mysql $BASE/tests $BASE/sql-bench $BASE/man \
fi $BASE/man/man1 $BASE/data $BASE/data/mysql $BASE/data/test
chmod o-rwx $BASE/data $BASE/data/* chmod o-rwx $BASE/data $BASE/data/*
fi
for i in ChangeLog COPYING COPYING.LIB README Docs/INSTALL-BINARY \ for i in ChangeLog COPYING COPYING.LIB README Docs/INSTALL-BINARY \
MySQLEULA.txt Docs/manual.html Docs/manual.txt Docs/manual_toc.html \ MySQLEULA.txt Docs/manual.html Docs/manual.txt Docs/manual_toc.html \
...@@ -85,23 +81,47 @@ do ...@@ -85,23 +81,47 @@ do
fi fi
done done
for i in extra/comp_err$BS extra/replace$BS extra/perror$BS \ if [ $BASE_SYSTEM = "netware" ] ; then
extra/resolveip$BS extra/my_print_defaults$BS \
extra/resolve_stack_dump$BS extra/mysql_waitpid$BS \ BIN_FILES="\
isam/isamchk$BS isam/pack_isam$BS \ extra/comp_err.nlm extra/replace.nlm extra/perror.nlm \
myisam/myisamchk$BS myisam/myisampack$BS myisam/myisamlog$BS \ extra/resolveip.nlm extra/my_print_defaults.nlm \
sql/mysqld$BS \ isam/isamchk.nlm isam/pack_isam.nlm \
client/mysql$BS client/mysqlshow$BS client/mysqladmin$BS \ myisam/myisamchk.nlm myisam/myisampack.nlm myisam/myisamlog.nlm \
client/mysqldump$BS client/mysqlimport$BS \ sql/mysqld.nlm \
client/mysqltest$BS client/mysqlcheck$BS \ client/mysql.nlm client/mysqlshow.nlm client/mysqladmin.nlm \
client/mysqlbinlog$BS client/mysqlmanagerc$BS \ client/mysqldump.nlm client/mysqlimport.nlm \
client/mysqlmanager-pwgen$BS tools/mysqlmanager$BS \ client/mysqltest.nlm client/mysqlcheck.nlm \
client/mysqlbinlog.nlm
netware/mysqld_safe.nlm netware/mysql_install_db.nlm \
netware/init_db.sql netware/test_db.sql netware/mysql_explain_log.nlm \
netware/mysqlhotcopy.nlm netware/libmysql.nlm netware/init_secure_db.sql \
";
else
BIN_FILES="\
extra/comp_err extra/replace extra/perror \
extra/resolveip extra/my_print_defaults \
extra/resolve_stack_dump extra/mysql_waitpid \
isam/isamchk isam/pack_isam \
myisam/myisamchk myisam/myisampack myisam/myisamlog \
sql/mysqld \
client/mysql client/mysqlshow client/mysqladmin \
client/mysqldump client/mysqlimport \
client/mysqltest client/mysqlcheck \
client/mysqlbinlog client/mysqlmanagerc \
client/mysqlmanager-pwgen tools/mysqlmanager \
client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin \ client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin \
client/.libs/mysqldump client/.libs/mysqlimport \ client/.libs/mysqldump client/.libs/mysqlimport \
client/.libs/mysqltest client/.libs/mysqlcheck \ client/.libs/mysqltest client/.libs/mysqlcheck \
client/.libs/mysqlbinlog client/.libs/mysqlmanagerc \ client/.libs/mysqlbinlog client/.libs/mysqlmanagerc \
client/.libs/mysqlmanager-pwgen tools/.libs/mysqlmanager \ client/.libs/mysqlmanager-pwgen tools/.libs/mysqlmanager \
$EXTRA_BIN_FILES ";
fi
for i in $BIN_FILES
do do
if [ -f $i ] if [ -f $i ]
then then
...@@ -126,7 +146,13 @@ if [ $BASE_SYSTEM = "netware" ] ; then ...@@ -126,7 +146,13 @@ if [ $BASE_SYSTEM = "netware" ] ; then
$CP -r netware/*.pl $BASE/scripts $CP -r netware/*.pl $BASE/scripts
fi fi
for i in libmysql/.libs/libmysqlclient.a libmysql/.libs/libmysqlclient.so* libmysql/libmysqlclient.* libmysql_r/.libs/libmysqlclient_r.a libmysql_r/.libs/libmysqlclient_r.so* libmysql_r/libmysqlclient_r.* mysys/libmysys.a strings/libmystrings.a dbug/libdbug.a libmysqld/.libs/libmysqld.a libmysqld/.libs/libmysqld.so* libmysqld/libmysqld.a netware/libmysql.imp for i in \
libmysql/.libs/libmysqlclient.a libmysql/.libs/libmysqlclient.so* \
libmysql/libmysqlclient.* libmysql_r/.libs/libmysqlclient_r.a \
libmysql_r/.libs/libmysqlclient_r.so* libmysql_r/libmysqlclient_r.* \
mysys/libmysys.a strings/libmystrings.a dbug/libdbug.a \
libmysqld/.libs/libmysqld.a libmysqld/.libs/libmysqld.so* \
libmysqld/libmysqld.a netware/libmysql.imp
do do
if [ -f $i ] if [ -f $i ]
then then
......
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