diff options
author | unknown <istruewing@chilla.local> | 2007-03-21 15:55:14 +0100 |
---|---|---|
committer | unknown <istruewing@chilla.local> | 2007-03-21 15:55:14 +0100 |
commit | 19630640976ebeb5dae65483d23742fdf64aba26 (patch) | |
tree | f372d969016aee0dc8a6b78e859d80baa9e48131 | |
parent | c7ce63fb0ba339ffa15a36515831660225a49e53 (diff) | |
parent | db573e637c2ba66f214f7e1e2172ce9efeca0db0 (diff) | |
download | mariadb-git-19630640976ebeb5dae65483d23742fdf64aba26.tar.gz |
Merge chilla.local:/home/mydev/mysql-4.1-bug26996
into chilla.local:/home/mydev/mysql-5.0-bug26996
heap/hp_write.c:
Auto merged
mysql-test/r/heap_btree.result:
Auto merged
mysql-test/t/heap_btree.test:
Bug#26996 - Update of a Field in a Memory Table ends with wrong result
Manual merge from 4.1
-rw-r--r-- | heap/hp_write.c | 1 | ||||
-rw-r--r-- | mysql-test/r/heap_btree.result | 15 | ||||
-rw-r--r-- | mysql-test/t/heap_btree.test | 14 |
3 files changed, 29 insertions, 1 deletions
diff --git a/heap/hp_write.c b/heap/hp_write.c index 8a392d54c51..1d27306c704 100644 --- a/heap/hp_write.c +++ b/heap/hp_write.c @@ -105,7 +105,6 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record, heap_rb_param custom_arg; uint old_allocated; - info->last_pos= NULL; /* For heap_rnext/heap_rprev */ custom_arg.keyseg= keyinfo->seg; custom_arg.key_length= hp_rb_make_key(keyinfo, info->recbuf, record, recpos); if (keyinfo->flag & HA_NOSAME) diff --git a/mysql-test/r/heap_btree.result b/mysql-test/r/heap_btree.result index 5b9c7f2244f..7a0e46a2a1c 100644 --- a/mysql-test/r/heap_btree.result +++ b/mysql-test/r/heap_btree.result @@ -280,6 +280,21 @@ a 1 1 drop table t1; +CREATE TABLE t1 ( +c1 CHAR(3), +c2 INTEGER, +KEY USING BTREE(c1), +KEY USING BTREE(c2) +) ENGINE= MEMORY; +INSERT INTO t1 VALUES ('ABC',0), ('A',0), ('B',0), ('C',0); +UPDATE t1 SET c2= c2 + 1 WHERE c1 = 'A'; +SELECT * FROM t1; +c1 c2 +ABC 0 +A 1 +B 0 +C 0 +DROP TABLE t1; End of 4.1 tests CREATE TABLE t1(val INT, KEY USING BTREE(val)) ENGINE=memory; INSERT INTO t1 VALUES(0); diff --git a/mysql-test/t/heap_btree.test b/mysql-test/t/heap_btree.test index 03ba8661a3c..2dd5f64014a 100644 --- a/mysql-test/t/heap_btree.test +++ b/mysql-test/t/heap_btree.test @@ -182,6 +182,20 @@ delete from t1 where a >= 2; select a from t1 order by a; drop table t1; +# +# Bug#26996 - Update of a Field in a Memory Table ends with wrong result +# +CREATE TABLE t1 ( + c1 CHAR(3), + c2 INTEGER, + KEY USING BTREE(c1), + KEY USING BTREE(c2) +) ENGINE= MEMORY; +INSERT INTO t1 VALUES ('ABC',0), ('A',0), ('B',0), ('C',0); +UPDATE t1 SET c2= c2 + 1 WHERE c1 = 'A'; +SELECT * FROM t1; +DROP TABLE t1; + --echo End of 4.1 tests # |