diff options
author | unknown <istruewing@chilla.local> | 2007-05-10 17:30:50 +0200 |
---|---|---|
committer | unknown <istruewing@chilla.local> | 2007-05-10 17:30:50 +0200 |
commit | 5d40ae9f8c235856878e2e3e8bd3455ae426f1bb (patch) | |
tree | ead056dae5707ac88057e9cfc5c3eef52c74058d /storage | |
parent | 50453ecd00a0b0a9e525c024b90c96367824f6d1 (diff) | |
parent | 4e61fe0c1fcc9a1edc9f3e924594754e10f70ae0 (diff) | |
download | mariadb-git-5d40ae9f8c235856878e2e3e8bd3455ae426f1bb.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-engines
into chilla.local:/home/mydev/mysql-5.1-bug17332
mysys/mf_keycache.c:
Auto merged
mysys/my_static.c:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_table.cc:
Auto merged
storage/myisam/ha_myisam.cc:
Auto merged
Diffstat (limited to 'storage')
-rw-r--r-- | storage/myisam/ha_myisam.cc | 2 | ||||
-rw-r--r-- | storage/myisam/mi_preload.c | 13 |
2 files changed, 10 insertions, 5 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 298e3e6c433..ee9ecd96dc9 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -1263,6 +1263,7 @@ int ha_myisam::preload_keys(THD* thd, HA_CHECK_OPT *check_opt) ulonglong map; TABLE_LIST *table_list= table->pos_in_table_list; my_bool ignore_leaves= table_list->ignore_leaves; + char buf[ERRMSGSIZE+20]; DBUG_ENTER("ha_myisam::preload_keys"); @@ -1294,7 +1295,6 @@ int ha_myisam::preload_keys(THD* thd, HA_CHECK_OPT *check_opt) errmsg= "Failed to allocate buffer"; break; default: - char buf[ERRMSGSIZE+20]; my_snprintf(buf, ERRMSGSIZE, "Failed to read from index file (errno: %d)", my_errno); errmsg= buf; diff --git a/storage/myisam/mi_preload.c b/storage/myisam/mi_preload.c index 78729f18424..06c66c06bf4 100644 --- a/storage/myisam/mi_preload.c +++ b/storage/myisam/mi_preload.c @@ -55,12 +55,17 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves) block_length= keyinfo[0].block_length; - /* Check whether all indexes use the same block size */ - for (i= 1 ; i < keys ; i++) + if (ignore_leaves) { - if (keyinfo[i].block_length != block_length) - DBUG_RETURN(my_errno= HA_ERR_NON_UNIQUE_BLOCK_SIZE); + /* Check whether all indexes use the same block size */ + for (i= 1 ; i < keys ; i++) + { + if (keyinfo[i].block_length != block_length) + DBUG_RETURN(my_errno= HA_ERR_NON_UNIQUE_BLOCK_SIZE); + } } + else + block_length= share->key_cache->key_cache_block_size; length= info->preload_buff_size/block_length * block_length; set_if_bigger(length, block_length); |