summaryrefslogtreecommitdiff
path: root/myisam
diff options
context:
space:
mode:
authorjani@ua141d10.elisa.omakaista.fi <>2005-06-30 16:13:22 +0300
committerjani@ua141d10.elisa.omakaista.fi <>2005-06-30 16:13:22 +0300
commitb60175f9c44ebbb6a9dd26847ce1bd6b0b3bc296 (patch)
tree3f010939347799a6ec1afda8dd2533a16f7d9392 /myisam
parentff764e2b5aa687deb50285303e12e49be0ee3d9c (diff)
downloadmariadb-git-b60175f9c44ebbb6a9dd26847ce1bd6b0b3bc296.tar.gz
Fixed Bug#11226 and reverted fix for Bug#6993.
Using 8 bytes for data pointer does not work at least on all computers. The result may become 0 or negative number. (mysqld, myisamchk)
Diffstat (limited to 'myisam')
-rw-r--r--myisam/mi_create.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/myisam/mi_create.c b/myisam/mi_create.c
index d363f3d5b67..db614935321 100644
--- a/myisam/mi_create.c
+++ b/myisam/mi_create.c
@@ -194,11 +194,10 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs,
test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_PACK_RECORD));
min_pack_length+=packed;
- if (!ci->data_file_length)
+ if (!ci->data_file_length && ci->max_rows)
{
- if (ci->max_rows == 0 || pack_reclength == INT_MAX32)
- ci->data_file_length= INT_MAX32-1; /* Should be enough */
- else if ((~(ulonglong) 0)/ci->max_rows < (ulonglong) pack_reclength)
+ if (pack_reclength == INT_MAX32 ||
+ (~(ulonglong) 0)/ci->max_rows < (ulonglong) pack_reclength)
ci->data_file_length= ~(ulonglong) 0;
else
ci->data_file_length=(ulonglong) ci->max_rows*pack_reclength;