summaryrefslogtreecommitdiff
path: root/sql/examples/ha_archive.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-02-16 17:34:02 +0100
committerunknown <serg@serg.mylan>2005-02-16 17:34:02 +0100
commitde1dcee97e34f43b810a9329479e7e68b120eb55 (patch)
tree035ac3e99dc2b1a103e3b2fd04896b2e3ef10421 /sql/examples/ha_archive.cc
parent2d8b51991cb5d639254786edb6c446adbd4eb31c (diff)
downloadmariadb-git-de1dcee97e34f43b810a9329479e7e68b120eb55.tar.gz
after merge fixes
Diffstat (limited to 'sql/examples/ha_archive.cc')
-rw-r--r--sql/examples/ha_archive.cc30
1 files changed, 24 insertions, 6 deletions
diff --git a/sql/examples/ha_archive.cc b/sql/examples/ha_archive.cc
index b33b5102e69..fb9a9d2281a 100644
--- a/sql/examples/ha_archive.cc
+++ b/sql/examples/ha_archive.cc
@@ -133,6 +133,23 @@ 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
+/* dummy handlerton - only to have something to return from archive_db_init */
+static handlerton archive_hton = {
+ 0, /* slot */
+ 0, /* savepoint size. */
+ 0, /* close_connection */
+ 0, /* savepoint */
+ 0, /* rollback to savepoint */
+ 0, /* releas savepoint */
+ 0, /* commit */
+ 0, /* rollback */
+ 0, /* prepare */
+ 0, /* recover */
+ 0, /* commit_by_xid */
+ 0 /* rollback_by_xid */
+};
+
+
/*
Used for hash table that tracks open tables.
*/
@@ -152,18 +169,19 @@ static byte* archive_get_key(ARCHIVE_SHARE *share,uint *length,
void
RETURN
- FALSE OK
- TRUE Error
+ &archive_hton OK
+ 0 Error
*/
-bool archive_db_init()
+handlerton *archive_db_init()
{
VOID(pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST));
- return (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0,
- (hash_get_key) archive_get_key, 0, 0));
+ if (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0,
+ (hash_get_key) archive_get_key, 0, 0))
+ return 0;
+ return &archive_hton;
}
-
/*
Release the archive handler.