diff options
author | unknown <pekka@mysql.com> | 2005-09-01 14:12:48 +0200 |
---|---|---|
committer | unknown <pekka@mysql.com> | 2005-09-01 14:12:48 +0200 |
commit | d2a0a87997f12d1ace6a02ebe5abc8964a4ac4a0 (patch) | |
tree | 68cf0e632655d8b72606298b573e8236562c6ff5 /sql | |
parent | b5f87344879b501a05758a2c72d38c3f378e9a40 (diff) | |
download | mariadb-git-d2a0a87997f12d1ace6a02ebe5abc8964a4ac4a0.tar.gz |
ndb - fix ha_ndb crash on ordered index on nullable varchar
mysql-test/r/ndb_index_ordered.result:
fix ha_ndb crash on ordered index on nullable varchar
mysql-test/t/ndb_index_ordered.test:
fix ha_ndb crash on ordered index on nullable varchar
sql/ha_ndbcluster.cc:
fix ha_ndb crash on ordered index on nullable varchar
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_ndbcluster.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 5353daf95e6..a39f541b992 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -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(); |