Alex,
I found the bug. It was in the consistent read through a secondary
index when inserts or updates were present on the same database page.
Below is the patch: we should set rec = clust_rec only if
prebuilt->need_to_access_clustered is TRUE.
Regards,
Heikki
....................................................................
[EMAIL PROTECTED], 2001-05-09 23:06:52+03:00, [EMAIL PROTECTED]
row0sel.c Fix a bug in consistent read through secondary key
innobase/row/row0sel.c
1.6 01/05/09 23:06:34 [EMAIL PROTECTED] +4 -2
Fix a bug in consistent read through secondary key
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: heikki
# Host: donna.mysql.fi
# Root: /home/heikki/mysqle
--- 1.5/innobase/row/row0sel.c Wed May 2 18:05:05 2001
+++ 1.6/innobase/row/row0sel.c Wed May 9 23:06:34 2001
@@ -2700,8 +2700,10 @@
goto next_rec;
}
-
- rec = clust_rec;
+
+ if (prebuilt->need_to_access_clustered) {
+ rec = clust_rec;
+ }
}
/* We found a qualifying row */
.....................................................................
At 02:40 PM 5/9/01 +0200, you wrote:
>Heikki,
>
>HT> can you print the EXPLAIN SELECT ... for the count(*) and the other query?
>
>
>mysql> explain select count(*) from mybuffer where bourse='NAS';
>+----------+------+---------------+-----------+---------+-------+------+---
----------------------+
>| table | type | possible_keys | key | key_len | ref | rows |
Extra |
>+----------+------+---------------+-----------+---------+-------+------+---
----------------------+
>| mybuffer | ref | id_bourse | id_bourse | 3 | const | 730 |
where used; Using index |
>+----------+------+---------------+-----------+---------+-------+------+---
----------------------+
>1 row in set (0.00 sec)
>
>mysql> explain select * from mybuffer where bourse='NAS';
>+----------+------+---------------+-----------+---------+-------+------+---
---------+
>| table | type | possible_keys | key | key_len | ref | rows |
Extra |
>+----------+------+---------------+-----------+---------+-------+------+---
---------+
>| mybuffer | ref | id_bourse | id_bourse | 3 | const | 730 |
where used |
>+----------+------+---------------+-----------+---------+-------+------+---
---------+
>1 row in set (0.00 sec)
>
> Alex.
>
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php