Commit 6d0e2e72 authored by joreland@mysql.com's avatar joreland@mysql.com

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-4.1-ndb

into mysql.com:/home/jonas/src/mysql-4.1-ndb
parents 883247ea 8d39a7b1
......@@ -10,12 +10,13 @@ use Sys::Hostname;
$opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix="";
$opt_help=$opt_delete=$opt_debug=$opt_stage=$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_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_cluster=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0;
$opt_bundled_zlib=$opt_help=$opt_delete=$opt_debug=$opt_stage=$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_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_cluster=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0;
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0;
GetOptions(
"bdb",
"build-thread=i",
"bundled-zlib",
"config-env=s" => \@config_env,
"config-extra-env=s" => \@config_extra_env,
"config-options=s" => \@config_options,
......@@ -255,6 +256,7 @@ if ($opt_stage <= 1)
log_system("$make clean") if ($opt_use_old_distribution);
$opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions
$opt_config_options.= " --with-berkeley-db" if ($opt_bdb);
$opt_config_options.= " --with-zlib-dir=bundled" if ($opt_bundled_zlib);
$opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client);
$opt_config_options.= " --with-debug" if ($opt_with_debug);
$opt_config_options.= " --with-libwrap" if ($opt_libwrap);
......
......@@ -283,6 +283,12 @@ ID Value1 Value2
SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1;
ID Value1 Value2
drop table t1,t2;
CREATE TABLE t1 (a int);
CREATE TABLE t2 (b int);
CREATE TABLE t3 (c int);
SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
a b c
DROP TABLE t1, t2, t3;
create table t1 (i int);
create table t2 (i int);
create table t3 (i int);
......
......@@ -284,6 +284,16 @@ SELECT * FROM t1 NATURAL JOIN t2 WHERE 1 AND Value1 = 'A' AND Value2 <> 'B';
SELECT * FROM t1 NATURAL JOIN t2 WHERE (Value1 = 'A' AND Value2 <> 'B') AND 1;
drop table t1,t2;
#
# dummy natural join (no common columns) Bug #4807
#
CREATE TABLE t1 (a int);
CREATE TABLE t2 (b int);
CREATE TABLE t3 (c int);
SELECT * FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
DROP TABLE t1, t2, t3;
#
# Test combination of join methods
#
......
......@@ -9,5 +9,10 @@ DEFS_LOC = -DNO_DEBUG_MESSAGES
include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_util.mk.am
#ndbtest_PROGRAMS = ndb_test_mgmapi
ndb_test_mgmapi_SOURCES = test_mgmapi.cpp
ndb_test_mgmapi_LDFLAGS = @ndb_bin_am_ldflags@ \
$(top_builddir)/ndb/src/libndbclient.la
# Don't update the files from bitkeeper
%::SCCS/s.%
......@@ -172,7 +172,7 @@ MgmtSrvr::signalRecvThreadRun()
siglist.push_back(SigMatch(GSN_MGM_UNLOCK_CONFIG_REQ,
&MgmtSrvr::handle_MGM_UNLOCK_CONFIG_REQ));
while(1) {
while(!_isStopThread) {
SigMatch *handler = NULL;
NdbApiSignal *signal = NULL;
if(m_signalRecvQueue.waitFor(siglist, handler, signal)) {
......@@ -415,15 +415,19 @@ MgmtSrvr::getPort() const {
ndbout << "Local node id " << getOwnNodeId()
<< " is not defined as management server" << endl
<< "Have you set correct NodeId for this node?" << endl;
ndb_mgm_destroy_iterator(iter);
return 0;
}
Uint32 port = 0;
if(ndb_mgm_get_int_parameter(iter, CFG_MGM_PORT, &port) != 0){
ndbout << "Could not find PortNumber in the configuration file." << endl;
ndb_mgm_destroy_iterator(iter);
return 0;
}
ndb_mgm_destroy_iterator(iter);
/*****************
* Set Stat Port *
*****************/
......@@ -517,6 +521,7 @@ MgmtSrvr::MgmtSrvr(NodeId nodeId,
_isStopThread = false;
_logLevelThread = NULL;
_logLevelThreadSleep = 500;
m_signalRecvThread = NULL;
_startedNodeId = 0;
theFacade = 0;
......@@ -696,6 +701,11 @@ MgmtSrvr::~MgmtSrvr()
NdbThread_WaitFor(_logLevelThread, &res);
NdbThread_Destroy(&_logLevelThread);
}
if (m_signalRecvThread != NULL) {
NdbThread_WaitFor(m_signalRecvThread, &res);
NdbThread_Destroy(&m_signalRecvThread);
}
}
//****************************************************************************
......
......@@ -680,12 +680,12 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap)
/* Get difference in days */
int days= t->day - l_time->tm_mday;
if (days < -1)
days= 1; // Month has wrapped
days= 1; /* Month has wrapped */
else if (days > 1)
days= -1;
diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour)) +
(long) (60*((int) t->minute - (int) l_time->tm_min)));
current_timezone+= diff+3600; // Compensate for -3600 above
current_timezone+= diff+3600; /* Compensate for -3600 above */
tmp+= (time_t) diff;
localtime_r(&tmp,&tm_tmp);
l_time=&tm_tmp;
......@@ -698,15 +698,15 @@ my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap)
{
int days= t->day - l_time->tm_mday;
if (days < -1)
days=1; // Month has wrapped
days=1; /* Month has wrapped */
else if (days > 1)
days= -1;
diff=(3600L*(long) (days*24+((int) t->hour - (int) l_time->tm_hour))+
(long) (60*((int) t->minute - (int) l_time->tm_min)));
if (diff == 3600)
tmp+=3600 - t->minute*60 - t->second; // Move to next hour
tmp+=3600 - t->minute*60 - t->second; /* Move to next hour */
else if (diff == -3600)
tmp-=t->minute*60 + t->second; // Move to previous hour
tmp-=t->minute*60 + t->second; /* Move to previous hour */
*in_dst_time_gap= 1;
}
......
......@@ -1149,7 +1149,7 @@ bool check_change_password(THD *thd, const char *host, const char *user,
return(1);
}
uint len=strlen(new_password);
if (len != SCRAMBLED_PASSWORD_CHAR_LENGTH &&
if (len && len != SCRAMBLED_PASSWORD_CHAR_LENGTH &&
len != SCRAMBLED_PASSWORD_CHAR_LENGTH_323)
{
net_printf(thd, 0,
......
......@@ -2522,6 +2522,8 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
// to prevent natural join processing during PS re-execution
table->natural_join= 0;
if (cond_and->list.elements)
{
if (!table->outer_join) // Not left join
{
*conds= and_conds(*conds, cond_and);
......@@ -2548,6 +2550,7 @@ int setup_conds(THD *thd,TABLE_LIST *tables,COND **conds)
}
}
}
}
if (stmt)
{
......
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