Below is the list of changes that have just been committed into a local
4.1 repository of andrey. When andrey 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, 2006-12-01 23:11:44+01:00, andrey@stripped +1 -0
Merge ahristov@stripped:/home/bk/mysql-4.1-maint
into example.com:/work/bug24395-v2/my41
MERGE: 1.2554.2.1
myisam/mi_open.c@stripped, 2006-12-01 23:11:39+01:00, andrey@stripped +0 -0
Auto merged
MERGE: 1.85.1.2
# 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: andrey
# Host: example.com
# Root: /work/bug24395-v2/my41/RESYNC
--- 1.87/myisam/mi_open.c 2006-12-01 23:11:50 +01:00
+++ 1.88/myisam/mi_open.c 2006-12-01 23:11:50 +01:00
@@ -1235,13 +1235,30 @@ int mi_enable_indexes(MI_INFO *info)
RETURN
0 indexes are not disabled
1 all indexes are disabled
- [2 non-unique indexes are disabled - NOT YET IMPLEMENTED]
+ 2 non-unique indexes are disabled
*/
int mi_indexes_are_disabled(MI_INFO *info)
{
MYISAM_SHARE *share= info->s;
- return (! share->state.key_map && share->base.keys);
+ /*
+ No keys or all are enabled. keys is the number of keys. Left shifted
+ gives us only one bit set. When decreased by one, gives us all all bits
+ up to this one set and it gets unset.
+ */
+ if (!share->base.keys ||
+ (share->state.key_map == (ULL(1) << share->base.keys) - ULL(1)))
+ return 0;
+
+ /* All are disabled */
+ if (!share->state.key_map)
+ return 1;
+
+ /*
+ We have keys. Some enabled, some disabled.
+ Don't check for any non-unique disabled but return directly 2
+ */
+ return 2;
}
| Thread |
|---|
| • bk commit into 4.1 tree (andrey:1.2571) | ahristov | 1 Dec |