summaryrefslogtreecommitdiff
path: root/sql/ha_archive.cc
diff options
context:
space:
mode:
authorbrian@zim.tangent.org <>2006-01-21 04:49:26 -0800
committerbrian@zim.tangent.org <>2006-01-21 04:49:26 -0800
commit2f657ee9d4aa0a1702149ee11546018a4e5a23b7 (patch)
treee50de69d6f8780d5e205dd71edc0f36bd7acf815 /sql/ha_archive.cc
parentf2c3ed8e7b2ab119b6d8896c5187ec375a5e70d4 (diff)
downloadmariadb-git-2f657ee9d4aa0a1702149ee11546018a4e5a23b7.tar.gz
Turns out that the bulk interface was not well documented. I fixed the issue in archive and I will go and update the comments in handler next. I should probably also look through the other engines and see if this an issue elsewhere as well.
Diffstat (limited to 'sql/ha_archive.cc')
-rw-r--r--sql/ha_archive.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/ha_archive.cc b/sql/ha_archive.cc
index c60d40c2685..68219151186 100644
--- a/sql/ha_archive.cc
+++ b/sql/ha_archive.cc
@@ -135,6 +135,13 @@ static HASH archive_open_tables;
#define DATA_BUFFER_SIZE 2 // Size of the data used in the data file
#define ARCHIVE_CHECK_HEADER 254 // The number we use to determine corruption
+/*
+ Number of rows that will force a bulk insert.
+*/
+#define ARCHIVE_MIN_ROWS_TO_USE_BULK_INSERT 2
+
+
+
/* dummy handlerton - only to have something to return from archive_db_init */
handlerton archive_hton = {
"ARCHIVE",
@@ -1026,7 +1033,8 @@ void ha_archive::info(uint flag)
void ha_archive::start_bulk_insert(ha_rows rows)
{
DBUG_ENTER("ha_archive::start_bulk_insert");
- bulk_insert= TRUE;
+ if (!rows || rows >= ARCHIVE_MIN_ROWS_TO_USE_BULK_INSERT)
+ bulk_insert= TRUE;
DBUG_VOID_RETURN;
}