summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mysql-test/r/ndb_alter_table.result2
-rw-r--r--mysql-test/r/ndb_index_unique.result2
-rw-r--r--ndb/tools/waiter.cpp10
-rw-r--r--sql/ha_ndbcluster.cc2
4 files changed, 8 insertions, 8 deletions
diff --git a/mysql-test/r/ndb_alter_table.result b/mysql-test/r/ndb_alter_table.result
index 4e7f4b2a72b..f55f680e972 100644
--- a/mysql-test/r/ndb_alter_table.result
+++ b/mysql-test/r/ndb_alter_table.result
@@ -18,7 +18,7 @@ col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
col6 int not null, to_be_deleted int) ENGINE=ndbcluster;
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 0 NULL NULL NULL latin1_swedish_ci NULL
+t1 ndbcluster 9 Dynamic 100 0 0 NULL 0 0 1 NULL NULL NULL latin1_swedish_ci NULL
insert into t1 values
(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7), (7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7), (99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7);
show table status;
diff --git a/mysql-test/r/ndb_index_unique.result b/mysql-test/r/ndb_index_unique.result
index 4362de94b48..f1407dfe78d 100644
--- a/mysql-test/r/ndb_index_unique.result
+++ b/mysql-test/r/ndb_index_unique.result
@@ -242,7 +242,7 @@ select * from t1 where cv = 'test';
cid cv
select * from t2 where cap = 'another dummy';
cid cap
-0 another dummy
+1 another dummy
select * from t4 where uid = 1 and gid=1 and rid=2 and cid=4;
uid gid rid cid
1 1 2 4
diff --git a/ndb/tools/waiter.cpp b/ndb/tools/waiter.cpp
index 86d34066c55..63469c6d746 100644
--- a/ndb/tools/waiter.cpp
+++ b/ndb/tools/waiter.cpp
@@ -27,17 +27,17 @@
#include <NDBT.hpp>
int
-waitClusterStatus(const char* _addr,
- ndb_mgm_node_status _status= NDB_MGM_NODE_STATUS_STARTED,
- unsigned int _timeout= 120);
+waitClusterStatus(const char* _addr, ndb_mgm_node_status _status, unsigned int _timeout);
int main(int argc, const char** argv){
const char* _hostName = NULL;
int _no_contact = 0;
int _help = 0;
+ int _timeout = 120;
struct getargs args[] = {
+ { "timeout", 0, arg_integer, &_timeout, "Timeout to wait", "#" },
{ "no-contact", 0, arg_flag, &_no_contact, "Wait for cluster no contact", "" },
{ "usage", '?', arg_flag, &_help, "Print help", "" }
};
@@ -92,9 +92,9 @@ int main(int argc, const char** argv){
}
if (_no_contact) {
- if (waitClusterStatus(_hostName, NDB_MGM_NODE_STATUS_NO_CONTACT) != 0)
+ if (waitClusterStatus(_hostName, NDB_MGM_NODE_STATUS_NO_CONTACT, _timeout) != 0)
return NDBT_ProgramExit(NDBT_FAILED);
- } else if (waitClusterStatus(_hostName) != 0)
+ } else if (waitClusterStatus(_hostName, NDB_MGM_NODE_STATUS_STARTED, _timeout) != 0)
return NDBT_ProgramExit(NDBT_FAILED);
return NDBT_ProgramExit(NDBT_OK);
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index ea9a6f710cf..8b058db8c1d 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -2845,7 +2845,7 @@ static int create_ndb_column(NDBCOL &col,
{
col.setAutoIncrement(TRUE);
ulonglong value= info->auto_increment_value ?
- info->auto_increment_value -1 : (ulonglong) 0;
+ info->auto_increment_value : (ulonglong) 1;
DBUG_PRINT("info", ("Autoincrement key, initial: %llu", value));
col.setAutoIncrementInitialValue(value);
}