#include "mysql_priv.h"#include <myisam.h>#include "ha_archive.h"#include <my_dir.h>#include <mysql/plugin.h>Include dependency graph for ha_archive.cc:

Go to the source code of this file.
Defines | |
| #define | ARZ ".ARZ" |
| #define | ARN ".ARN" |
| #define | ARM ".ARM" |
| #define | META_BUFFER_SIZE |
| #define | DATA_BUFFER_SIZE 2 |
| #define | ARCHIVE_CHECK_HEADER 254 |
| #define | ARCHIVE_MIN_ROWS_TO_USE_BULK_INSERT 2 |
Functions | |
| static handler * | archive_create_handler (TABLE_SHARE *table, MEM_ROOT *mem_root) |
| static byte * | archive_get_key (ARCHIVE_SHARE *share, uint *length, my_bool not_used __attribute__((unused))) |
| int | archive_db_init () |
| int | archive_db_done () |
| int | archive_db_end (ha_panic_function type) |
| mysql_declare_plugin (archive) | |
Variables | |
| static bool | archive_inited = FALSE |
| pthread_mutex_t | archive_mutex |
| static HASH | archive_open_tables |
| handlerton | archive_hton |
| static const char * | ha_archive_exts [] |
| st_mysql_storage_engine | archive_storage_engine |
| mysql_declare_plugin_end | |
| #define ARCHIVE_CHECK_HEADER 254 |
Definition at line 139 of file ha_archive.cc.
Referenced by ha_archive::read_data_header(), ha_archive::read_meta_file(), ha_archive::write_data_header(), and ha_archive::write_meta_file().
| #define ARCHIVE_MIN_ROWS_TO_USE_BULK_INSERT 2 |
| #define ARM ".ARM" |
| #define ARN ".ARN" |
| #define ARZ ".ARZ" |
| #define DATA_BUFFER_SIZE 2 |
Definition at line 138 of file ha_archive.cc.
Referenced by ha_archive::read_data_header(), and ha_archive::write_data_header().
| #define META_BUFFER_SIZE |
Value:
sizeof(uchar) + sizeof(uchar) + sizeof(ulonglong) \ + sizeof(ulonglong) + sizeof(ulonglong) + sizeof(ulonglong) + FN_REFLEN \ + sizeof(uchar)
Definition at line 131 of file ha_archive.cc.
Referenced by read_meta_file(), ha_archive::read_meta_file(), write_meta_file(), and ha_archive::write_meta_file().
| static handler * archive_create_handler | ( | TABLE_SHARE * | table, | |
| MEM_ROOT * | mem_root | |||
| ) | [static] |
Definition at line 150 of file ha_archive.cc.
Referenced by archive_db_init().
00151 { 00152 return new (mem_root) ha_archive(table); 00153 }
Here is the caller graph for this function:

| int archive_db_done | ( | ) |
Definition at line 217 of file ha_archive.cc.
References archive_inited, archive_mutex, archive_open_tables, hash_free(), pthread_mutex_destroy, and VOID.
Referenced by archive_db_end(), and mysql_declare_plugin().
00218 { 00219 if (archive_inited) 00220 { 00221 hash_free(&archive_open_tables); 00222 VOID(pthread_mutex_destroy(&archive_mutex)); 00223 } 00224 archive_inited= 0; 00225 return 0; 00226 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int archive_db_end | ( | ha_panic_function | type | ) |
Definition at line 229 of file ha_archive.cc.
References archive_db_done().
Referenced by archive_db_init().
00230 { 00231 return archive_db_done(); 00232 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int archive_db_init | ( | void | ) |
Definition at line 178 of file ha_archive.cc.
References archive_create_handler(), archive_db_end(), archive_get_key(), archive_hton, archive_inited, archive_mutex, archive_open_tables, handlerton::create, handlerton::db_type, DB_TYPE_ARCHIVE_DB, DBUG_ENTER, DBUG_RETURN, error, FALSE, handlerton::flags, hash_init, HTON_NO_FLAGS, MY_MUTEX_INIT_FAST, handlerton::panic, pthread_mutex_destroy, pthread_mutex_init, SHOW_OPTION_YES, handlerton::state, system_charset_info, TRUE, and VOID.
Referenced by mysql_declare_plugin().
00179 { 00180 DBUG_ENTER("archive_db_init"); 00181 if (archive_inited) 00182 DBUG_RETURN(FALSE); 00183 00184 archive_hton.state=SHOW_OPTION_YES; 00185 archive_hton.db_type=DB_TYPE_ARCHIVE_DB; 00186 archive_hton.create=archive_create_handler; 00187 archive_hton.panic=archive_db_end; 00188 archive_hton.flags=HTON_NO_FLAGS; 00189 00190 if (pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST)) 00191 goto error; 00192 if (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0, 00193 (hash_get_key) archive_get_key, 0, 0)) 00194 { 00195 VOID(pthread_mutex_destroy(&archive_mutex)); 00196 } 00197 else 00198 { 00199 archive_inited= TRUE; 00200 DBUG_RETURN(FALSE); 00201 } 00202 error: 00203 DBUG_RETURN(TRUE); 00204 }
Here is the call graph for this function:

Here is the caller graph for this function:

| static byte* archive_get_key | ( | ARCHIVE_SHARE * | share, | |
| uint * | length, | |||
| my_bool not_used | __attribute__((unused)) | |||
| ) | [static] |
Definition at line 158 of file ha_archive.cc.
References st_archive_share::table_name, and st_archive_share::table_name_length.
Referenced by archive_db_init().
00160 { 00161 *length=share->table_name_length; 00162 return (byte*) share->table_name; 00163 }
Here is the caller graph for this function:

| mysql_declare_plugin | ( | archive | ) |
Definition at line 1576 of file ha_archive.cc.
References archive_db_done(), archive_db_init(), archive_storage_engine, and MYSQL_STORAGE_ENGINE_PLUGIN.
01577 { 01578 MYSQL_STORAGE_ENGINE_PLUGIN, 01579 &archive_storage_engine, 01580 "ARCHIVE", 01581 "Brian Aker, MySQL AB", 01582 "Archive storage engine", 01583 archive_db_init, /* Plugin Init */ 01584 archive_db_done, /* Plugin Deinit */ 01585 0x0100 /* 1.0 */, 01586 0 01587 }
Here is the call graph for this function:

bool archive_inited = FALSE [static] |
Definition at line 118 of file ha_archive.cc.
Referenced by archive_db_done(), and archive_db_init().
| pthread_mutex_t archive_mutex |
Definition at line 120 of file ha_archive.cc.
Referenced by archive_db_done(), archive_db_init(), ha_archive::free_share(), and ha_archive::get_share().
HASH archive_open_tables [static] |
Definition at line 121 of file ha_archive.cc.
Referenced by archive_db_done(), archive_db_init(), ha_archive::free_share(), and ha_archive::get_share().
const char* ha_archive_exts[] [static] |
Definition at line 1588 of file ha_archive.cc.
1.4.7

