diff options
author | unknown <jani@ua141d10.elisa.omakaista.fi> | 2005-06-30 16:13:22 +0300 |
---|---|---|
committer | unknown <jani@ua141d10.elisa.omakaista.fi> | 2005-06-30 16:13:22 +0300 |
commit | 5a13f2a8a61e97453e69d2eeef14e95cf46c327b (patch) | |
tree | 3f010939347799a6ec1afda8dd2533a16f7d9392 /myisam | |
parent | 3378673653108ee89e8011e1d18cd394aea13039 (diff) | |
download | mariadb-git-5a13f2a8a61e97453e69d2eeef14e95cf46c327b.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)
myisam/mi_create.c:
Fixed Bug#11226, "Dynamic table >4GB issue".
mysql-test/r/variables.result:
Restricted myisam_data_pointer_size back to 7.
mysql-test/t/variables.test:
Restricted myisam_data_pointer_size back to 7.
sql/mysqld.cc:
Restricted myisam_data_pointer_size back to 7.
Diffstat (limited to 'myisam')
-rw-r--r-- | myisam/mi_create.c | 7 |
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; |