Commit f72fc2a9 authored by unknown's avatar unknown

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb

into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
parents 33bc1b78 1b6b43fb
# #
# test range scan bounds # test range scan bounds
# output to mysql-test/t/ndb_range_bounds.test # give option --all to test all cases
#
# give option --all to generate all cases
# #
use strict; use strict;
use integer; use integer;
use Getopt::Long; use Getopt::Long;
use DBI;
my $opt_all = 0; my $opt_all = 0;
my $opt_cnt = 5; my $opt_cnt = 5;
GetOptions("all" => \$opt_all, "cnt=i" => \$opt_cnt) my $opt_verbose = 0;
or die "options are: --all --cnt=N"; GetOptions("all" => \$opt_all, "cnt=i" => \$opt_cnt, "verbose" => \$opt_verbose)
or die "options are: --all --cnt=N --verbose";
my $table = 't'; my $mysql_top = $ENV{MYSQL_TOP};
my $dsn = "dbi:mysql:database=test;host=localhost;mysql_read_default_file=$mysql_top/.target/var/my.cnf";
my $opts = { RaiseError => 0, PrintError => 0, AutoCommit => 1, };
print <<EOF; my $dbh;
--source include/have_ndb.inc my $sth;
my $sql;
--disable_warnings $dbh = DBI->connect($dsn, "root", undef, $opts) or die $DBI::errstr;
drop table if exists $table;
--enable_warnings
# test range scan bounds my $table = 't';
# generated by mysql-test/ndb/ndb_range_bounds.pl
# all selects must return 0
EOF $sql = "drop table if exists $table";
$dbh->do($sql) or die $DBI::errstr;
sub cut ($$@) { sub cut ($$$) {
my($op, $key, @v) = @_; my($op, $key, $val) = @_;
$op = '==' if $op eq '='; $op = '==' if $op eq '=';
my(@w); my(@w) = @$val;
eval "\@w = grep(\$_ $op $key, \@v)"; eval "\@w = grep(\$_ $op $key, \@w)";
$@ and die $@; $@ and die $@;
return @w; return [ @w ];
} }
sub mkdummy (\@) { sub mkdummy ($) {
my ($val) = @_; my ($val) = @_;
return { return {
'dummy' => 1, 'dummy' => 1,
'exp' => '9 = 9', 'exp' => '9 = 9',
'cnt' => scalar @$val, 'res' => $val,
}; };
} }
sub mkone ($$$\@) { sub mkone ($$$$) {
my($col, $op, $key, $val) = @_; my($col, $op, $key, $val) = @_;
my $cnt = scalar cut($op, $key, @$val); my $res = cut($op, $key, $val);
return { return {
'exp' => "$col $op $key", 'exp' => "$col $op $key",
'cnt' => $cnt, 'res' => $res,
}; };
} }
sub mktwo ($$$$$\@) { sub mktwo ($$$$$$) {
my($col, $op1, $key1, $op2, $key2, $val) = @_; my($col, $op1, $key1, $op2, $key2, $val) = @_;
my $cnt = scalar cut($op2, $key2, cut($op1, $key1, @$val)); my $res = cut($op2, $key2, cut($op1, $key1, $val));
return { return {
'exp' => "$col $op1 $key1 and $col $op2 $key2", 'exp' => "$col $op1 $key1 and $col $op2 $key2",
'cnt' => $cnt, 'res' => $res,
}; };
} }
sub mkall ($$$\@) { sub mkall ($$$$) {
my($col, $key1, $key2, $val) = @_; my($col, $key1, $key2, $val) = @_;
my @a = (); my @a = ();
my $p = mkdummy(@$val); my $p = mkdummy($val);
push(@a, $p) if $opt_all; push(@a, $p) if $opt_all;
my @ops = qw(< <= = >= >); my @ops = qw(< <= = >= >);
for my $op (@ops) { for my $op (@ops) {
my $p = mkone($col, $op, $key1, @$val); my $p = mkone($col, $op, $key1, $val);
push(@a, $p) if $opt_all || $p->{cnt} != 0; push(@a, $p) if $opt_all || @{$p->{res}} != 0;
} }
my @ops1 = $opt_all ? @ops : qw(= >= >); my @ops1 = $opt_all ? @ops : qw(= >= >);
my @ops2 = $opt_all ? @ops : qw(<= <); my @ops2 = $opt_all ? @ops : qw(<= <);
for my $op1 (@ops1) { for my $op1 (@ops1) {
for my $op2 (@ops2) { for my $op2 (@ops2) {
my $p = mktwo($col, $op1, $key1, $op2, $key2, @$val); my $p = mktwo($col, $op1, $key1, $op2, $key2, $val);
push(@a, $p) if $opt_all || $p->{cnt} != 0; push(@a, $p) if $opt_all || @{$p->{res}} != 0;
} }
} }
warn scalar(@a)." cases\n" if $opt_verbose;
return \@a; return \@a;
} }
my $casecnt = 0;
sub verify ($$$) {
my($sql, $ord, $res) = @_;
warn "$sql\n" if $opt_verbose;
$sth = $dbh->prepare($sql) or die "prepare: $sql: $DBI::errstr";
$sth->execute() or die "execute: $sql: $DBI::errstr";
#
# BUG: execute can return success on error so check again
#
$sth->err and die "execute: $sql: $DBI::errstr";
my @out = ();
for my $b (@{$res->[0]}) {
for my $c (@{$res->[1]}) {
for my $d (@{$res->[2]}) {
push(@out, [$b, $c, $d]);
}
}
}
if ($ord) {
@out = sort {
$ord * ($a->[0] - $b->[0]) ||
$ord * ($a->[1] - $b->[1]) ||
$ord * ($a->[2] - $b->[2]) ||
0
} @out;
}
my $cnt = scalar @out;
my $n = 0;
while (1) {
my $row = $sth->fetchrow_arrayref;
$row || last;
@$row == 3 or die "bad row: $sql: @$row";
for my $v (@$row) {
$v =~ s/^\s+|\s+$//g;
$v =~ /^\d+$/ or die "bad value: $sql: $v";
}
if ($ord) {
my $out = $out[$n];
$row->[0] == $out->[0] &&
$row->[1] == $out->[1] &&
$row->[2] == $out->[2] or
die "$sql: row $n: got row @$row != @$out";
}
$n++;
}
$sth->err and die "fetch: $sql: $DBI::errstr";
$n == $cnt or die "verify: $sql: got row count $n != $cnt";
$casecnt++;
}
for my $nn ("bcd", "") { for my $nn ("bcd", "") {
my %nn; my %nn;
for my $x (qw(b c d)) { for my $x (qw(b c d)) {
$nn{$x} = $nn =~ /$x/ ? "not null" : "null"; $nn{$x} = $nn =~ /$x/ ? "not null" : "null";
} }
print <<EOF; warn "create table\n";
$sql = <<EOF;
create table $table ( create table $table (
a int primary key, a int primary key,
b int $nn{b}, b int $nn{b},
c int $nn{c}, c int $nn{c},
d int $nn{d}, d int $nn{d},
index (b, c, d) index (b, c, d)
) engine=ndb; ) engine=ndb
EOF EOF
$dbh->do($sql) or die $DBI::errstr;
warn "insert\n";
$sql = "insert into $table values(?, ?, ?, ?)";
$sth = $dbh->prepare($sql) or die $DBI::errstr;
my @val = (0..($opt_cnt-1)); my @val = (0..($opt_cnt-1));
my $v0 = 0; my $v0 = 0;
for my $v1 (@val) { for my $v1 (@val) {
for my $v2 (@val) { for my $v2 (@val) {
for my $v3 (@val) { for my $v3 (@val) {
print "insert into $table values($v0, $v1, $v2, $v3);\n"; $sth->bind_param(1, $v0) or die $DBI::errstr;
$sth->bind_param(2, $v1) or die $DBI::errstr;
$sth->bind_param(3, $v2) or die $DBI::errstr;
$sth->bind_param(4, $v3) or die $DBI::errstr;
$sth->execute or die $DBI::errstr;
$v0++; $v0++;
} }
} }
} }
warn "generate cases\n";
my $key1 = 1; my $key1 = 1;
my $key2 = 3; my $key2 = 3;
my $a1 = mkall('b', $key1, $key2, @val); my $a1 = mkall('b', $key1, $key2, \@val);
my $a2 = mkall('c', $key1, $key2, @val); my $a2 = mkall('c', $key1, $key2, \@val);
my $a3 = mkall('d', $key1, $key2, @val); my $a3 = mkall('d', $key1, $key2, \@val);
for my $p1 (@$a1) { warn "select\n";
my $cnt1 = $p1->{cnt} * @val * @val; for my $ord (0, +1, -1) {
print "select count(*) - $cnt1 from $table"; my $orderby =
print " where $p1->{exp};\n"; $ord == 0 ? "" :
for my $p2 (@$a2) { $ord == +1 ? " order by b, c, d" :
my $cnt2 = $p1->{cnt} * $p2->{cnt} * @val; $ord == -1 ? " order by b desc, c desc, d desc" : die "not here";
print "select count(*) - $cnt2 from $table"; for my $p1 (@$a1) {
print " where $p1->{exp} and $p2->{exp};\n"; my $res = [ $p1->{res}, \@val, \@val ];
for my $p3 (@$a3) { $sql = "select b, c, d from $table" .
my $cnt3 = $p1->{cnt} * $p2->{cnt} * $p3->{cnt}; " where $p1->{exp}" .
print "select count(*) - $cnt3 from $table"; $orderby;
print " where $p1->{exp} and $p2->{exp} and $p3->{exp};\n"; verify($sql, $ord, $res);
for my $p2 (@$a2) {
my $res = [ $p1->{res}, $p2->{res}, \@val ];
$sql = "select b, c, d from $table" .
" where $p1->{exp} and $p2->{exp}" .
$orderby;
verify($sql, $ord, $res);
for my $p3 (@$a3) {
my $res = [ $p1->{res}, $p2->{res}, $p3->{res} ];
$sql = "select b, c, d from $table" .
" where $p1->{exp} and $p2->{exp} and $p3->{exp}" .
$orderby;
verify($sql, $ord, $res);
}
} }
} }
} }
print <<EOF; warn "drop table\n";
drop table $table; $sql = "drop table $table";
EOF $dbh->do($sql) or die $DBI::errstr;
} }
warn "verified $casecnt cases\n";
warn "done\n";
# vim: set sw=2: # vim: set sw=2:
...@@ -275,6 +275,114 @@ a b c ...@@ -275,6 +275,114 @@ a b c
1 1 1 1 1 1
4 4 NULL 4 4 NULL
drop table t1; drop table t1;
create table t1 (
a int unsigned primary key,
b int unsigned,
c char(10),
key bc (b, c)
) engine=ndb;
insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e');
insert into t1 select a*7,10*b,'f' from t1;
insert into t1 select a*13,10*b,'g' from t1;
insert into t1 select a*17,10*b,'h' from t1;
insert into t1 select a*19,10*b,'i' from t1;
insert into t1 select a*23,10*b,'j' from t1;
insert into t1 select a*29,10*b,'k' from t1;
select b, c from t1 where b <= 10 and c <'f' order by b, c;
b c
1 a
2 b
3 c
4 d
5 e
select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc;
b c
5 e
4 d
3 c
2 b
1 a
select b, c from t1 where b=4000 and c<'k' order by b, c;
b c
4000 h
4000 i
4000 i
4000 i
4000 j
4000 j
4000 j
4000 j
4000 j
4000 j
select b, c from t1 where b=4000 and c<'k' order by b desc, c desc;
b c
4000 j
4000 j
4000 j
4000 j
4000 j
4000 j
4000 i
4000 i
4000 i
4000 h
select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c;
b c
1000 h
1000 i
1000 i
1000 i
2000 h
2000 i
2000 i
2000 i
3000 h
3000 i
3000 i
3000 i
4000 h
4000 i
4000 i
4000 i
5000 h
5000 i
5000 i
5000 i
10000 i
20000 i
30000 i
40000 i
50000 i
select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc;
b c
50000 i
40000 i
30000 i
20000 i
10000 i
5000 i
5000 i
5000 i
5000 h
4000 i
4000 i
4000 i
4000 h
3000 i
3000 i
3000 i
3000 h
2000 i
2000 i
2000 i
2000 h
1000 i
1000 i
1000 i
1000 h
select min(b), max(b) from t1;
min(b) max(b)
1 5000000
CREATE TABLE test1 ( CREATE TABLE test1 (
SubscrID int(11) NOT NULL auto_increment, SubscrID int(11) NOT NULL auto_increment,
UsrID int(11) NOT NULL default '0', UsrID int(11) NOT NULL default '0',
......
...@@ -147,6 +147,35 @@ select * from t1 use index (bc) where b < 4 order by a; ...@@ -147,6 +147,35 @@ select * from t1 use index (bc) where b < 4 order by a;
select * from t1 use index (bc) where b IS NOT NULL order by a; select * from t1 use index (bc) where b IS NOT NULL order by a;
drop table t1; drop table t1;
#
# Order by again, including descending.
#
create table t1 (
a int unsigned primary key,
b int unsigned,
c char(10),
key bc (b, c)
) engine=ndb;
insert into t1 values(1,1,'a'),(2,2,'b'),(3,3,'c'),(4,4,'d'),(5,5,'e');
insert into t1 select a*7,10*b,'f' from t1;
insert into t1 select a*13,10*b,'g' from t1;
insert into t1 select a*17,10*b,'h' from t1;
insert into t1 select a*19,10*b,'i' from t1;
insert into t1 select a*23,10*b,'j' from t1;
insert into t1 select a*29,10*b,'k' from t1;
#
select b, c from t1 where b <= 10 and c <'f' order by b, c;
select b, c from t1 where b <= 10 and c <'f' order by b desc, c desc;
#
select b, c from t1 where b=4000 and c<'k' order by b, c;
select b, c from t1 where b=4000 and c<'k' order by b desc, c desc;
select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b, c;
select b, c from t1 where 1000<=b and b<=100000 and c<'j' order by b desc, c desc;
#
select min(b), max(b) from t1;
# #
# Bug #6435 # Bug #6435
CREATE TABLE test1 ( CREATE TABLE test1 (
......
...@@ -429,7 +429,6 @@ ClusterMgr::reportDisconnected(NodeId nodeId){ ...@@ -429,7 +429,6 @@ ClusterMgr::reportDisconnected(NodeId nodeId){
noOfConnectedNodes--; noOfConnectedNodes--;
theNodes[nodeId].connected = false; theNodes[nodeId].connected = false;
theNodes[nodeId].m_info.m_connectCount ++;
reportNodeFailed(nodeId); reportNodeFailed(nodeId);
} }
...@@ -439,18 +438,22 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){ ...@@ -439,18 +438,22 @@ ClusterMgr::reportNodeFailed(NodeId nodeId){
Node & theNode = theNodes[nodeId]; Node & theNode = theNodes[nodeId];
theNode.m_alive = false; theNode.m_alive = false;
theNode.m_info.m_connectCount ++;
if(theNode.connected) if(theNode.connected)
{
theFacade.doDisconnect(nodeId); theFacade.doDisconnect(nodeId);
}
const bool report = (theNode.m_state.startLevel != NodeState::SL_NOTHING); const bool report = (theNode.m_state.startLevel != NodeState::SL_NOTHING);
theNode.m_state.startLevel = NodeState::SL_NOTHING; theNode.m_state.startLevel = NodeState::SL_NOTHING;
if(report){ if(report)
{
theFacade.ReportNodeDead(nodeId); theFacade.ReportNodeDead(nodeId);
} }
theNode.nfCompleteRep = false; theNode.nfCompleteRep = false;
if(noOfConnectedNodes == 0){ if(noOfConnectedNodes == 0){
NFCompleteRep rep; NFCompleteRep rep;
for(Uint32 i = 1; i<MAX_NODES; i++){ for(Uint32 i = 1; i<MAX_NODES; i++){
......
...@@ -1447,6 +1447,7 @@ NdbConnection::receiveTC_COMMITREF(NdbApiSignal* aSignal) ...@@ -1447,6 +1447,7 @@ NdbConnection::receiveTC_COMMITREF(NdbApiSignal* aSignal)
setOperationErrorCodeAbort(ref->errorCode); setOperationErrorCodeAbort(ref->errorCode);
theCommitStatus = Aborted; theCommitStatus = Aborted;
theCompletionStatus = CompletedFailure; theCompletionStatus = CompletedFailure;
theReturnStatus = ReturnFailure;
return 0; return 0;
} else { } else {
#ifdef NDB_NO_DROPPED_SIGNAL #ifdef NDB_NO_DROPPED_SIGNAL
...@@ -1496,6 +1497,7 @@ NdbConnection::receiveTCROLLBACKREF(NdbApiSignal* aSignal) ...@@ -1496,6 +1497,7 @@ NdbConnection::receiveTCROLLBACKREF(NdbApiSignal* aSignal)
setOperationErrorCodeAbort(aSignal->readData(4)); setOperationErrorCodeAbort(aSignal->readData(4));
theCommitStatus = Aborted; theCommitStatus = Aborted;
theCompletionStatus = CompletedFailure; theCompletionStatus = CompletedFailure;
theReturnStatus = ReturnFailure;
return 0; return 0;
} else { } else {
#ifdef NDB_NO_DROPPED_SIGNAL #ifdef NDB_NO_DROPPED_SIGNAL
...@@ -1584,6 +1586,7 @@ from other transactions. ...@@ -1584,6 +1586,7 @@ from other transactions.
done = 1; done = 1;
tOp->setErrorCode(4119); tOp->setErrorCode(4119);
theCompletionStatus = CompletedFailure; theCompletionStatus = CompletedFailure;
theReturnStatus = NdbConnection::ReturnFailure;
} }
} }
tNoComp += done; tNoComp += done;
...@@ -1613,6 +1616,7 @@ from other transactions. ...@@ -1613,6 +1616,7 @@ from other transactions.
/**********************************************************************/ /**********************************************************************/
theError.code = 4011; theError.code = 4011;
theCompletionStatus = CompletedFailure; theCompletionStatus = CompletedFailure;
theReturnStatus = NdbConnection::ReturnFailure;
theCommitStatus = Aborted; theCommitStatus = Aborted;
return 0; return 0;
}//if }//if
...@@ -1672,6 +1676,7 @@ NdbConnection::receiveTCKEY_FAILCONF(const TcKeyFailConf * failConf) ...@@ -1672,6 +1676,7 @@ NdbConnection::receiveTCKEY_FAILCONF(const TcKeyFailConf * failConf)
case NdbOperation::OpenScanRequest: case NdbOperation::OpenScanRequest:
case NdbOperation::OpenRangeScanRequest: case NdbOperation::OpenRangeScanRequest:
theCompletionStatus = CompletedFailure; theCompletionStatus = CompletedFailure;
theReturnStatus = NdbConnection::ReturnFailure;
setOperationErrorCodeAbort(4115); setOperationErrorCodeAbort(4115);
tOp = NULL; tOp = NULL;
break; break;
...@@ -1720,6 +1725,7 @@ NdbConnection::receiveTCKEY_FAILREF(NdbApiSignal* aSignal) ...@@ -1720,6 +1725,7 @@ NdbConnection::receiveTCKEY_FAILREF(NdbApiSignal* aSignal)
*/ */
theCompletionStatus = NdbConnection::CompletedSuccess; theCompletionStatus = NdbConnection::CompletedSuccess;
} else { } else {
theReturnStatus = NdbConnection::ReturnFailure;
theCompletionStatus = NdbConnection::CompletedFailure; theCompletionStatus = NdbConnection::CompletedFailure;
theError.code = 4031; theError.code = 4031;
}//if }//if
...@@ -1779,6 +1785,7 @@ NdbConnection::receiveTCINDXCONF(const TcIndxConf * indxConf, ...@@ -1779,6 +1785,7 @@ NdbConnection::receiveTCINDXCONF(const TcIndxConf * indxConf,
theError.code = 4011; theError.code = 4011;
theCompletionStatus = NdbConnection::CompletedFailure; theCompletionStatus = NdbConnection::CompletedFailure;
theCommitStatus = NdbConnection::Aborted; theCommitStatus = NdbConnection::Aborted;
theReturnStatus = NdbConnection::ReturnFailure;
return 0; return 0;
}//if }//if
if (tNoComp >= tNoSent) { if (tNoComp >= tNoSent) {
...@@ -1818,6 +1825,7 @@ NdbConnection::receiveTCINDXREF( NdbApiSignal* aSignal) ...@@ -1818,6 +1825,7 @@ NdbConnection::receiveTCINDXREF( NdbApiSignal* aSignal)
/**********************************************************************/ /**********************************************************************/
theCompletionStatus = NdbConnection::CompletedFailure; theCompletionStatus = NdbConnection::CompletedFailure;
theCommitStatus = NdbConnection::Aborted; theCommitStatus = NdbConnection::Aborted;
theReturnStatus = NdbConnection::ReturnFailure;
return 0; return 0;
} else { } else {
#ifdef NDB_NO_DROPPED_SIGNAL #ifdef NDB_NO_DROPPED_SIGNAL
...@@ -1891,6 +1899,7 @@ NdbConnection::OpCompleteSuccess() ...@@ -1891,6 +1899,7 @@ NdbConnection::OpCompleteSuccess()
setOperationErrorCodeAbort(4113); // Too many operations, setOperationErrorCodeAbort(4113); // Too many operations,
// stop waiting for more // stop waiting for more
theCompletionStatus = NdbConnection::CompletedFailure; theCompletionStatus = NdbConnection::CompletedFailure;
theReturnStatus = NdbConnection::ReturnFailure;
return 0; return 0;
}//if }//if
}//NdbConnection::OpCompleteSuccess() }//NdbConnection::OpCompleteSuccess()
...@@ -2020,22 +2029,28 @@ NdbConnection::report_node_failure(Uint32 id){ ...@@ -2020,22 +2029,28 @@ NdbConnection::report_node_failure(Uint32 id){
const Uint32 len = TcKeyConf::SimpleReadBit | id; const Uint32 len = TcKeyConf::SimpleReadBit | id;
Uint32 tNoComp = theNoOfOpCompleted; Uint32 tNoComp = theNoOfOpCompleted;
Uint32 tNoSent = theNoOfOpSent; Uint32 tNoSent = theNoOfOpSent;
Uint32 count = 0;
while(tmp != 0) while(tmp != 0)
{ {
if(tmp->theReceiver.m_expected_result_length == len && if(tmp->theReceiver.m_expected_result_length == len &&
tmp->theReceiver.m_received_result_length == 0) tmp->theReceiver.m_received_result_length == 0)
{ {
tNoComp++; count++;
tmp->theError.code = 4119; tmp->theError.code = 4119;
} }
tmp = tmp->next(); tmp = tmp->next();
} }
tNoComp += count;
theNoOfOpCompleted = tNoComp; theNoOfOpCompleted = tNoComp;
if(tNoComp == tNoSent) if(count)
{ {
theError.code = 4119; theReturnStatus = NdbConnection::ReturnFailure;
theCompletionStatus = NdbConnection::CompletedFailure; if(tNoComp == tNoSent)
return 1; {
theError.code = 4119;
theCompletionStatus = NdbConnection::CompletedFailure;
return 1;
}
} }
return 0; return 0;
} }
...@@ -301,6 +301,7 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId) ...@@ -301,6 +301,7 @@ Ndb::abortTransactionsAfterNodeFailure(Uint16 aNodeId)
intact since the node was failing and they were aborted. Thus we intact since the node was failing and they were aborted. Thus we
set commit state to Aborted and set state to release on close. set commit state to Aborted and set state to release on close.
*/ */
localCon->theReturnStatus = NdbConnection::ReturnFailure;
localCon->theCommitStatus = NdbConnection::Aborted; localCon->theCommitStatus = NdbConnection::Aborted;
localCon->theReleaseOnClose = true; localCon->theReleaseOnClose = true;
completedTransaction(localCon); completedTransaction(localCon);
......
...@@ -311,7 +311,7 @@ int runDirtyRead(NDBT_Context* ctx, NDBT_Step* step){ ...@@ -311,7 +311,7 @@ int runDirtyRead(NDBT_Context* ctx, NDBT_Step* step){
int id = i % restarter.getNumDbNodes(); int id = i % restarter.getNumDbNodes();
int nodeId = restarter.getDbNodeId(id); int nodeId = restarter.getDbNodeId(id);
ndbout << "Restart node " << nodeId << endl; ndbout << "Restart node " << nodeId << endl;
restarter.insertErrorInAllNodes(5041); restarter.insertErrorInNode(nodeId, 5041);
restarter.insertErrorInAllNodes(8048 + (i & 1)); restarter.insertErrorInAllNodes(8048 + (i & 1));
for(int j = 0; j<records; j++){ for(int j = 0; j<records; j++){
......
...@@ -59,7 +59,7 @@ client_settings.h: Makefile ...@@ -59,7 +59,7 @@ client_settings.h: Makefile
rm -f $(srcdir)/client_settings.h rm -f $(srcdir)/client_settings.h
@LN_CP_F@ $(top_srcdir)/sql/client_settings.h $(srcdir)/client_settings.h @LN_CP_F@ $(top_srcdir)/sql/client_settings.h $(srcdir)/client_settings.h
EXTRA_PROGRAMS= mysqlmanager bin_PROGRAMS= mysqlmanager
mysqlmanager_SOURCES= command.cc command.h mysqlmanager.cc \ mysqlmanager_SOURCES= command.cc command.h mysqlmanager.cc \
manager.h manager.cc log.h log.cc \ manager.h manager.cc log.h log.cc \
......
This diff is collapsed.
...@@ -236,6 +236,7 @@ class ha_ndbcluster: public handler ...@@ -236,6 +236,7 @@ class ha_ndbcluster: public handler
int index_prev(byte *buf); int index_prev(byte *buf);
int index_first(byte *buf); int index_first(byte *buf);
int index_last(byte *buf); int index_last(byte *buf);
int index_read_last(byte * buf, const byte * key, uint key_len);
int rnd_init(bool scan); int rnd_init(bool scan);
int rnd_end(); int rnd_end();
int rnd_next(byte *buf); int rnd_next(byte *buf);
...@@ -322,7 +323,7 @@ class ha_ndbcluster: public handler ...@@ -322,7 +323,7 @@ class ha_ndbcluster: public handler
byte *buf); byte *buf);
int ordered_index_scan(const key_range *start_key, int ordered_index_scan(const key_range *start_key,
const key_range *end_key, const key_range *end_key,
bool sorted, byte* buf); bool sorted, bool descending, byte* buf);
int full_table_scan(byte * buf); int full_table_scan(byte * buf);
int fetch_next(NdbScanOperation* op); int fetch_next(NdbScanOperation* op);
int next_result(byte *buf); int next_result(byte *buf);
......
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