Below is the list of changes that have just been committed into a local
5.0 repository of psergey. When psergey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-07-26 20:52:53+04:00, sergefp@stripped +4 -0
BUG#28591: make the fix work for BDB tables too:
- make ha_berkeley::cmp_ref() take into account that auto-generated PKs
are stored in LSB-first order.
- Remove the temporary code that made the bugfix work for innodb only
mysql-test/r/bdb.result@stripped, 2007-07-26 20:52:42+04:00, sergefp@stripped +1 -1
Adjust test-results.
sql/ha_berkeley.cc@stripped, 2007-07-26 20:52:42+04:00, sergefp@stripped +5 -1
BUG#28591: make the fix work for BDB tables too:
- make ha_berkeley::cmp_ref() take into account that auto-generated PKs
are stored in LSB-first order.
sql/sql_select.cc@stripped, 2007-07-26 20:52:42+04:00, sergefp@stripped +0 -1
BUG#28591: Remove "innodb only" clause as the fix now works for BDB too
sql/table.cc@stripped, 2007-07-26 20:52:43+04:00, sergefp@stripped +1 -2
BUG#28591: Remove "innodb only" clause as the fix now works for BDB too
diff -Nrup a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result
--- a/mysql-test/r/bdb.result 2007-02-17 02:43:49 +03:00
+++ b/mysql-test/r/bdb.result 2007-07-26 20:52:42 +04:00
@@ -136,8 +136,8 @@ update ignore t1 set id=1023 where id=10
select * from t1 where parent_id=102 order by parent_id,id;
id parent_id level
1008 102 2
-1010 102 2
1015 102 2
+1010 102 2
explain select level from t1 where level=1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref level level 1 const X Using index
diff -Nrup a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc
--- a/sql/ha_berkeley.cc 2007-02-28 23:23:33 +03:00
+++ b/sql/ha_berkeley.cc 2007-07-26 20:52:42 +04:00
@@ -2646,7 +2646,11 @@ ha_rows ha_berkeley::estimate_rows_upper
int ha_berkeley::cmp_ref(const byte *ref1, const byte *ref2)
{
if (hidden_primary_key)
- return memcmp(ref1, ref2, BDB_HIDDEN_PRIMARY_KEY_LENGTH);
+ {
+ ulonglong a=uint5korr((char*) ref1);
+ ulonglong b=uint5korr((char*) ref2);
+ return a < b ? -1 : (a > b ? 1 : 0);
+ }
int result;
Field *field;
diff -Nrup a/sql/sql_select.cc b/sql/sql_select.cc
--- a/sql/sql_select.cc 2007-07-23 07:25:59 +04:00
+++ b/sql/sql_select.cc 2007-07-26 20:52:42 +04:00
@@ -12033,7 +12033,6 @@ static int test_if_order_by_key(ORDER *o
*/
if (!on_primary_key &&
(table->file->table_flags() & HA_PRIMARY_KEY_IN_READ_INDEX) &&
- table->s->db_type == DB_TYPE_INNODB &&
table->s->primary_key != MAX_KEY)
{
on_primary_key= TRUE;
diff -Nrup a/sql/table.cc b/sql/table.cc
--- a/sql/table.cc 2007-07-26 02:28:50 +04:00
+++ b/sql/table.cc 2007-07-26 20:52:43 +04:00
@@ -782,8 +782,7 @@ int openfrm(THD *thd, const char *name,
if (ha_option & HA_PRIMARY_KEY_IN_READ_INDEX)
{
field->part_of_key= share->keys_in_use;
- if (share->db_type == DB_TYPE_INNODB &&
- field->part_of_sortkey.is_set(key))
+ if (field->part_of_sortkey.is_set(key))
field->part_of_sortkey= share->keys_in_use;
}
}
| Thread |
|---|
| • bk commit into 5.0 tree (sergefp:1.2481) BUG#28591 | Sergey Petrunia | 26 Jul |