Commit 4fc708a9 authored by unknown's avatar unknown

Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0-release

into mysql.com:/Users/kent/mysql/bk/mysql-5.0


configure.in:
  Auto merged
sql/sp_head.cc:
  Auto merged
parents e15d3387 45fd1c9a
This diff is collapsed.
......@@ -87,7 +87,7 @@
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
PreprocessorDefinitions="NDEBUG;DBUG_OFF;USE_SYMDIR;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
PreprocessorDefinitions="NDEBUG;DBUG_OFF;USE_SYMDIR;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_EXAMPLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
......@@ -148,7 +148,7 @@
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
PreprocessorDefinitions="NDEBUG;__NT__;DBUG_OFF;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
PreprocessorDefinitions="NDEBUG;__NT__;DBUG_OFF;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_EXAMPLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
......@@ -212,7 +212,7 @@
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../regex,../zlib,../extra/yassl/include"
PreprocessorDefinitions="__NT__;DBUG_OFF;NDEBUG;HAVE_INNOBASE_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
PreprocessorDefinitions="__NT__;DBUG_OFF;NDEBUG;HAVE_INNOBASE_DB;HAVE_ARCHIVE_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
......@@ -276,7 +276,7 @@
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../regex,../zlib,../extra/yassl/include"
PreprocessorDefinitions="__NT__;DBUG_OFF;NDEBUG;HAVE_INNOBASE_DB;MYSQL_SERVER;LICENSE=Commercial;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
PreprocessorDefinitions="__NT__;DBUG_OFF;NDEBUG;HAVE_INNOBASE_DB;HAVE_ARCHIVE_DB;MYSQL_SERVER;LICENSE=Commercial;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
......@@ -336,7 +336,7 @@
Optimization="0"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../bdb/build_win32,../include,../regex,../extra/yassl/include,../zlib"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
PreprocessorDefinitions="_DEBUG;SAFEMALLOC;SAFE_MUTEX;HAVE_INNOBASE_DB;HAVE_BERKELEY_DB;HAVE_ARCHIVE_DB;HAVE_BLACKHOLE_DB;HAVE_EXAMPLE_DB;HAVE_FEDERATED_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
RuntimeLibrary="1"
PrecompiledHeaderFile=".\debug/mysqld.pch"
AssemblerListingLocation=".\debug/"
......@@ -398,7 +398,7 @@
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../include,../regex,../zlib,../extra/yassl/include"
PreprocessorDefinitions="MYSQL_SERVER;LICENSE=Commercial;HAVE_DLOPEN;HAVE_INNOBASE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE"
PreprocessorDefinitions="MYSQL_SERVER;LICENSE=Commercial;HAVE_DLOPEN;HAVE_INNOBASE_DB;HAVE_ARCHIVE_DB;DBUG_OFF;NDEBUG;_WINDOWS;_CONSOLE"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
......@@ -521,7 +521,7 @@
InlineFunctionExpansion="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="../zlib,../include,../regex,../extra/yassl/include"
PreprocessorDefinitions="NDEBUG;DBUG_OFF;HAVE_INNOBASE_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
PreprocessorDefinitions="NDEBUG;DBUG_OFF;HAVE_INNOBASE_DB;HAVE_ARCHIVE_DB;MYSQL_SERVER;_WINDOWS;_CONSOLE;HAVE_DLOPEN"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
......@@ -1326,6 +1326,81 @@
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="examples\ha_example.cpp">
<FileConfiguration
Name="classic nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Max nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro nt|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="pro|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="classic|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="ha_berkeley.cpp">
<FileConfiguration
......
......@@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also change ndb version below and update version.c in ndb
AM_INIT_AUTOMAKE(mysql, 5.0.13-beta)
AM_INIT_AUTOMAKE(mysql, 5.0.12-beta)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
......@@ -18,7 +18,7 @@ SHARED_LIB_VERSION=15:0:0
# ndb version
NDB_VERSION_MAJOR=5
NDB_VERSION_MINOR=0
NDB_VERSION_BUILD=13
NDB_VERSION_BUILD=12
NDB_VERSION_STATUS="beta"
# Set all version vars based on $VERSION. How do we do this more elegant ?
......@@ -2446,7 +2446,7 @@ thread_dirs=
dnl This probably should be cleaned up more - for now the threaded
dnl client is just using plain-old libs.
sql_client_dirs="strings regex mysys sql/share libmysql client"
sql_client_dirs="strings regex mysys libmysql client"
linked_client_targets="linked_libmysql_sources"
if test "$THREAD_SAFE_CLIENT" != "no"
......
......@@ -925,20 +925,24 @@ typedef char bool; /* Ordinary boolean values 0 1 */
#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */
#ifndef set_timespec
#ifdef HAVE_TIMESPEC_TS_SEC
#ifndef set_timespec
#define set_timespec(ABSTIME,SEC) \
{ \
(ABSTIME).ts_sec=time(0) + (time_t) (SEC); \
(ABSTIME).ts_nsec=0; \
}
#endif /* !set_timespec */
#ifndef set_timespec_nsec
#define set_timespec_nsec(ABSTIME,NSEC) \
{ \
ulonglong now= my_getsystime() + (NSEC/100); \
(ABSTIME).ts_sec= (now / ULL(10000000)); \
(ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
}
#endif /* !set_timespec_nsec */
#else
#ifndef set_timespec
#define set_timespec(ABSTIME,SEC) \
{\
struct timeval tv;\
......@@ -946,14 +950,16 @@ typedef char bool; /* Ordinary boolean values 0 1 */
(ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
(ABSTIME).tv_nsec=tv.tv_usec*1000;\
}
#endif /* !set_timespec */
#ifndef set_timespec_nsec
#define set_timespec_nsec(ABSTIME,NSEC) \
{\
ulonglong now= my_getsystime() + (NSEC/100); \
(ABSTIME).tv_sec= (now / ULL(10000000)); \
(ABSTIME).tv_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
}
#endif /* !set_timespec_nsec */
#endif /* HAVE_TIMESPEC_TS_SEC */
#endif /* set_timespec */
/*
Define-funktions for reading and storing in machine independent format
......
......@@ -841,6 +841,7 @@ sub sleep_until_file_created ($$$) {
sub mtr_exit ($) {
my $code= shift;
# cluck("Called mtr_exit()");
mtr_timer_stop_all($::glob_timers);
local $SIG{HUP} = 'IGNORE';
kill('HUP', -$$);
sleep 2;
......
......@@ -177,7 +177,7 @@ sub mtr_report_stats ($) {
"%.2f\% were successful.\n\n", $ratio;
print
"The log files in var/log may give you some hint\n",
"of what when wrong.\n",
"of what went wrong.\n",
"If you want to report this error, please read first ",
"the documentation at\n",
"http://www.mysql.com/doc/en/MySQL_test_suite.html\n";
......@@ -223,7 +223,8 @@ sub mtr_report_stats ($) {
if ( $tot_failed != 0 )
{
print "mysql-test-run: *** Failing the test(s):";
my $test_mode= join(" ", @::glob_test_mode) || "default";
print "mysql-test-run in $test_mode mode: *** Failing the test(s):";
foreach my $tinfo (@$tests)
{
......
......@@ -15,6 +15,7 @@ use POSIX 'WNOHANG';
sub mtr_init_timers ();
sub mtr_timer_start($$$);
sub mtr_timer_stop($$);
sub mtr_timer_stop_all($);
sub mtr_timer_waitpid($$$);
##############################################################################
......@@ -113,6 +114,29 @@ sub mtr_timer_stop ($$) {
}
sub mtr_timer_stop_all ($) {
my $timers= shift;
foreach my $name ( keys %{$timers->{'timers'}} )
{
my $tpid= $timers->{'timers'}->{$name}->{'pid'};
# FIXME as Cygwin reuses pids fast, maybe check that is
# the expected process somehow?!
kill(9, $tpid);
# As the timers are so simple programs, we trust them to terminate,
# and use blocking wait for it. We wait just to avoid a zombie.
waitpid($tpid,0);
delete $timers->{'timers'}->{$name}; # Remove the timer information
delete $timers->{'pids'}->{$tpid}; # and PID reference
return 1;
}
}
sub mtr_timer_timeout ($$) {
my ($timers,$pid)= @_;
......
......@@ -142,6 +142,7 @@ our $glob_timers= undef;
our $glob_use_running_server= 0;
our $glob_use_running_ndbcluster= 0;
our $glob_use_embedded_server= 0;
our @glob_test_mode;
our $glob_basedir;
......@@ -606,6 +607,7 @@ sub command_line_setup () {
if ( $opt_embedded_server )
{
$glob_use_embedded_server= 1;
push(@glob_test_mode, "embedded");
$opt_skip_rpl= 1; # We never run replication with embedded
if ( $opt_extern )
......@@ -614,6 +616,11 @@ sub command_line_setup () {
}
}
if ( $opt_ps_protocol )
{
push(@glob_test_mode, "ps-protocol");
}
# FIXME don't understand what this is
# if ( $opt_local_master )
# {
......@@ -1562,8 +1569,9 @@ sub report_failure_and_restart ($) {
print "\n";
if ( ! $opt_force )
{
print "Aborting: $tinfo->{'name'} failed. To continue, re-run with '--force'.";
print "\n";
my $test_mode= join(" ", @::glob_test_mode) || "default";
print "Aborting: $tinfo->{'name'} failed in $test_mode mode. ";
print "To continue, re-run with '--force'.\n";
if ( ! $opt_gdb and ! $glob_use_running_server and
! $opt_ddd and ! $glob_use_embedded_server )
{
......
......@@ -872,7 +872,7 @@ report_stats () {
$ECHO "Failed ${TOT_FAIL}/${TOT_TEST} tests, ${whole}.${deci}% were successful."
$ECHO ""
$ECHO "The log files in $MY_LOG_DIR may give you some hint"
$ECHO "of what when wrong."
$ECHO "of what went wrong."
$ECHO "If you want to report this error, please read first the documentation at"
$ECHO "http://www.mysql.com/doc/en/MySQL_test_suite.html"
fi
......
......@@ -30,7 +30,7 @@ libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \
mf_path.c mf_loadpath.c my_file.c \
my_open.c my_create.c my_dup.c my_seek.c my_read.c \
my_pread.c my_write.c \
mf_keycaches.c my_crc32.c \
mf_keycache.c mf_keycaches.c my_crc32.c \
mf_iocache.c mf_iocache2.c mf_cache.c mf_tempfile.c \
mf_tempdir.c my_lock.c mf_brkhant.c my_alarm.c \
my_malloc.c my_realloc.c my_once.c mulalloc.c \
......
......@@ -61,6 +61,7 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
tztime.h my_decimal.h\
sp_head.h sp_pcontext.h sp_rcontext.h sp.h sp_cache.h \
parse_file.h sql_view.h sql_trigger.h \
sql_array.h \
examples/ha_example.h examples/ha_archive.h \
examples/ha_tina.h ha_blackhole.h \
ha_federated.h
......
......@@ -687,8 +687,12 @@ static bool subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str)
/* Find all instances of item_splocal used in this statement */
for (Item *item= instr->free_list; item; item= item->next)
{
if (item->is_splocal() && ((Item_splocal*)item)->pos_in_query)
sp_vars_uses.append((Item_splocal*)item);
if (item->is_splocal())
{
Item_splocal *item_spl= (Item_splocal*)item;
if (item_spl->pos_in_query)
sp_vars_uses.append(item_spl);
}
}
if (!sp_vars_uses.elements())
DBUG_RETURN(0);
......
......@@ -1947,7 +1947,7 @@ static byte *xid_get_hash_key(const byte *ptr,uint *length,
static void xid_free_hash (void *ptr)
{
if (!((XID_STATE*)ptr)->in_thd)
my_free((byte *)ptr, MYF(0));
my_free((gptr)ptr, MYF(0));
}
bool xid_cache_init()
......
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