Loading configure.in +6 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,12 @@ DOT_FRM_VERSION=6 # See the libtool docs for information on how to do shared lib versions. SHARED_LIB_VERSION=15:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 NDB_VERSION_BUILD=18 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? # Remember that regexps needs to quote [ and ] since this is run through m4 MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"` Loading mysql-test/r/ndb_basic.result +16 −0 Original line number Diff line number Diff line Loading @@ -677,3 +677,19 @@ select * from atablewithareallylongandirritatingname; a 2 drop table atablewithareallylongandirritatingname; create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); select * from t1 order by f1; f1 f2 f3 111111 aaaaaa 1 222222 bbbbbb 2 select * from t1 order by f2; f1 f2 f3 111111 aaaaaa 1 222222 bbbbbb 2 select * from t1 order by f3; f1 f2 f3 111111 aaaaaa 1 222222 bbbbbb 2 drop table t1; mysql-test/t/ndb_basic.test +11 −0 Original line number Diff line number Diff line Loading @@ -623,3 +623,14 @@ create table atablewithareallylongandirritatingname (a int); insert into atablewithareallylongandirritatingname values (2); select * from atablewithareallylongandirritatingname; drop table atablewithareallylongandirritatingname; # # Bug#15682 # create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); select * from t1 order by f1; select * from t1 order by f2; select * from t1 order by f3; drop table t1; sql/ha_ndbcluster.cc +20 −2 Original line number Diff line number Diff line Loading @@ -3014,8 +3014,26 @@ void ha_ndbcluster::position(const byte *record) } *buff++= 0; } memcpy(buff, record + key_part->offset, key_part->length); buff += key_part->length; size_t len = key_part->length; const byte * ptr = record + key_part->offset; Field *field = key_part->field; if ((field->type() == MYSQL_TYPE_VARCHAR) && ((Field_varstring*)field)->length_bytes == 1) { /** * Keys always use 2 bytes length */ buff[0] = ptr[0]; buff[1] = 0; memcpy(buff+2, ptr + 1, len); len += 2; } else { memcpy(buff, ptr, len); } buff += len; } } else Loading storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,8 @@ #define ZALREADYEXIST 630 #define ZINCONSISTENTHASHINDEX 892 #define ZNOTUNIQUE 893 #define ZINVALID_KEY 290 #endif class Dbtc: public SimulatedBlock { Loading Loading
configure.in +6 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,12 @@ DOT_FRM_VERSION=6 # See the libtool docs for information on how to do shared lib versions. SHARED_LIB_VERSION=15:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 NDB_VERSION_BUILD=18 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? # Remember that regexps needs to quote [ and ] since this is run through m4 MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"` Loading
mysql-test/r/ndb_basic.result +16 −0 Original line number Diff line number Diff line Loading @@ -677,3 +677,19 @@ select * from atablewithareallylongandirritatingname; a 2 drop table atablewithareallylongandirritatingname; create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); select * from t1 order by f1; f1 f2 f3 111111 aaaaaa 1 222222 bbbbbb 2 select * from t1 order by f2; f1 f2 f3 111111 aaaaaa 1 222222 bbbbbb 2 select * from t1 order by f3; f1 f2 f3 111111 aaaaaa 1 222222 bbbbbb 2 drop table t1;
mysql-test/t/ndb_basic.test +11 −0 Original line number Diff line number Diff line Loading @@ -623,3 +623,14 @@ create table atablewithareallylongandirritatingname (a int); insert into atablewithareallylongandirritatingname values (2); select * from atablewithareallylongandirritatingname; drop table atablewithareallylongandirritatingname; # # Bug#15682 # create table t1 (f1 varchar(50), f2 text,f3 int, primary key(f1)) engine=NDB; insert into t1 (f1,f2,f3)VALUES("111111","aaaaaa",1); insert into t1 (f1,f2,f3)VALUES("222222","bbbbbb",2); select * from t1 order by f1; select * from t1 order by f2; select * from t1 order by f3; drop table t1;
sql/ha_ndbcluster.cc +20 −2 Original line number Diff line number Diff line Loading @@ -3014,8 +3014,26 @@ void ha_ndbcluster::position(const byte *record) } *buff++= 0; } memcpy(buff, record + key_part->offset, key_part->length); buff += key_part->length; size_t len = key_part->length; const byte * ptr = record + key_part->offset; Field *field = key_part->field; if ((field->type() == MYSQL_TYPE_VARCHAR) && ((Field_varstring*)field)->length_bytes == 1) { /** * Keys always use 2 bytes length */ buff[0] = ptr[0]; buff[1] = 0; memcpy(buff+2, ptr + 1, len); len += 2; } else { memcpy(buff, ptr, len); } buff += len; } } else Loading
storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,8 @@ #define ZALREADYEXIST 630 #define ZINCONSISTENTHASHINDEX 892 #define ZNOTUNIQUE 893 #define ZINVALID_KEY 290 #endif class Dbtc: public SimulatedBlock { Loading