Commit 2c9879ca authored by unknown's avatar unknown

merged from 3.23 to pull the LOAD DATA INFILE fix as rpl000001 was failing.

Let's hope this did not break anything. Will not push this one until Monty
gets back


BitKeeper/etc/logging_ok:
  auto-union
Build-tools/Do-all-build-steps:
  Auto merged
Build-tools/Do-compile:
  Auto merged
Build-tools/Do-rpm:
  Auto merged
Docs/manual.texi:
  Auto merged
include/hash.h:
  Auto merged
include/my_sys.h:
  Auto merged
innobase/dict/dict0dict.c:
  Auto merged
mysys/array.c:
  Auto merged
mysys/hash.c:
  Auto merged
mysys/mf_qsort.c:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/table.cc:
  Auto merged
strings/Makefile.am:
  Auto merged
client/mysql.cc:
  merged from 3.23
configure.in:
  merged from 3.23
mysql-test/mysql-test-run.sh:
  merged from 3.23
sql/mysqld.cc:
  merged from 3.23
support-files/mysql.spec.sh:
  merged from 3.23
parents 80d375b1 1dd4cf02
......@@ -76,7 +76,7 @@ gmake -j 2
time gmake -j 2 distcheck \
EXTRA_CONF_ARGS="--with-unix-socket-path=/var/tmp/mysql.sock --with-low-memory $EXTRA_CONFIG"
sh $BD/Build-tools/Do-rpm
sh $BD/Build-tools/Do-rpm $*
rm -f $TMP_SCRIPT
END
......
......@@ -7,7 +7,7 @@ $opt_tmp=$opt_version_suffix="";
$opt_help=$opt_Information=$opt_delete=$opt_debug=$opt_stage=$opt_rsh_mail=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_no_mysqltest=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=0;
$opt_innodb=$opt_bdb=0;
GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","use-old-distribution","enable-shared","no-crash-me","no-strip","version-suffix=s") || usage();
GetOptions("Information","help","distribution=s","user=s","result=s","delete","no-test","no-mysqltest","perl-files=s","debug","config-options=s","config-env=s","stage=i","rsh-mail","with-low-memory","fast-benchmark","tmp=s","static-client","static-server","static-perl","no-perl","local-perl","perl-options=s","sur","with-small-disk","dbd-options=s","tcpip","suffix=s","build-thread=i","innodb","bdb","use-old-distribution","enable-shared","no-crash-me","no-strip","version-suffix=s", "with-other-libc=s) || usage();
usage() if ($opt_help || $opt_Information);
usage() if (!$opt_distribution);
......@@ -147,6 +147,10 @@ if ($opt_stage <= 1)
{
$opt_config_options.=" --with-client-ldflags=-all-static";
}
if ($opt_with_other_libc)
{
$opt_with_other_libc = "--with-other-libc=$opt_with_other_libc";
}
if (!$opt_enable_shared)
{
$opt_config_options.= " --disable-shared"; # Default for binary versions
......
#! /bin/sh
set -e -x
OTHER_LIBC_DIR=/usr/local/mysql-glibc
BUILD/compile-pentium-max --with-other-libc=$OTHER_LIBC_DIR \
--with-comment="Official MySQL Binary" \
--prefix=/usr/local/mysql --with-extra-charset=complex \
--enable-thread-safe-client --enable-local-infile \
--with-server-suffix=-max
scripts/make_binary_distribution
make dist
Build-tools/Do-rpm --local
BUILD/compile-pentium --with-other-libc=$OTHER_LIBC_DIR \
--with-comment="Official MySQL Binary" \
--prefix=/usr/local/mysql --with-extra-charset=complex \
--enable-thread-safe-client --enable-local-infile
scripts/make_binary_distribution
......@@ -40,7 +40,21 @@ owner=my
# Hard path!!
bpath=`/bin/pwd`
rpmdir="/usr/src/redhat"
for d in /usr/src/redhat /usr/src/packages ; do
if test -d "$d"
then
rpmdir=$d
fi
done
if test -z "$rpmdir"
then
echo "Could not find suitable rpmdir on this system"
exit 1
fi
logdir="$bpath/Logs"
###### Perl STUFF #####
......
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet ../glibc-2.2.5/linuxthreads/internals.h ./linuxthreads/internals.h
--- ../glibc-2.2.5/linuxthreads/internals.h Thu Nov 29 00:44:16 2001
+++ ./linuxthreads/internals.h Fri Feb 22 21:18:09 2002
@@ -343,7 +343,7 @@
THREAD_SELF implementation is used, this must be a power of two and
a multiple of PAGE_SIZE. */
#ifndef STACK_SIZE
-#define STACK_SIZE (2 * 1024 * 1024)
+#define STACK_SIZE (128 * 1024)
#endif
/* The initial size of the thread stack. Must be a multiple of PAGE_SIZE. */
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet ../glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h ./linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h
--- ../glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h Thu Jun 8 13:49:49 2000
+++ ./linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h Fri Feb 22 21:18:09 2002
@@ -64,7 +64,7 @@
/* The number of threads per process. */
#define _POSIX_THREAD_THREADS_MAX 64
/* This is the value this implementation supports. */
-#define PTHREAD_THREADS_MAX 1024
+#define PTHREAD_THREADS_MAX 4096
/* Maximum amount by which a process can descrease its asynchronous I/O
priority level. */
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet ../glibc-2.2.5/nss/nsswitch.c ./nss/nsswitch.c
--- ../glibc-2.2.5/nss/nsswitch.c Tue Jul 17 02:21:36 2001
+++ ./nss/nsswitch.c Fri Feb 22 21:18:09 2002
@@ -515,8 +515,16 @@
+ (line - name + 1));
if (new_service == NULL)
return result;
-
+#ifdef DO_STATIC_NSS
+ if (strncmp(name,"files",5) == 0 ||
+ strncmp(name,"dns",3) == 0)
+#endif
*((char *) __mempcpy (new_service->name, name, line - name)) = '\0';
+#ifdef DO_STATIC_NSS
+ else
+ *((char *) __mempcpy (new_service->name, "files", 5)) = '\0';
+#endif
+
/* Set default actions. */
new_service->actions[2 + NSS_STATUS_TRYAGAIN] = NSS_ACTION_CONTINUE;
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet ../glibc-2.2.5/time/Makefile ./time/Makefile
--- ../glibc-2.2.5/time/Makefile Fri Feb 22 21:27:19 2002
+++ ./time/Makefile Fri Feb 22 21:26:47 2002
@@ -37,8 +37,8 @@
include ../Rules
-tz-cflags = -DTZDIR='"$(zonedir)"' \
- -DTZDEFAULT='"$(localtime-file)"' \
+tz-cflags = -DTZDIR='"/usr/share/zoneinfo/"' \
+ -DTZDEFAULT='"/etc/localtime"' \
-DTZDEFRULES='"$(posixrules-file)"'
CFLAGS-tzfile.c = $(tz-cflags)
diff -Nur --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet ../glibc-2.2.5/timezone/Makefile ./timezone/Makefile
--- ../glibc-2.2.5/timezone/Makefile Wed Aug 29 16:45:25 2001
+++ ./timezone/Makefile Fri Feb 22 21:18:09 2002
@@ -159,8 +159,8 @@
$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
-tz-cflags = -DTZDIR='"$(zonedir)"' \
- -DTZDEFAULT='"$(localtime-file)"' \
+tz-cflags = -DTZDIR='"/usr/share/zoneinfo/"' \
+ -DTZDEFAULT='"/etc/localtime"' \
-DTZDEFRULES='"$(posixrules-file)"' \
-DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone
Notes on compiling glibc for the standard MySQL binary:
- make sure you have gcc 2.95 and gmake 3.79 or newer
- wget ftp://ftp.gnu.org/pub/gnu/glibc/glibc-2.2.5.tar.gz
- wget ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-2.2.5.tar.gz
- tar zxvf glibc-2.2.5.tar.gz ; cd glibc-2.2.5 ;
tar zxvf ../glibc-linuxthreads-2.2.5.tar.gz
- patch -p1 < ~/bk/mysql/Docs/glibc-2.2.5.patch
- ./configure --prefix=/usr/local/mysql-glibc --enable-static-nss \
--disable-shared --enable-add-ons=linuxthreads --target=i386 \
--host=i386-pc-linux-gnu
- make
- possible problems - if compiler is not properly installed, one can get
"cpp: too many input" files error - easiest way to solve - SUSE RPM for gcc
2.95
- surun make install
- To build the binaries, run Build-tools/Do-linux-build
......@@ -48950,6 +48950,7 @@ users use this code as the rest of the code and because of this we are
not yet 100% confident in this code.
@menu
* News-3.23.50:: Changes in release 3.23.50
* News-3.23.49:: Changes in release 3.23.49
* News-3.23.48:: Changes in release 3.23.48
* News-3.23.47:: Changes in release 3.23.47
......@@ -49003,7 +49004,14 @@ not yet 100% confident in this code.
* News-3.23.0:: Changes in release 3.23.0
@end menu
@node News-3.23.49, News-3.23.48, News-3.23.x, News-3.23.x
@node News-3.23.50, News-3.23.49, News-3.23.x, News-3.23.x
@appendixsubsec Changes in release 3.23.50
@itemize @bullet
@item
Memory leak (16 bytes per every @strong{corrupted} table) closed.
@end itemize
@node News-3.23.49, News-3.23.48, News-3.23.50, News-3.23.x
@appendixsubsec Changes in release 3.23.49
@itemize @bullet
@item
......@@ -439,8 +439,27 @@ AC_ARG_WITH(other-libc,
#There seems to be a feature in gcc that treats system and libc headers
#leniently when they violatate ANSI C++ standard, but it is strict otherwise
#since gcc cannot now recognize that our headers are libc, we work around
#by telling it to be permissive
LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
#by telling it to be permissive
static_nss=
if test -f "$other_libc_lib/libnss_files.a"
then
# libc has been compiled with --enable-static-nss
# we need special flags, but we will have to add those later
STATIC_NSS_FLAGS="-Wl,--start-group -lc -lnss_files -lnss_dns -lresolv \
-Wl,--end-group"
static_nss=1
else
# this is a dirty hack. We if we detect static nss glibc in the special
# location, we do not re-direct the linker to get libraries from there
# during check. The reason is that if we did, we would have to find a
# way to append the special static nss flags to LIBS every time we do
# any check - this is definitely feasible, but not worthwhile the risk
# of breaking other things. So for our purposes it would be sufficient
# to assume that whoever is using static NSS knows what he is doing and
# has sensible libraries in the regular location
LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
fi
with_mysqld_ldflags="-all-static"
with_client_ldflags="-all-static"
NOINST_LDFLAGS="-all-static"
......@@ -2114,11 +2133,17 @@ then
linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
AC_DEFINE(THREAD_SAFE_CLIENT)
fi
if test "$static_nss" = "1"
then
CLIENT_LIBS="$CLIENT_LIBS $STATIC_NSS_FLAGS"
fi
AC_SUBST(CLIENT_LIBS)
AC_SUBST(sql_client_dirs)
AC_SUBST(linked_client_targets)
if test "$with_server" = "yes"
if test "$with_server" = "yes" -o "$THREAD_SAFE_CLIENT" != "no"
then
AC_DEFINE(THREAD)
# Avoid _PROGRAMS names
......@@ -2254,6 +2279,17 @@ EOF
LIBS="$MT_LD_ADD $LIBS"
fi
fi
#IMPORTANT - do not modify LIBS past this line - this hack is the only way
# I know to add the static NSS magic if we have static NSS libraries with
# glibc - Sasha
if test "$static_nss" = "1"
then
LDFLAGS="$LDFLAGS -static -L$other_libc_lib "
LIBS="$LIBS $STATIC_NSS_FLAGS"
fi
AC_SUBST(sql_server_dirs)
AC_SUBST(thread_dirs)
AC_SUBST(server_scripts)
......
......@@ -43,9 +43,10 @@ typedef struct st_hash {
uint (*calc_hashnr)(const byte *key,uint length);
} HASH;
my_bool hash_init(HASH *hash,uint default_array_elements, uint key_offset,
#define hash_init(A,B,C,D,E,F,G) _hash_init(A,B,C,D,E,F,G CALLER_INFO)
my_bool _hash_init(HASH *hash,uint default_array_elements, uint key_offset,
uint key_length, hash_get_key get_key,
void (*free_element)(void*), uint flags);
void (*free_element)(void*), uint flags CALLER_INFO_PROTO);
void hash_free(HASH *tree);
byte *hash_element(HASH *hash,uint idx);
gptr hash_search(HASH *info,const byte *key,uint length);
......
......@@ -127,6 +127,7 @@ extern int NEAR my_errno; /* Last error in mysys */
#ifdef SAFEMALLOC
#define my_malloc(SZ,FLAG) _mymalloc( SZ, __FILE__, __LINE__, FLAG )
#define my_malloc_ci(SZ,FLAG) _mymalloc( SZ, sFile, uLine, FLAG )
#define my_realloc(PTR,SZ,FLAG) _myrealloc( PTR, SZ, __FILE__, __LINE__, FLAG )
#define my_checkmalloc() _sanity( __FILE__, __LINE__ )
#define my_free(PTR,FLAG) _myfree( PTR, __FILE__, __LINE__,FLAG)
......@@ -136,6 +137,9 @@ extern int NEAR my_errno; /* Last error in mysys */
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
extern ulonglong safemalloc_mem_limit;
#define CALLER_INFO_PROTO , const char *sFile, uint uLine
#define CALLER_INFO , __FILE__, __LINE__
#define ORIG_CALLER_INFO , sFile, uLine
#else
#define my_checkmalloc() (0)
#undef TERMINATE
......@@ -143,11 +147,15 @@ extern ulonglong safemalloc_mem_limit;
#define QUICK_SAFEMALLOC
#define NORMAL_SAFEMALLOC
extern gptr my_malloc(uint Size,myf MyFlags);
#define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG )
extern gptr my_realloc(gptr oldpoint,uint Size,myf MyFlags);
extern void my_no_flags_free(gptr ptr);
extern gptr my_memdup(const byte *from,uint length,myf MyFlags);
extern my_string my_strdup(const char *from,myf MyFlags);
#define my_free(PTR,FG) my_no_flags_free(PTR)
#define CALLER_INFO_PROTO /* nothing */
#define CALLER_INFO /* nothing */
#define ORIG_CALLER_INFO /* nothing */
#endif
#ifdef HAVE_ALLOCA
#define my_alloca(SZ) alloca((size_t) (SZ))
......@@ -661,8 +669,10 @@ extern my_bool real_open_cached_file(IO_CACHE *cache);
extern void close_cached_file(IO_CACHE *cache);
File create_temp_file(char *to, const char *dir, const char *pfx,
int mode, myf MyFlags);
extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
uint init_alloc,uint alloc_increment);
#define init_dynamic_array(A,B,C,D) _init_dynamic_array(A,B,C,D CALLER_INFO)
#define init_dynamic_array_ci(A,B,C,D) _init_dynamic_array(A,B,C,D ORIG_CALLER_INFO)
extern my_bool _init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
uint init_alloc,uint alloc_increment CALLER_INFO_PROTO);
extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element);
extern byte *alloc_dynamic(DYNAMIC_ARRAY *array);
extern byte *pop_dynamic(DYNAMIC_ARRAY*);
......
......@@ -1987,7 +1987,7 @@ loop:
ptr = dict_accept(ptr, (char *) "FOREIGN", &success);
if (!isspace(*ptr)) {
return(DB_CANNOT_ADD_CONSTRAINT);
goto loop;
}
ptr = dict_accept(ptr, (char *) "KEY", &success);
......
......@@ -161,11 +161,8 @@ MASTER_RUNNING=0
MASTER_MYPORT=9306
SLAVE_RUNNING=0
SLAVE_MYPORT=9307
MYSQL_MANAGER_PORT=9305 # needs to be out of the way of slaves
MYSQL_MANAGER_PW_FILE=$MYSQL_TEST_DIR/var/tmp/manager.pwd
MYSQL_MANAGER_LOG=$MYSQL_TEST_DIR/var/log/manager.log
MYSQL_MANAGER_USER=root
NO_SLAVE=0
USER_TEST=
EXTRA_MASTER_OPT=""
EXTRA_MYSQL_TEST_OPT=""
......@@ -250,6 +247,9 @@ while test $# -gt 0; do
EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1"
SLEEP_TIME_AFTER_RESTART=`$ECHO "$1" | $SED -e "s;--sleep=;;"`
;;
--user-test=*)
USER_TEST=`$ECHO "$1" | $SED -e "s;--user-test=;;"`
;;
--mysqld=*)
TMP=`$ECHO "$1" | $SED -e "s;--mysqld=;;"`
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT $TMP"
......
......@@ -28,12 +28,12 @@
even if space allocation failed
*/
my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
uint init_alloc, uint alloc_increment)
my_bool _init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
uint init_alloc, uint alloc_increment CALLER_INFO_PROTO)
{
DBUG_ENTER("init_dynamic_array");
if (!alloc_increment)
{
{
alloc_increment=max((8192-MALLOC_OVERHEAD)/element_size,16);
if (init_alloc > 8 && alloc_increment > init_alloc * 2)
alloc_increment=init_alloc*2;
......@@ -45,7 +45,7 @@ my_bool init_dynamic_array(DYNAMIC_ARRAY *array, uint element_size,
array->max_element=init_alloc;
array->alloc_increment=alloc_increment;
array->size_of_element=element_size;
if (!(array->buffer=(char*) my_malloc(element_size*init_alloc,MYF(MY_WME))))
if (!(array->buffer=(char*) my_malloc_ci(element_size*init_alloc,MYF(MY_WME))))
{
array->max_element=0;
DBUG_RETURN(TRUE);
......
......@@ -36,15 +36,15 @@ static uint calc_hashnr_caseup(const byte *key,uint length);
static int hashcmp(HASH *hash,HASH_LINK *pos,const byte *key,uint length);
my_bool hash_init(HASH *hash,uint size,uint key_offset,uint key_length,
my_bool _hash_init(HASH *hash,uint size,uint key_offset,uint key_length,
hash_get_key get_key,
void (*free_element)(void*),uint flags)
void (*free_element)(void*),uint flags CALLER_INFO_PROTO)
{
DBUG_ENTER("hash_init");
DBUG_PRINT("enter",("hash: %lx size: %d",hash,size));
hash->records=0;
if (init_dynamic_array(&hash->array,sizeof(HASH_LINK),size,0))
if (init_dynamic_array_ci(&hash->array,sizeof(HASH_LINK),size,0))
{
hash->free=0; /* Allow call to hash_free */
DBUG_RETURN(TRUE);
......
......@@ -28,7 +28,7 @@ NTService::NTService()
//time-out variables
nStartTimeOut = 15000;
nStopTimeOut = 15000;
nStopTimeOut = 86400000;
nPauseTimeOut = 5000;
nResumeTimeOut = 5000;
......@@ -253,7 +253,7 @@ void NTService::ServiceMain(DWORD argc, LPTSTR *argv)
WaitForSingleObject (pService->hExitEvent, INFINITE);
// wait for thread to exit
if (WaitForSingleObject (pService->hThreadHandle, 1000) == WAIT_TIMEOUT)
if (WaitForSingleObject (pService->hThreadHandle, INFINITE) == WAIT_TIMEOUT)
CloseHandle(pService->hThreadHandle);
pService->Exit(0);
......
......@@ -273,6 +273,7 @@ void intern_close_table(TABLE *table)
free_io_cache(table);
if (table->file)
VOID(closefrm(table)); // close file
hash_free(&table->name_hash);
}
......
......@@ -603,7 +603,6 @@ int closefrm(register TABLE *table)
}
delete table->file;
table->file=0; /* For easyer errorchecking */
hash_free(&table->name_hash);
free_root(&table->mem_root,MYF(0));
DBUG_RETURN(error);
}
......
......@@ -51,7 +51,8 @@ EXTRA_DIST = ctype-big5.c ctype-czech.c ctype-euc_kr.c \
strmake.c strnmov.c strmov.c strnlen.c \
bmove_upp-sparc.s strappend-sparc.s strend-sparc.s \
strinstr-sparc.s strmake-sparc.s strmov-sparc.s \
strnmov-sparc.s strstr-sparc.s strxmov-sparc.s
strnmov-sparc.s strstr-sparc.s strxmov-sparc.s \
t_ctype.h
OMIT_DEPENDENCIES = pthread.h stdio.h __stdio.h stdlib.h __stdlib.h math.h\
__math.h time.h __time.h unistd.h __unistd.h types.h \
......
......@@ -74,6 +74,7 @@ Group: Applications/Databases
Summary(pt_BR): MySQL - Cliente
Group(pt_BR): Aplicaes/Banco_de_Dados
Obsoletes: mysql-client
Provides: mysql-client
%description client
This package contains the standard MySQL clients.
......@@ -90,6 +91,7 @@ Summary: MySQL - Benchmarks and test system
Group: Applications/Databases
Summary(pt_BR): MySQL - Medies de desempenho
Group(pt_BR): Aplicaes/Banco_de_Dados
Provides: mysql-bench
Obsoletes: mysql-bench
%description bench
......@@ -107,6 +109,7 @@ Summary: MySQL - Development header files and libraries
Group: Applications/Databases
Summary(pt_BR): MySQL - Medies de desempenho
Group(pt_BR): Aplicaes/Banco_de_Dados
Provides: mysql-devel
Obsoletes: mysql-devel
%description devel
......@@ -132,6 +135,7 @@ languages and applications need to dynamically load and use MySQL.
Release: %{release}
Summary: MySQL - server with Berkeley DB and Innodb support
Group: Applications/Databases
Provides: mysql-Max
Obsoletes: mysql-Max
%description Max
......@@ -202,6 +206,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
# Use the build root for temporary storage of the shared libraries.
OTHER_LIBC_DIR=/usr/local/mysql-glibc
RBR=$RPM_BUILD_ROOT
MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
if test -z "$RBR" -o "$RBR" = "/"
......@@ -212,16 +217,25 @@ fi
rm -rf $RBR
mkdir -p $RBR
# Build the shared libraries and mysqld-max
# We need to build shared libraries separate from mysqld-max because we
# are using --with-other-libc
BuildMySQL "--enable-shared --with-berkeley-db --with-innodb --with-mysqld-ldflags='-all-static' --with-server-suffix='-Max'"
BuildMySQL "--disable-shared --with-other-libc=$OTHER_LIBC_DIR --with-berkeley-db --with-innodb --with-mysqld-ldflags='-all-static' --with-server-suffix='-Max'"
# Save everything for debug
# tar cf $RBR/all.tar .
# Save shared libraries and mysqld-max
# Save mysqld-max
mv sql/mysqld sql/mysqld-max
nm --numeric-sort sql/mysqld-max > sql/mysqld-max.sym
# Save manual to avoid rebuilding
mv Docs/manual.ps Docs/manual.ps.save
make distclean
mv Docs/manual.ps.save Docs/manual.ps
#now build and save shared libraries
BuildMySQL "--enable-shared --enable-thread-safe-client --without-server "
(cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*)
(cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*)
......@@ -236,7 +250,8 @@ automake
BuildMySQL "--disable-shared" \
"--with-mysqld-ldflags='-all-static'" \
"--with-client-ldflags='-all-static'" \
"--without-berkeley-db --with-innodb"
"--with-other-libc=$OTHER_LIBC_DIR" \
"--without-berkeley-db --without-innodb"
nm --numeric-sort sql/mysqld > sql/mysqld.sym
%install -n mysql-%{mysql_version}
......@@ -319,7 +334,7 @@ chmod -R og-rw $mysql_datadir/mysql
# Restart in the same way that mysqld will be started normally.
/etc/rc.d/init.d/mysql start
# Allow mysqld_safe to start mysqld and print a message before we exit
# Allow safe_mysqld to start mysqld and print a message before we exit
sleep 2
%post Max
......@@ -416,7 +431,7 @@ fi
%files devel
%attr(755, root, root) /usr/bin/comp_err
%attr(755, root, root) /usr/include/mysql/
%attr(755, root, root) /usr/lib/mysql/
%attr(755, root, root) /usr/lib/mysql/*.a
%attr(755, root, root) /usr/bin/mysql_config
%files shared
......
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