diff options
author | unknown <istruewing@chilla.local> | 2007-01-05 10:26:51 +0100 |
---|---|---|
committer | unknown <istruewing@chilla.local> | 2007-01-05 10:26:51 +0100 |
commit | 422d6b357f90d404f58bdd4444c048a760f0d9f8 (patch) | |
tree | bd9e8f73300d124cadc981812e75e0a16a97e60a /myisam | |
parent | 402c0426ff172b5cbe97ab222929bcd2f20cabba (diff) | |
download | mariadb-git-422d6b357f90d404f58bdd4444c048a760f0d9f8.tar.gz |
Bug#24607 - MyISAM pointer size determined incorrectly
The function mi_get_pointer_length() computed too small
pointer size for very large tables.
Inserted missing 'else' between the branches for very
large tables.
myisam/mi_create.c:
Bug#24607 - MyISAM pointer size determined incorrectly
Inserted missing 'else' between the branches for very
large tables.
Harmonized literals "(longlong) 1" and "1L" to "ULL(1)"
where they are used for "ulonglong file_length".
mysql-test/r/myisam.result:
Bug#24607 - MyISAM pointer size determined incorrectly
Added the test result.
mysql-test/t/myisam.test:
Bug#24607 - MyISAM pointer size determined incorrectly
Added the test.
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_create.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c index c1310a8012d..da9e0887b00 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -768,18 +768,19 @@ uint mi_get_pointer_length(ulonglong file_length, uint def) if (file_length) /* If not default */ { #ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS - if (file_length >= (longlong) 1 << 56) + if (file_length >= ULL(1) << 56) def=8; + else #endif - if (file_length >= (longlong) 1 << 48) + if (file_length >= ULL(1) << 48) def=7; - if (file_length >= (longlong) 1 << 40) + else if (file_length >= ULL(1) << 40) def=6; - else if (file_length >= (longlong) 1 << 32) + else if (file_length >= ULL(1) << 32) def=5; - else if (file_length >= (1L << 24)) + else if (file_length >= ULL(1) << 24) def=4; - else if (file_length >= (1L << 16)) + else if (file_length >= ULL(1) << 16) def=3; else def=2; |