summaryrefslogtreecommitdiff
path: root/sql/ha_berkeley.cc
diff options
context:
space:
mode:
authormonty@tik.mysql.com <>2000-11-13 23:55:10 +0200
committermonty@tik.mysql.com <>2000-11-13 23:55:10 +0200
commit7a013339f84c48ea6194a35d9c00d0d549466b1d (patch)
tree6689cb755cdb6ba0fb4cc6fbb215d75b175228d2 /sql/ha_berkeley.cc
parentcb1d81f650df9fc3ec5965cf2dfbcb1fd8559d31 (diff)
downloadmariadb-git-7a013339f84c48ea6194a35d9c00d0d549466b1d.tar.gz
Bug fixes, TRUNCATE, safer passwords on command line and connect timeout
Diffstat (limited to 'sql/ha_berkeley.cc')
-rw-r--r--sql/ha_berkeley.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc
index 13306397fe1..80421f006cc 100644
--- a/sql/ha_berkeley.cc
+++ b/sql/ha_berkeley.cc
@@ -60,6 +60,7 @@
#define HA_BERKELEY_ROWS_IN_TABLE 10000 /* to get optimization right */
#define HA_BERKELEY_RANGE_COUNT 100
+#define HA_BERKELEY_MAX_ROWS 10000000 /* Max rows in table */
const char *ha_berkeley_ext=".db";
bool berkeley_skip=0;
@@ -1615,12 +1616,13 @@ void ha_berkeley::update_auto_primary_key()
ha_rows ha_berkeley::estimate_number_of_rows()
{
ulonglong max_ident;
+ ulonglong max_rows=table->max_rows ? table->max_rows : HA_BERKELEY_MAX_ROWS;
if (!hidden_primary_key)
- return INT_MAX32;
+ return (ha_rows) max_rows;
pthread_mutex_lock(&share->mutex);
max_ident=share->auto_ident+EXTRA_RECORDS;
pthread_mutex_unlock(&share->mutex);
- return (ha_rows) min(max_ident,(ulonglong) INT_MAX32);
+ return (ha_rows) min(max_ident,max_rows);
}
#endif /* HAVE_BERKELEY_DB */