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

into  mysql.com:/export/space/pekka/ndb/version/my50
This commit is contained in:
pekka@mysql.com 2005-09-01 14:23:46 +02:00
commit d78eee0376
3 changed files with 13 additions and 1 deletions

View file

@ -652,3 +652,9 @@ show tables;
Tables_in_test
t1
drop table t1;
create table t1 (a int, c varchar(10),
primary key using hash (a), index(c)) engine=ndb;
insert into t1 (a, c) values (1,'aaa'),(3,'bbb');
select count(*) from t1 where c<'bbb';
count(*)
1

View file

@ -349,4 +349,10 @@ select a from t1 where b = 2;
show tables;
drop table t1;
# mysqld 5.0.13 crash, no bug#
create table t1 (a int, c varchar(10),
primary key using hash (a), index(c)) engine=ndb;
insert into t1 (a, c) values (1,'aaa'),(3,'bbb');
select count(*) from t1 where c<'bbb';
# End of 4.1 tests

View file

@ -1214,7 +1214,7 @@ inline ulong ha_ndbcluster::index_flags(uint idx_no, uint part,
static void shrink_varchar(Field* field, const byte* & ptr, char* buf)
{
if (field->type() == MYSQL_TYPE_VARCHAR) {
if (field->type() == MYSQL_TYPE_VARCHAR && ptr != NULL) {
Field_varstring* f= (Field_varstring*)field;
if (f->length_bytes == 1) {
uint pack_len= field->pack_length();