mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
bugfix: uniques did not contributed to MYI tot_length estimation, which resulted in "Index file full" error on huge SELECT DISTINCT's
This commit is contained in:
parent
9eef017c57
commit
a3800d6d9b
1 changed files with 3 additions and 0 deletions
|
|
@ -392,6 +392,9 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
|
|||
uniquedef->key=keys+i;
|
||||
unique_key_parts+=uniquedef->keysegs;
|
||||
share.state.key_root[keys+i]= HA_OFFSET_ERROR;
|
||||
tot_length+= (max_rows/(ulong) (((uint) myisam_block_size-5)/
|
||||
((MI_UNIQUE_HASH_LENGTH + pointer)*2)))*
|
||||
(ulong) myisam_block_size;
|
||||
}
|
||||
keys+=uniques; /* Each unique has 1 key */
|
||||
key_segs+=uniques; /* Each unique has 1 key seg */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue