Commit 2d6fb900 authored by rburnett@bk-internal.mysql.com's avatar rburnett@bk-internal.mysql.com

Merge bk-internal.mysql.com:/data0/bk/mysql-5.1

into  bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
parents 3edd9cc9 34d82f0b
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# tree can then be picked up by "make dist" to create the "pristine source # tree can then be picked up by "make dist" to create the "pristine source
# package" that is used as the basis for all other binary builds. # package" that is used as the basis for all other binary builds.
# #
make distclean test -f Makefile && make distclean
(cd storage/bdb/dist && sh s_all) (cd storage/bdb/dist && sh s_all)
(cd storage/innobase && aclocal && autoheader && \ (cd storage/innobase && aclocal && autoheader && \
libtoolize --automake --force --copy && \ libtoolize --automake --force --copy && \
......
...@@ -256,6 +256,6 @@ typedef struct ...@@ -256,6 +256,6 @@ typedef struct
} LEX_STRING; } LEX_STRING;
#define STRING_WITH_LEN(X) (X), ((uint) (sizeof(X) - 1)) #define STRING_WITH_LEN(X) (X), ((uint) (sizeof(X) - 1))
#define C_STRING_WITH_SIZE(X) ((char *) (X)), ((uint) (sizeof(X) - 1)) #define C_STRING_WITH_LEN(X) ((char *) (X)), ((uint) (sizeof(X) - 1))
#endif #endif
...@@ -797,6 +797,9 @@ typedef SOCKET_SIZE_TYPE size_socket; ...@@ -797,6 +797,9 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define DBL_MAX 1.79769313486231470e+308 #define DBL_MAX 1.79769313486231470e+308
#define FLT_MAX ((float)3.40282346638528860e+38) #define FLT_MAX ((float)3.40282346638528860e+38)
#endif #endif
#ifndef SSIZE_MAX
#define SSIZE_MAX ((~((size_t) 0)) / 2)
#endif
#if !defined(HAVE_ISINF) && !defined(isinf) #if !defined(HAVE_ISINF) && !defined(isinf)
#define isinf(X) 0 #define isinf(X) 0
......
...@@ -290,7 +290,7 @@ our $opt_user_test; ...@@ -290,7 +290,7 @@ our $opt_user_test;
our $opt_valgrind= 0; our $opt_valgrind= 0;
our $opt_valgrind_mysqld= 0; our $opt_valgrind_mysqld= 0;
our $opt_valgrind_mysqltest= 0; our $opt_valgrind_mysqltest= 0;
our $opt_valgrind_all= 0; our $default_valgrind_options= "-v --show-reachable=yes";
our $opt_valgrind_options; our $opt_valgrind_options;
our $opt_valgrind_path; our $opt_valgrind_path;
...@@ -629,10 +629,9 @@ sub command_line_setup () { ...@@ -629,10 +629,9 @@ sub command_line_setup () {
# Coverage, profiling etc # Coverage, profiling etc
'gcov' => \$opt_gcov, 'gcov' => \$opt_gcov,
'gprof' => \$opt_gprof, 'gprof' => \$opt_gprof,
'valgrind' => \$opt_valgrind, 'valgrind|valgrind-all' => \$opt_valgrind,
'valgrind-mysqltest' => \$opt_valgrind_mysqltest, 'valgrind-mysqltest' => \$opt_valgrind_mysqltest,
'valgrind-mysqld' => \$opt_valgrind_mysqld, 'valgrind-mysqld' => \$opt_valgrind_mysqld,
'valgrind-all' => \$opt_valgrind_all,
'valgrind-options=s' => \$opt_valgrind_options, 'valgrind-options=s' => \$opt_valgrind_options,
'valgrind-path=s' => \$opt_valgrind_path, 'valgrind-path=s' => \$opt_valgrind_path,
...@@ -816,20 +815,32 @@ sub command_line_setup () { ...@@ -816,20 +815,32 @@ sub command_line_setup () {
} }
} }
# Turn on valgrinding of all executables if "valgrind" or "valgrind-all" # Check valgrind arguments
if ( $opt_valgrind or $opt_valgrind_all ) if ( $opt_valgrind or $opt_valgrind_path or defined $opt_valgrind_options)
{ {
mtr_report("Turning on valgrind for all executables"); mtr_report("Turning on valgrind for all executables");
$opt_valgrind= 1; $opt_valgrind= 1;
$opt_valgrind_mysqld= 1; $opt_valgrind_mysqld= 1;
$opt_valgrind_mysqltest= 1; $opt_valgrind_mysqltest= 1;
} }
elsif ( $opt_valgrind_mysqld or $opt_valgrind_mysqltest ) elsif ( $opt_valgrind_mysqld )
{ {
# If test's are run for a specific executable, turn on mtr_report("Turning on valgrind for mysqld(s) only");
# verbose and show-reachable
$opt_valgrind= 1; $opt_valgrind= 1;
$opt_valgrind_all= 1; }
elsif ( $opt_valgrind_mysqltest )
{
mtr_report("Turning on valgrind for mysqltest only");
$opt_valgrind= 1;
}
if ( $opt_valgrind )
{
# Set valgrind_options to default unless already defined
$opt_valgrind_options=$default_valgrind_options
unless defined $opt_valgrind_options;
mtr_report("Running valgrind with options \"$opt_valgrind_options\"");
} }
if ( ! $opt_testcase_timeout ) if ( ! $opt_testcase_timeout )
...@@ -3694,17 +3705,8 @@ sub valgrind_arguments { ...@@ -3694,17 +3705,8 @@ sub valgrind_arguments {
mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir) mtr_add_arg($args, "--suppressions=%s/valgrind.supp", $glob_mysql_test_dir)
if -f "$glob_mysql_test_dir/valgrind.supp"; if -f "$glob_mysql_test_dir/valgrind.supp";
if ( $opt_valgrind_all ) # Add valgrind options, can be overriden by user
{ mtr_add_arg($args, '%s', $_) for (split(' ', $opt_valgrind_options));
mtr_add_arg($args, "-v");
mtr_add_arg($args, "--show-reachable=yes");
}
if ( $opt_valgrind_options )
{
mtr_add_arg($args, '%s', $_) for (split(' ', $opt_valgrind_options));
}
mtr_add_arg($args, $$exe); mtr_add_arg($args, $$exe);
...@@ -3816,12 +3818,11 @@ Options for coverage, profiling etc ...@@ -3816,12 +3818,11 @@ Options for coverage, profiling etc
gcov FIXME gcov FIXME
gprof FIXME gprof FIXME
valgrind Run the "mysqltest" and "mysqld" executables using valgrind Run the "mysqltest" and "mysqld" executables using
valgrind valgrind with options($default_valgrind_options)
valgrind-all Same as "valgrind" but will also add "verbose" and valgrind-all Synonym for --valgrind
"--show-reachable" flags to valgrind
valgrind-mysqltest Run the "mysqltest" executable with valgrind valgrind-mysqltest Run the "mysqltest" executable with valgrind
valgrind-mysqld Run the "mysqld" executable with valgrind valgrind-mysqld Run the "mysqld" executable with valgrind
valgrind-options=ARGS Extra options to give valgrind valgrind-options=ARGS Options to give valgrind, replaces default options
valgrind-path=[EXE] Path to the valgrind executable valgrind-path=[EXE] Path to the valgrind executable
Misc options Misc options
......
...@@ -241,3 +241,11 @@ select * from t1 where match a against('ab c' in boolean mode); ...@@ -241,3 +241,11 @@ select * from t1 where match a against('ab c' in boolean mode);
a a
drop table t1; drop table t1;
set names latin1; set names latin1;
SET NAMES utf8;
CREATE TABLE t1(a VARCHAR(255), FULLTEXT(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES('„MySQL“');
SELECT a FROM t1 WHERE MATCH a AGAINST('“MySQL„' IN BOOLEAN MODE);
a
„MySQL“
DROP TABLE t1;
SET NAMES latin1;
...@@ -172,7 +172,7 @@ INITIAL_SIZE, ...@@ -172,7 +172,7 @@ INITIAL_SIZE,
ENGINE ENGINE
FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME; FROM INFORMATION_SCHEMA.FILES WHERE FILE_TYPE="UNDO LOG" ORDER BY FILE_NAME;
LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE LOGFILE_GROUP_NAME FILE_NAME TOTAL_EXTENTS INITIAL_SIZE ENGINE
lg1 undofile_lg1_01.dat 1048576 2097152 ndbcluster lg1 undofile_lg1_01.dat 524288 2097152 ndbcluster
lg1 undofile_lg1_02.dat 1048576 4194304 ndbcluster lg1 undofile_lg1_02.dat 1048576 4194304 ndbcluster
SELECT DISTINCT SELECT DISTINCT
TABLESPACE_NAME, TABLESPACE_NAME,
......
...@@ -100,3 +100,19 @@ ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find tar ...@@ -100,3 +100,19 @@ ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find tar
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t3; DROP TABLE t3;
create table t1(a int auto_increment primary key, b int);
insert into t1 values (NULL, 1);
reset master;
set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Table_map 2 # table_id: 21 (test.t1)
slave-bin.000001 # Write_rows 2 # table_id: 21 flags: STMT_END_F
select * from t1;
a b
1 1
5 1
6 1
drop table t1;
...@@ -108,3 +108,19 @@ ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find tar ...@@ -108,3 +108,19 @@ ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find tar
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t3; DROP TABLE t3;
create table t1(a int auto_increment primary key, b int);
insert into t1 values (NULL, 1);
reset master;
set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
slave-bin.000001 # Table_map 2 # table_id: 21 (test.t1)
slave-bin.000001 # Write_rows 2 # table_id: 21 flags: STMT_END_F
select * from t1;
a b
1 1
5 1
6 1
drop table t1;
...@@ -221,3 +221,13 @@ drop table t1; ...@@ -221,3 +221,13 @@ drop table t1;
set names latin1; set names latin1;
# End of 4.1 tests # End of 4.1 tests
#
# BUG#19580 - FULLTEXT search produces wrong results on UTF-8 columns
#
SET NAMES utf8;
CREATE TABLE t1(a VARCHAR(255), FULLTEXT(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES('„MySQL“');
SELECT a FROM t1 WHERE MATCH a AGAINST('“MySQL„' IN BOOLEAN MODE);
DROP TABLE t1;
SET NAMES latin1;
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
--echo --echo
--echo --> Printing out line for 'testuser'... --echo --> Printing out line for 'testuser'...
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --passwd --username=testuser --password=abc | tail -1 --exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --print-password-line --username=testuser --password=abc | tail -1
--echo --echo
--echo --> Listing users... --echo --> Listing users...
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
--echo --echo
--echo --> Printing out line for 'testuser'... --echo --> Printing out line for 'testuser'...
--exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --passwd --username=testuser --password=xyz | tail -1 --exec $IM_EXE --defaults-file="$IM_DEFAULTS_PATH" --print-password-line --username=testuser --password=xyz | tail -1
--echo --echo
--echo --> Listing users... --echo --> Listing users...
......
...@@ -21,10 +21,6 @@ rm -rf Makefile.in.bk ...@@ -21,10 +21,6 @@ rm -rf Makefile.in.bk
# run auto tools # run auto tools
. $path/compile-AUTOTOOLS . $path/compile-AUTOTOOLS
# For NetWare there is no comp_err but comp_err.linux
sed -e "s/comp_err\$(EXEEXT)/comp_err.linux/g" extra/Makefile.am > extra/Makefile.am.$$
mv extra/Makefile.am.$$ extra/Makefile.am
# configure # configure
./configure $base_configs $extra_configs ./configure $base_configs $extra_configs
......
...@@ -31,7 +31,7 @@ netware_build_files = client/mysql.def client/mysqladmin.def \ ...@@ -31,7 +31,7 @@ netware_build_files = client/mysql.def client/mysqladmin.def \
client/mysqlshow.def client/mysqltest.def \ client/mysqlshow.def client/mysqltest.def \
client/mysqlslap.def \ client/mysqlslap.def \
sql/mysqld.def extra/mysql_waitpid.def \ sql/mysqld.def extra/mysql_waitpid.def \
extra/mysql_install.def extra/my_print_defaults.def \ extra/my_print_defaults.def \
extra/perror.def extra/replace.def \ extra/perror.def extra/replace.def \
extra/resolveip.def extra/comp_err.def \ extra/resolveip.def extra/comp_err.def \
extra/resolve_stack_dump.def \ extra/resolve_stack_dump.def \
...@@ -54,7 +54,7 @@ EXTRA_DIST= comp_err.def init_db.sql install_test_db.ncf \ ...@@ -54,7 +54,7 @@ EXTRA_DIST= comp_err.def init_db.sql install_test_db.ncf \
libmysqlmain.c my_manage.c my_manage.h \ libmysqlmain.c my_manage.c my_manage.h \
my_print_defaults.def myisam_ftdump.def myisamchk.def \ my_print_defaults.def myisam_ftdump.def myisamchk.def \
myisamlog.def myisampack.def mysql.def mysql.xdc \ myisamlog.def myisampack.def mysql.def mysql.xdc \
mysql_fix_privilege_tables.pl mysql_install.def \ mysql_fix_privilege_tables.pl \
mysql_install_db.c mysql_install_db.def \ mysql_install_db.c mysql_install_db.def \
mysql_secure_installation.pl mysql_test_run.c \ mysql_secure_installation.pl mysql_test_run.c \
mysql_test_run.def mysql_waitpid.def mysqladmin.def \ mysql_test_run.def mysql_waitpid.def mysqladmin.def \
......
#------------------------------------------------------------------------------
# My Print Defaults
#------------------------------------------------------------------------------
MODULE libc.nlm
COPYRIGHT "(c) 2003-2005 Novell, Inc. Portions (c) 2003 MySQL AB. All Rights Reserved."
DESCRIPTION "MySQL Install Tool"
VERSION 4, 0
XDCDATA ../netware/mysql.xdc
#DEBUG
#!/bin/sh #!/bin/sh
# Terminate loudly on error, we don't want partial package
set -e
trap "echo '*** script failed ***'" 0
# #
# Script to create a Windows src package # Script to create a Windows src package
# #
version=@VERSION@ version=@VERSION@
export version
CP="cp -p" CP="cp -p"
DEBUG=0 DEBUG=0
...@@ -74,7 +77,7 @@ show_usage() ...@@ -74,7 +77,7 @@ show_usage()
echo " --tmp Specify the temporary location" echo " --tmp Specify the temporary location"
echo " --suffix Suffix name for the package" echo " --suffix Suffix name for the package"
echo " --dirname Directory name to copy files (intermediate)" echo " --dirname Directory name to copy files (intermediate)"
echo " --silent Do not list verbosely files processed" echo " --silent Show no progress information"
echo " --tar Create tar.gz package" echo " --tar Create tar.gz package"
echo " --zip Create zip package" echo " --zip Create zip package"
echo " --help Show this help message" echo " --help Show this help message"
...@@ -140,10 +143,11 @@ unix_to_dos() ...@@ -140,10 +143,11 @@ unix_to_dos()
# Create a tmp dest directory to copy files # Create a tmp dest directory to copy files
# #
BASE=$TMP/my_win_dist$SUFFIX BASE=$TMP/my_win_dist$SUFFIX.$$
trap "rm -r -f $BASE; echo '*** interrupted ***'; exit 1" 1 2 3 13 15
if [ -d $BASE ] ; then if [ -d $BASE ] ; then
print_debug "Destination directory '$BASE' already exists, deleting it" echo "WARNING: Destination directory '$BASE' already exists, deleting it"
rm -r -f $BASE rm -r -f $BASE
fi fi
...@@ -199,7 +203,7 @@ copy_dir_files() ...@@ -199,7 +203,7 @@ copy_dir_files()
print_debug "Creating directory '$arg'" print_debug "Creating directory '$arg'"
mkdir $BASE/$arg mkdir $BASE/$arg
fi fi
for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def *.hpp \ for i in *.c *.cpp *.h *.ih *.i *.ic *.asm *.def *.hpp *.yy \
README INSTALL* LICENSE AUTHORS NEWS ChangeLog \ README INSTALL* LICENSE AUTHORS NEWS ChangeLog \
*.inc *.test *.result *.pem Moscow_leap des_key_file \ *.inc *.test *.result *.pem Moscow_leap des_key_file \
*.vcproj *.sln *.dat *.000001 *.require *.opt *.vcproj *.sln *.dat *.000001 *.require *.opt
...@@ -252,7 +256,7 @@ copy_dir_dirs() { ...@@ -252,7 +256,7 @@ copy_dir_dirs() {
for i in client dbug extra storage/heap include storage/archive storage/csv \ for i in client dbug extra storage/heap include storage/archive storage/csv \
include/mysql libmysql libmysqld storage/myisam storage/example \ include/mysql libmysql libmysqld storage/myisam storage/example \
storage/myisammrg mysys regex sql strings sql-common \ storage/myisammrg mysys regex sql strings sql-common \
tools vio zlib vio zlib
do do
copy_dir_files $i copy_dir_files $i
done done
...@@ -260,7 +264,7 @@ done ...@@ -260,7 +264,7 @@ done
# #
# Create project files for ndb # Create project files for ndb
# #
#make -C $SOURCE/storage/ndb windoze #make -C $SOURCE/storage/ndb windoze || true
# #
# Input directories to be copied recursively # Input directories to be copied recursively
...@@ -334,8 +338,17 @@ done ...@@ -334,8 +338,17 @@ done
# Fix some windows files to avoid compiler warnings # Fix some windows files to avoid compiler warnings
# #
./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 if [ -x extra/replace ] ; then
mv $BASE/sql/sql_yacc.cpp-new $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
else
if [ "$SILENT" = "0" ] ; then
echo 'WARNING: "extra/replace" not built, can not filter "sql_yacc.ccp"'
echo 'WARNING: to reduce the number of warnings when building'
fi
fi
# #
# Search the tree for plain text files and adapt the line end marker # Search the tree for plain text files and adapt the line end marker
...@@ -356,19 +369,23 @@ mv $BASE/README $BASE/README.txt ...@@ -356,19 +369,23 @@ mv $BASE/README $BASE/README.txt
# Clean up if we did this from a bk tree # Clean up if we did this from a bk tree
# #
if [ -d $BASE/SSL/SCCS ] find $BASE -type d \( -name SCCS -o -name .deps -o -name .libs \) -print0 | \
then xargs -0 rm -r -f
find $BASE/ -type d -name SCCS -printf " \"%p\"" | xargs rm -r -f
fi
find $BASE/ -type d -name .deps -printf " \"%p\"" | xargs rm -r -f
find $BASE/ -type d -name .libs -printf " \"%p\"" | xargs rm -r -f
rm -r -f "$BASE/mysql-test/var" rm -r -f "$BASE/mysql-test/var"
# #
# Initialize the initial data directory # Initialize the initial data directory
# #
if [ -f scripts/mysql_install_db ]; then if [ ! -f scripts/mysql_install_db ] ; then
if [ "$SILENT" = "0" ] ; then
echo 'WARNING: "scripts/mysql_install_db" is not built, can not initiate databases'
fi
elif [ ! -f extra/my_print_defaults ]; then
if [ "$SILENT" = "0" ] ; then
echo 'WARNING: "extra/my_print_defaults" is not built, can not initiate databases'
fi
else
print_debug "Initializing the 'data' directory" print_debug "Initializing the 'data' directory"
scripts/mysql_install_db --no-defaults --windows --datadir=$BASE/data scripts/mysql_install_db --no-defaults --windows --datadir=$BASE/data
if test "$?" = 1 if test "$?" = 1
...@@ -446,21 +463,15 @@ set_tarzip_options() ...@@ -446,21 +463,15 @@ set_tarzip_options()
if [ "$arg" = "tar" ]; then if [ "$arg" = "tar" ]; then
ZIPFILE1=gnutar ZIPFILE1=gnutar
ZIPFILE2=gtar ZIPFILE2=gtar
OPT=cvf OPT=cf
EXT=".tar" EXT=".tar"
NEED_COMPRESS=1 NEED_COMPRESS=1
if [ "$SILENT" = "1" ] ; then
OPT=cf
fi
else else
ZIPFILE1=zip ZIPFILE1=zip
ZIPFILE2="" ZIPFILE2=""
OPT="-r" OPT="-r -q"
EXT=".zip" EXT=".zip"
NEED_COMPRESS=0 NEED_COMPRESS=0
if [ "$SILENT" = "1" ] ; then
OPT="$OPT -q"
fi
fi fi
done done
} }
...@@ -521,4 +532,7 @@ fi ...@@ -521,4 +532,7 @@ fi
print_debug "Removing temporary directory" print_debug "Removing temporary directory"
rm -r -f $BASE rm -r -f $BASE
# No need to report anything if we got here
trap "" 0
# End of script # End of script
...@@ -695,7 +695,7 @@ bool Create_instance::parse_args(const char **text) ...@@ -695,7 +695,7 @@ bool Create_instance::parse_args(const char **text)
if (!option_value_str) if (!option_value_str)
{ {
LEX_STRING empty_str= { C_STRING_WITH_SIZE("") }; LEX_STRING empty_str= { C_STRING_WITH_LEN("") };
if (!(option_value_str= Named_value::alloc_str(&empty_str))) if (!(option_value_str= Named_value::alloc_str(&empty_str)))
return TRUE; /* out of memory during parsing. */ return TRUE; /* out of memory during parsing. */
...@@ -1511,7 +1511,7 @@ bool Set_option::parse_args(const char **text) ...@@ -1511,7 +1511,7 @@ bool Set_option::parse_args(const char **text)
if (!option_value_str) if (!option_value_str)
{ {
LEX_STRING empty_str= { C_STRING_WITH_SIZE("") }; LEX_STRING empty_str= { C_STRING_WITH_LEN("") };
if (!(option_value_str= Named_value::alloc_str(&empty_str))) if (!(option_value_str= Named_value::alloc_str(&empty_str)))
return TRUE; /* out of memory during parsing. */ return TRUE; /* out of memory during parsing. */
...@@ -1650,7 +1650,7 @@ bool Unset_option::parse_args(const char **text) ...@@ -1650,7 +1650,7 @@ bool Unset_option::parse_args(const char **text)
return TRUE; /* out of memory during parsing. */ return TRUE; /* out of memory during parsing. */
{ {
LEX_STRING empty_str= { C_STRING_WITH_SIZE("") }; LEX_STRING empty_str= { C_STRING_WITH_LEN("") };
if (!(option_value_str= Named_value::alloc_str(&empty_str))) if (!(option_value_str= Named_value::alloc_str(&empty_str)))
{ {
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
const LEX_STRING const LEX_STRING
Instance::DFLT_INSTANCE_NAME= { C_STRING_WITH_SIZE("mysqld") }; Instance::DFLT_INSTANCE_NAME= { C_STRING_WITH_LEN("mysqld") };
static const char * const INSTANCE_NAME_PREFIX= Instance::DFLT_INSTANCE_NAME.str; static const char * const INSTANCE_NAME_PREFIX= Instance::DFLT_INSTANCE_NAME.str;
static const int INSTANCE_NAME_PREFIX_LEN= Instance::DFLT_INSTANCE_NAME.length; static const int INSTANCE_NAME_PREFIX_LEN= Instance::DFLT_INSTANCE_NAME.length;
......
...@@ -120,7 +120,7 @@ int Instance_options::get_default_option(char *result, size_t result_len, ...@@ -120,7 +120,7 @@ int Instance_options::get_default_option(char *result, size_t result_len,
{ {
int rc= 1; int rc= 1;
LEX_STRING verbose_option= LEX_STRING verbose_option=
{ C_STRING_WITH_SIZE(" --no-defaults --verbose --help") }; { C_STRING_WITH_LEN(" --no-defaults --verbose --help") };
/* reserve space for the path + option + final '\0' */ /* reserve space for the path + option + final '\0' */
Buffer cmd(mysqld_path.length + verbose_option.length + 1); Buffer cmd(mysqld_path.length + verbose_option.length + 1);
...@@ -155,7 +155,7 @@ int Instance_options::fill_instance_version() ...@@ -155,7 +155,7 @@ int Instance_options::fill_instance_version()
{ {
char result[MAX_VERSION_LENGTH]; char result[MAX_VERSION_LENGTH];
LEX_STRING version_option= LEX_STRING version_option=
{ C_STRING_WITH_SIZE(" --no-defaults --version") }; { C_STRING_WITH_LEN(" --no-defaults --version") };
int rc= 1; int rc= 1;
Buffer cmd(mysqld_path.length + version_option.length + 1); Buffer cmd(mysqld_path.length + version_option.length + 1);
...@@ -210,7 +210,7 @@ int Instance_options::fill_mysqld_real_path() ...@@ -210,7 +210,7 @@ int Instance_options::fill_mysqld_real_path()
{ {
char result[FN_REFLEN]; char result[FN_REFLEN];
LEX_STRING help_option= LEX_STRING help_option=
{ C_STRING_WITH_SIZE(" --no-defaults --help") }; { C_STRING_WITH_LEN(" --no-defaults --help") };
int rc= 1; int rc= 1;
Buffer cmd(mysqld_path.length + help_option.length); Buffer cmd(mysqld_path.length + help_option.length);
......
...@@ -114,7 +114,6 @@ static const int ANGEL_PID_FILE_SUFFIX_LEN= strlen(ANGEL_PID_FILE_SUFFIX); ...@@ -114,7 +114,6 @@ static const int ANGEL_PID_FILE_SUFFIX_LEN= strlen(ANGEL_PID_FILE_SUFFIX);
*/ */
enum options { enum options {
OPT_PASSWD= 'P',
OPT_USERNAME= 'u', OPT_USERNAME= 'u',
OPT_PASSWORD= 'p', OPT_PASSWORD= 'p',
OPT_LOG= 256, OPT_LOG= 256,
...@@ -135,6 +134,7 @@ enum options { ...@@ -135,6 +134,7 @@ enum options {
OPT_PORT, OPT_PORT,
OPT_WAIT_TIMEOUT, OPT_WAIT_TIMEOUT,
OPT_BIND_ADDRESS, OPT_BIND_ADDRESS,
OPT_PRINT_PASSWORD_LINE,
OPT_ADD_USER, OPT_ADD_USER,
OPT_DROP_USER, OPT_DROP_USER,
OPT_EDIT_USER, OPT_EDIT_USER,
...@@ -225,8 +225,8 @@ static struct my_option my_long_options[] = ...@@ -225,8 +225,8 @@ static struct my_option my_long_options[] =
(gptr *) &Options::Main::mysqld_safe_compatible, (gptr *) &Options::Main::mysqld_safe_compatible,
0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 0, 0 }, 0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 0, 0 },
{ "passwd", OPT_PASSWD, { "print-password-line", OPT_PRINT_PASSWORD_LINE,
"Prepare an entry for the password file and exit.", "Print out a user entry as a line for the password file and exit.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 }, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "password", OPT_PASSWORD, "Password to update the password file", { "password", OPT_PASSWORD, "Password to update the password file",
...@@ -339,7 +339,7 @@ get_one_option(int optid, ...@@ -339,7 +339,7 @@ get_one_option(int optid,
case 'V': case 'V':
version(); version();
exit(0); exit(0);
case OPT_PASSWD: case OPT_PRINT_PASSWORD_LINE:
case OPT_ADD_USER: case OPT_ADD_USER:
case OPT_DROP_USER: case OPT_DROP_USER:
case OPT_EDIT_USER: case OPT_EDIT_USER:
...@@ -354,8 +354,8 @@ get_one_option(int optid, ...@@ -354,8 +354,8 @@ get_one_option(int optid,
} }
switch (optid) { switch (optid) {
case OPT_PASSWD: case OPT_PRINT_PASSWORD_LINE:
Options::User_management::cmd= new Passwd_cmd(); Options::User_management::cmd= new Print_password_line_cmd();
break; break;
case OPT_ADD_USER: case OPT_ADD_USER:
Options::User_management::cmd= new Add_user_cmd(); Options::User_management::cmd= new Add_user_cmd();
......
...@@ -43,7 +43,7 @@ bool linuxthreads; ...@@ -43,7 +43,7 @@ bool linuxthreads;
The following string must be less then 80 characters, as The following string must be less then 80 characters, as
mysql_connection.cc relies on it mysql_connection.cc relies on it
*/ */
const LEX_STRING mysqlmanager_version= { C_STRING_WITH_SIZE("1.0-beta") }; const LEX_STRING mysqlmanager_version= { C_STRING_WITH_LEN("1.0-beta") };
const unsigned char protocol_version= PROTOCOL_VERSION; const unsigned char protocol_version= PROTOCOL_VERSION;
......
...@@ -180,10 +180,10 @@ static int save_password_file(User_map *user_map) ...@@ -180,10 +180,10 @@ static int save_password_file(User_map *user_map)
} }
/************************************************************************* /*************************************************************************
Passwd_cmd Print_password_line_cmd
*************************************************************************/ *************************************************************************/
int Passwd_cmd::execute() int Print_password_line_cmd::execute()
{ {
LEX_STRING user_name; LEX_STRING user_name;
const char *password; const char *password;
......
...@@ -61,13 +61,14 @@ class User_management_cmd ...@@ -61,13 +61,14 @@ class User_management_cmd
/************************************************************************* /*************************************************************************
Passwd_cmd: support for --passwd command-line option. Print_password_line_cmd: support for --print-password-line command-line
option.
*************************************************************************/ *************************************************************************/
class Passwd_cmd : public User_management_cmd class Print_password_line_cmd : public User_management_cmd
{ {
public: public:
Passwd_cmd() Print_password_line_cmd()
{ } { }
public: public:
......
...@@ -6179,7 +6179,8 @@ The minimum value for this variable is 4096.", ...@@ -6179,7 +6179,8 @@ The minimum value for this variable is 4096.",
"Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value.", "Each thread that does a sequential scan allocates a buffer of this size for each table it scans. If you do many sequential scans, you may want to increase this value.",
(gptr*) &global_system_variables.read_buff_size, (gptr*) &global_system_variables.read_buff_size,
(gptr*) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG, (gptr*) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD, IO_SIZE, 0}, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, SSIZE_MAX, MALLOC_OVERHEAD, IO_SIZE,
0},
{"read_only", OPT_READONLY, {"read_only", OPT_READONLY,
"Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the SUPER privilege", "Make all non-temporary tables read-only, with the exception for replication (slave) threads and users with the SUPER privilege",
(gptr*) &opt_readonly, (gptr*) &opt_readonly,
...@@ -6190,12 +6191,12 @@ The minimum value for this variable is 4096.", ...@@ -6190,12 +6191,12 @@ The minimum value for this variable is 4096.",
(gptr*) &global_system_variables.read_rnd_buff_size, (gptr*) &global_system_variables.read_rnd_buff_size,
(gptr*) &max_system_variables.read_rnd_buff_size, 0, (gptr*) &max_system_variables.read_rnd_buff_size, 0,
GET_ULONG, REQUIRED_ARG, 256*1024L, IO_SIZE*2+MALLOC_OVERHEAD, GET_ULONG, REQUIRED_ARG, 256*1024L, IO_SIZE*2+MALLOC_OVERHEAD,
~0L, MALLOC_OVERHEAD, IO_SIZE, 0}, SSIZE_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
{"record_buffer", OPT_RECORD_BUFFER, {"record_buffer", OPT_RECORD_BUFFER,
"Alias for read_buffer_size", "Alias for read_buffer_size",
(gptr*) &global_system_variables.read_buff_size, (gptr*) &global_system_variables.read_buff_size,
(gptr*) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG, (gptr*) &max_system_variables.read_buff_size,0, GET_ULONG, REQUIRED_ARG,
128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, ~0L, MALLOC_OVERHEAD, IO_SIZE, 0}, 128*1024L, IO_SIZE*2+MALLOC_OVERHEAD, SSIZE_MAX, MALLOC_OVERHEAD, IO_SIZE, 0},
#ifdef HAVE_REPLICATION #ifdef HAVE_REPLICATION
{"relay_log_purge", OPT_RELAY_LOG_PURGE, {"relay_log_purge", OPT_RELAY_LOG_PURGE,
"0 = do not purge relay logs. 1 = purge them as soon as they are no more needed.", "0 = do not purge relay logs. 1 = purge them as soon as they are no more needed.",
......
...@@ -438,6 +438,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path, ...@@ -438,6 +438,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
uint col_access=thd->col_access; uint col_access=thd->col_access;
#endif #endif
TABLE_LIST table_list; TABLE_LIST table_list;
char tbbuff[FN_REFLEN];
DBUG_ENTER("mysql_find_files"); DBUG_ENTER("mysql_find_files");
if (wild && !wild[0]) if (wild && !wild[0])
...@@ -454,6 +455,8 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path, ...@@ -454,6 +455,8 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
DBUG_RETURN(-1); DBUG_RETURN(-1);
} }
VOID(tablename_to_filename(tmp_file_prefix, tbbuff, sizeof(tbbuff)));
for (i=0 ; i < (uint) dirp->number_off_files ; i++) for (i=0 ; i < (uint) dirp->number_off_files ; i++)
{ {
char uname[NAME_LEN*3+1]; /* Unencoded name */ char uname[NAME_LEN*3+1]; /* Unencoded name */
...@@ -491,7 +494,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path, ...@@ -491,7 +494,7 @@ mysql_find_files(THD *thd,List<char> *files, const char *db,const char *path,
{ {
// Return only .frm files which aren't temp files. // Return only .frm files which aren't temp files.
if (my_strcasecmp(system_charset_info, ext=fn_rext(file->name),reg_ext) || if (my_strcasecmp(system_charset_info, ext=fn_rext(file->name),reg_ext) ||
is_prefix(file->name,tmp_file_prefix)) is_prefix(file->name,tbbuff))
continue; continue;
*ext=0; *ext=0;
VOID(filename_to_tablename(file->name, uname, sizeof(uname))); VOID(filename_to_tablename(file->name, uname, sizeof(uname)));
......
...@@ -111,6 +111,7 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end, ...@@ -111,6 +111,7 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
FT_WORD *word, MYSQL_FTPARSER_BOOLEAN_INFO *param) FT_WORD *word, MYSQL_FTPARSER_BOOLEAN_INFO *param)
{ {
byte *doc=*start; byte *doc=*start;
int ctype;
uint mwc, length, mbl; uint mwc, length, mbl;
param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0); param->yesno=(FTB_YES==' ') ? 1 : (param->quot != 0);
...@@ -119,9 +120,11 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end, ...@@ -119,9 +120,11 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
while (doc<end) while (doc<end)
{ {
for (;doc<end;doc++) for (; doc < end; doc+= (mbl > 0 ? mbl : 1))
{ {
if (true_word_char(cs,*doc)) break; mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
if (true_word_char(ctype, *doc))
break;
if (*doc == FTB_RQUOT && param->quot) if (*doc == FTB_RQUOT && param->quot)
{ {
param->quot=doc; param->quot=doc;
...@@ -155,14 +158,16 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end, ...@@ -155,14 +158,16 @@ byte ft_get_word(CHARSET_INFO *cs, byte **start, byte *end,
} }
mwc=length=0; mwc=length=0;
for (word->pos=doc; doc<end; length++, mbl=my_mbcharlen(cs, *(uchar *)doc), doc+=(mbl ? mbl : 1)) for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : 1))
if (true_word_char(cs,*doc)) {
mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
if (true_word_char(ctype, *doc))
mwc=0; mwc=0;
else if (!misc_word_char(*doc) || mwc) else if (!misc_word_char(*doc) || mwc)
break; break;
else else
mwc++; mwc++;
}
param->prev='A'; /* be sure *prev is true_word_char */ param->prev='A'; /* be sure *prev is true_word_char */
word->len= (uint)(doc-word->pos) - mwc; word->len= (uint)(doc-word->pos) - mwc;
if ((param->trunc=(doc<end && *doc == FTB_TRUNC))) if ((param->trunc=(doc<end && *doc == FTB_TRUNC)))
...@@ -197,24 +202,31 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, const byte *end, ...@@ -197,24 +202,31 @@ byte ft_simple_get_word(CHARSET_INFO *cs, byte **start, const byte *end,
{ {
byte *doc= *start; byte *doc= *start;
uint mwc, length, mbl; uint mwc, length, mbl;
int ctype;
DBUG_ENTER("ft_simple_get_word"); DBUG_ENTER("ft_simple_get_word");
do do
{ {
for (;; doc++) for (;; doc+= (mbl > 0 ? mbl : 1))
{ {
if (doc >= end) DBUG_RETURN(0); if (doc >= end)
if (true_word_char(cs, *doc)) break; DBUG_RETURN(0);
mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
if (true_word_char(ctype, *doc))
break;
} }
mwc= length= 0; mwc= length= 0;
for (word->pos=doc; doc<end; length++, mbl=my_mbcharlen(cs, *(uchar *)doc), doc+=(mbl ? mbl : 1)) for (word->pos= doc; doc < end; length++, doc+= (mbl > 0 ? mbl : 1))
if (true_word_char(cs,*doc)) {
mbl= cs->cset->ctype(cs, &ctype, (uchar*)doc, (uchar*)end);
if (true_word_char(ctype, *doc))
mwc= 0; mwc= 0;
else if (!misc_word_char(*doc) || mwc) else if (!misc_word_char(*doc) || mwc)
break; break;
else else
mwc++; mwc++;
}
word->len= (uint)(doc-word->pos) - mwc; word->len= (uint)(doc-word->pos) - mwc;
......
...@@ -174,11 +174,6 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const byte *rec1, const byte *rec2) ...@@ -174,11 +174,6 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const byte *rec1, const byte *rec2)
FT_SEG_ITERATOR ftsi1, ftsi2; FT_SEG_ITERATOR ftsi1, ftsi2;
CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset;
DBUG_ENTER("_mi_ft_cmp"); DBUG_ENTER("_mi_ft_cmp");
#ifndef MYSQL_HAS_TRUE_CTYPE_IMPLEMENTATION
if (cs->mbmaxlen > 1)
DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT);
#endif
_mi_ft_segiterator_init(info, keynr, rec1, &ftsi1); _mi_ft_segiterator_init(info, keynr, rec1, &ftsi1);
_mi_ft_segiterator_init(info, keynr, rec2, &ftsi2); _mi_ft_segiterator_init(info, keynr, rec2, &ftsi2);
......
...@@ -24,9 +24,10 @@ ...@@ -24,9 +24,10 @@
#include <queues.h> #include <queues.h>
#include <mysql/plugin.h> #include <mysql/plugin.h>
#define true_word_char(s,X) (my_isalnum(s,X) || (X)=='_') #define true_word_char(ctype, character) \
((ctype) & (_MY_U | _MY_L | _MY_NMR) || \
(character) == '_')
#define misc_word_char(X) 0 #define misc_word_char(X) 0
#define word_char(s,X) (true_word_char(s,X) || misc_word_char(X))
#define FT_MAX_WORD_LEN_FOR_SORT 31 #define FT_MAX_WORD_LEN_FOR_SORT 31
......
...@@ -20,7 +20,8 @@ dist-hook: ...@@ -20,7 +20,8 @@ dist-hook:
done done
windoze: windoze:
for i in `find . -name 'Makefile.am'`; do make -C `dirname $$i` windoze-dsp; done for i in `find . -name 'old_dirs' -prune -o -name 'Makefile.am' -print`; \
do make -C `dirname $$i` windoze-dsp; done
windoze-dsp: windoze-dsp:
......
...@@ -96,6 +96,7 @@ public: ...@@ -96,6 +96,7 @@ public:
public: public:
ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial ConfigValuesFactory(Uint32 keys = 50, Uint32 data = 10); // Initial
ConfigValuesFactory(ConfigValues * m_cfg); // ConfigValuesFactory(ConfigValues * m_cfg); //
~ConfigValuesFactory();
ConfigValues * m_cfg; ConfigValues * m_cfg;
ConfigValues * getConfigValues(); ConfigValues * getConfigValues();
......
...@@ -294,6 +294,12 @@ ConfigValuesFactory::ConfigValuesFactory(ConfigValues * cfg){ ...@@ -294,6 +294,12 @@ ConfigValuesFactory::ConfigValuesFactory(ConfigValues * cfg){
} }
} }
ConfigValuesFactory::~ConfigValuesFactory()
{
if(m_cfg)
free(m_cfg);
}
ConfigValues * ConfigValues *
ConfigValuesFactory::create(Uint32 keys, Uint32 data){ ConfigValuesFactory::create(Uint32 keys, Uint32 data){
Uint32 sz = sizeof(ConfigValues); Uint32 sz = sizeof(ConfigValues);
...@@ -528,7 +534,7 @@ ConfigValuesFactory::extractCurrentSection(const ConfigValues::ConstIterator & c ...@@ -528,7 +534,7 @@ ConfigValuesFactory::extractCurrentSection(const ConfigValues::ConstIterator & c
} }
} }
ConfigValues * ret = fac->m_cfg; ConfigValues * ret = fac->getConfigValues();
delete fac; delete fac;
return ret; return ret;
} }
......
...@@ -1924,7 +1924,7 @@ ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) { ...@@ -1924,7 +1924,7 @@ ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) {
} }
delete prop; delete prop;
return (ndb_mgm_configuration*)cvf.m_cfg; return (ndb_mgm_configuration*)cvf.getConfigValues();
} while(0); } while(0);
delete prop; delete prop;
......
...@@ -2289,11 +2289,11 @@ ConfigInfo::ConfigInfo() ...@@ -2289,11 +2289,11 @@ ConfigInfo::ConfigInfo()
if (!m_info.getCopy(param._section, &section)) { if (!m_info.getCopy(param._section, &section)) {
Properties newsection(true); Properties newsection(true);
m_info.put(param._section, &newsection); m_info.put(param._section, &newsection);
// Get copy of section
m_info.getCopy(param._section, &section);
} }
// Get copy of section
m_info.getCopy(param._section, &section);
// Create pinfo (parameter info) entry // Create pinfo (parameter info) entry
Properties pinfo(true); Properties pinfo(true);
pinfo.put("Id", param._paramId); pinfo.put("Id", param._paramId);
...@@ -2347,6 +2347,7 @@ ConfigInfo::ConfigInfo() ...@@ -2347,6 +2347,7 @@ ConfigInfo::ConfigInfo()
// Replace section with modified section // Replace section with modified section
m_info.put(param._section, section, true); m_info.put(param._section, section, true);
delete section;
if(param._type != ConfigInfo::CI_SECTION){ if(param._type != ConfigInfo::CI_SECTION){
Properties * p; Properties * p;
......
...@@ -221,7 +221,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ ...@@ -221,7 +221,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
--prefix=/ \ --prefix=/ \
--with-extra-charsets=all \ --with-extra-charsets=all \
%if %{YASSL_BUILD} %if %{YASSL_BUILD}
--with-yassl \ --with-ssl \
%endif %endif
--exec-prefix=%{_exec_prefix} \ --exec-prefix=%{_exec_prefix} \
--libexecdir=%{_sbindir} \ --libexecdir=%{_sbindir} \
...@@ -235,6 +235,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ ...@@ -235,6 +235,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
--enable-thread-safe-client \ --enable-thread-safe-client \
--with-readline \ --with-readline \
" "
make
} }
# Use our own copy of glibc # Use our own copy of glibc
...@@ -350,6 +351,7 @@ BuildMySQL "--enable-shared \ ...@@ -350,6 +351,7 @@ BuildMySQL "--enable-shared \
--with-example-storage-engine \ --with-example-storage-engine \
--with-blackhole-storage-engine \ --with-blackhole-storage-engine \
--with-federated-storage-engine \ --with-federated-storage-engine \
--with-embedded-server \
--with-big-tables \ --with-big-tables \
--with-comment=\"MySQL Community Server (GPL)\"") --with-comment=\"MySQL Community Server (GPL)\"")
...@@ -389,10 +391,10 @@ install -d $RBR%{_sbindir} ...@@ -389,10 +391,10 @@ install -d $RBR%{_sbindir}
mv $RBR/%{_libdir}/mysql/*.so* $RBR/%{_libdir}/ mv $RBR/%{_libdir}/mysql/*.so* $RBR/%{_libdir}/
# install "mysqld-debug" and "mysqld-max" # install "mysqld-debug" and "mysqld-max"
./libtool --mode=execute install -m 755 \ $MBD/libtool --mode=execute install -m 755 \
$RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-debug-%{mysql_version}/sql/mysqld \ $RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-debug-%{mysql_version}/sql/mysqld \
$RBR%{_sbindir}/mysqld-debug $RBR%{_sbindir}/mysqld-debug
./libtool --mode=execute install -m 755 \ $MBD/libtool --mode=execute install -m 755 \
$RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-max-%{mysql_version}/sql/mysqld \ $RPM_BUILD_DIR/mysql-%{mysql_version}/mysql-max-%{mysql_version}/sql/mysqld \
$RBR%{_sbindir}/mysqld-max $RBR%{_sbindir}/mysqld-max
...@@ -404,16 +406,12 @@ install -m 644 $MBD/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate. ...@@ -404,16 +406,12 @@ install -m 644 $MBD/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.
install -m 755 $MBD/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql install -m 755 $MBD/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql
# Install embedded server library in the build root # Install embedded server library in the build root
install -m 644 libmysqld/libmysqld.a $RBR%{_libdir}/mysql/ install -m 644 $MBD/libmysqld/libmysqld.a $RBR%{_libdir}/mysql/
# Create a symlink "rcmysql", pointing to the init.script. SuSE users # Create a symlink "rcmysql", pointing to the init.script. SuSE users
# will appreciate that, as all services usually offer this. # will appreciate that, as all services usually offer this.
ln -s %{_sysconfdir}/init.d/mysql $RPM_BUILD_ROOT%{_sbindir}/rcmysql ln -s %{_sysconfdir}/init.d/mysql $RPM_BUILD_ROOT%{_sbindir}/rcmysql
# Create symbolic compatibility link safe_mysqld -> mysqld_safe
# (safe_mysqld will be gone in MySQL 4.1)
ln -sf ./mysqld_safe $RBR%{_bindir}/safe_mysqld
# Touch the place where the my.cnf config file and mysqlmanager.passwd # Touch the place where the my.cnf config file and mysqlmanager.passwd
# (MySQL Instance Manager password file) might be located # (MySQL Instance Manager password file) might be located
# Just to make sure it's in the file list and marked as a config file # Just to make sure it's in the file list and marked as a config file
...@@ -480,7 +478,7 @@ chmod -R og-rw $mysql_datadir/mysql ...@@ -480,7 +478,7 @@ chmod -R og-rw $mysql_datadir/mysql
# Restart in the same way that mysqld will be started normally. # Restart in the same way that mysqld will be started normally.
%{_sysconfdir}/init.d/mysql start %{_sysconfdir}/init.d/mysql start
# Allow safe_mysqld to start mysqld and print a message before we exit # Allow mysqld_safe to start mysqld and print a message before we exit
sleep 2 sleep 2
...@@ -542,7 +540,6 @@ fi ...@@ -542,7 +540,6 @@ fi
%doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1* %doc %attr(644, root, man) %{_mandir}/man1/mysql_zap.1*
%doc %attr(644, root, man) %{_mandir}/man1/perror.1* %doc %attr(644, root, man) %{_mandir}/man1/perror.1*
%doc %attr(644, root, man) %{_mandir}/man1/replace.1* %doc %attr(644, root, man) %{_mandir}/man1/replace.1*
%doc %attr(644, root, man) %{_mandir}/man1/safe_mysqld.1*
%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf %ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf
%ghost %config(noreplace,missingok) %{_sysconfdir}/mysqlmanager.passwd %ghost %config(noreplace,missingok) %{_sysconfdir}/mysqlmanager.passwd
...@@ -571,7 +568,6 @@ fi ...@@ -571,7 +568,6 @@ fi
%attr(755, root, root) %{_bindir}/replace %attr(755, root, root) %{_bindir}/replace
%attr(755, root, root) %{_bindir}/resolve_stack_dump %attr(755, root, root) %{_bindir}/resolve_stack_dump
%attr(755, root, root) %{_bindir}/resolveip %attr(755, root, root) %{_bindir}/resolveip
%attr(755, root, root) %{_bindir}/safe_mysqld
%attr(755, root, root) %{_sbindir}/mysqld %attr(755, root, root) %{_sbindir}/mysqld
%attr(755, root, root) %{_sbindir}/mysqld-debug %attr(755, root, root) %{_sbindir}/mysqld-debug
......
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