diff options
author | unknown <monty@mashka.mysql.fi> | 2002-12-02 17:52:22 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2002-12-02 17:52:22 +0200 |
commit | d6bc5fb21ec0673ed188d0a8c0cc69cc717212da (patch) | |
tree | 1342a5bdccc313accd5dfa8e27c487ddb0994720 /heap | |
parent | 0bb120c48a640c96a3b1db4ac7d9bcb6a084f4c7 (diff) | |
download | mariadb-git-d6bc5fb21ec0673ed188d0a8c0cc69cc717212da.tar.gz |
Fixed bug when creating keys in temporary HEAP tables.
(This caused the DISTINCT test to fail)
Removed one inline as this caused compiler problems
heap/hp_create.c:
Comment
heap/hp_update.c:
Indentation cleanup
heap/hp_write.c:
Indentation cleanup
mysql-test/mysql-test-run.sh:
Better options for valgrind
sql/item_sum.cc:
Removed inline as this caused compiler problems with gcc 3.2
(Was also non standard usage of inline)
sql/item_sum.h:
Removed inline as this caused compiler problems with gcc 3.2
sql/sql_class.cc:
Fixed reference to uninitialized value
sql/sql_lex.cc:
Indentation cleanup
sql/sql_select.cc:
Fixed bug when creating keys in temporary HEAP tables.
Diffstat (limited to 'heap')
-rw-r--r-- | heap/hp_create.c | 1 | ||||
-rw-r--r-- | heap/hp_update.c | 6 | ||||
-rw-r--r-- | heap/hp_write.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/heap/hp_create.c b/heap/hp_create.c index 40b8202d94f..5265607ce53 100644 --- a/heap/hp_create.c +++ b/heap/hp_create.c @@ -140,6 +140,7 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, share->auto_key= create_info->auto_key; share->auto_key_type= create_info->auto_key_type; share->auto_increment= create_info->auto_increment; + /* Must be allocated separately for rename to work */ if (!(share->name= my_strdup(name,MYF(0)))) { my_free((gptr) share,MYF(0)); diff --git a/heap/hp_update.c b/heap/hp_update.c index dd7374f506c..b789ab82b84 100644 --- a/heap/hp_update.c +++ b/heap/hp_update.c @@ -62,7 +62,8 @@ int heap_update(HP_INFO *info, const byte *old, const byte *heap_new) /* we don't need to delete non-inserted key from rb-tree */ if ((*keydef->write_key)(info, keydef, old, pos)) { - if (++(share->records) == share->blength) share->blength+= share->blength; + if (++(share->records) == share->blength) + share->blength+= share->blength; DBUG_RETURN(my_errno); } keydef--; @@ -78,6 +79,7 @@ int heap_update(HP_INFO *info, const byte *old, const byte *heap_new) keydef--; } } - if (++(share->records) == share->blength) share->blength+= share->blength; + if (++(share->records) == share->blength) + share->blength+= share->blength; DBUG_RETURN(my_errno); } /* heap_update */ diff --git a/heap/hp_write.c b/heap/hp_write.c index 9edd897eb34..87211d4c224 100644 --- a/heap/hp_write.c +++ b/heap/hp_write.c @@ -155,7 +155,7 @@ static byte *next_free_record_pos(HP_SHARE *info) /* Write a hash-key to the hash-index */ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, - const byte *record, byte *recpos) + const byte *record, byte *recpos) { HP_SHARE *share = info->s; int flag; |