diff options
author | unknown <ram@mysql.r18.ru> | 2003-07-03 18:21:59 +0500 |
---|---|---|
committer | unknown <ram@mysql.r18.ru> | 2003-07-03 18:21:59 +0500 |
commit | 6d1f44e4fdc3eb89ae5a6e5c21660ab5c233819f (patch) | |
tree | 587db7d7c6f36901f05136752a0ab428e06ab355 /heap | |
parent | 912d044fcfa6f2ac2f55f0a12ad6e92ce9dd73d9 (diff) | |
download | mariadb-git-6d1f44e4fdc3eb89ae5a6e5c21660ab5c233819f.tar.gz |
Fix and test-case for the bug #775: SELECT misses rows in indexed HEAP table columns.
heap/hp_open.c:
Fix for the bug #775: SELECT misses rows in indexed HEAP table columns.
mysql-test/r/heap.result:
Test-case for the bug #775: SELECT misses rows in indexed HEAP table columns.
mysql-test/t/heap.test:
Test-case for the bug #775: SELECT misses rows in indexed HEAP table columns.
Diffstat (limited to 'heap')
-rw-r--r-- | heap/hp_open.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/heap/hp_open.c b/heap/hp_open.c index 1bb28e5ffdf..ec8b5fea904 100644 --- a/heap/hp_open.c +++ b/heap/hp_open.c @@ -46,9 +46,12 @@ HP_INFO *heap_open(const char *name, int mode, uint keys, HP_KEYDEF *keydef, for (j=length=0 ; j < keydef[i].keysegs; j++) { length+=keydef[i].seg[j].length; - if (keydef[i].seg[j].null_bit && - !(keydef[i].flag & HA_NULL_ARE_EQUAL)) - keydef[i].flag |= HA_NULL_PART_KEY; + if (keydef[i].seg[j].null_bit) + { + length++; + if (!(keydef[i].flag & HA_NULL_ARE_EQUAL)) + keydef[i].flag |= HA_NULL_PART_KEY; + } } keydef[i].length=length; if (length > max_length) |