summaryrefslogtreecommitdiff
path: root/sql/unireg.cc
diff options
context:
space:
mode:
authorunknown <acurtis@xiphis.org>2005-12-21 10:18:40 -0800
committerunknown <acurtis@xiphis.org>2005-12-21 10:18:40 -0800
commit613dd50a33ac3e64073abdbdae66ce3a93e69e30 (patch)
treed777ca5871199d389af93e8cbe06e1bdbc16a10b /sql/unireg.cc
parent9c81773b37a5ec1a689632e3161ae6b9d1fdeb46 (diff)
downloadmariadb-git-613dd50a33ac3e64073abdbdae66ce3a93e69e30.tar.gz
Finalize storage engine plugins
Give BerkeleyDB savepoints Remove "enum db_type" from most of the code storage/example/ha_example.h: Rename: sql/examples/ha_example.h -> storage/example/ha_example.h storage/csv/ha_tina.h: Rename: sql/examples/ha_tina.h -> storage/csv/ha_tina.h config/ac-macros/storage.m4: if hton name is "no", then we don't install it as a builtin configure.in: pluggable changes include/plugin.h: version field mysql-test/r/bdb.result: savepoint results copied from innodb test mysql-test/r/information_schema.result: PLUGINS information schema mysql-test/r/information_schema_db.result: PLUGINS information schema mysql-test/t/bdb.test: savepoint test copied from innodb test sql/Makefile.am: tina and example are not here anymore sql/authors.h: minor tweek sql/ha_archive.cc: remove unwanted handlerton entries sql/ha_berkeley.cc: remove unwanted handlerton entries support for savepoints changes to show logs sql/ha_blackhole.cc: remove unwanted handlerton entries sql/ha_federated.cc: remove unwanted handlerton entries sql/ha_heap.cc: remove unwanted handlerton entries sql/ha_innodb.cc: remove unwanted handlerton entries changes for show status sql/ha_myisam.cc: remove unwanted handlerton entries sql/ha_myisammrg.cc: remove unwanted handlerton entries sql/ha_ndbcluster.cc: remove unwanted handlerton entries changes to stat_print sql/ha_partition.cc: remove unwanted handlerton entries bye bye enum db_type sql/ha_partition.h: bye bye enum db_type sql/handler.cc: remove unwanted handlerton entries bye bye enum db_type sql/handler.h: remove unwanted handlerton entries bye bye enum db_type changes to stat_print_fn sql/item_sum.cc: bye bye enum db_type sql/log.cc: remove unwanted handlerton entries sql/mysql_priv.h: bye bye enum db_type sql/mysqld.cc: bye bye enum db_type reorder plugin initialization sql/set_var.cc: bye bye enum db_type sql/set_var.h: bye bye enum db_type sql/sql_base.cc: bye bye enum db_type sql/sql_cache.cc: bye bye enum db_type sql/sql_class.h: bye bye enum db_type sql/sql_delete.cc: bye bye enum db_type sql/sql_insert.cc: bye bye enum db_type sql/sql_lex.h: show plugin sql/sql_parse.cc: bye bye enum db_type sql/sql_partition.cc: bye bye enum db_type sql/sql_plugin.cc: loadable storage engines sql/sql_plugin.h: loadable storage engines sql/sql_rename.cc: bye bye enum db_type sql/sql_select.cc: bye bye enum db_type sql/sql_show.cc: SHOW PLUGIN PLUGINS information schema changes to show engines sql/sql_table.cc: bye bye enum db_type sql/sql_view.cc: bye bye enum db_type sql/sql_view.h: bye bye enum db_type sql/sql_yacc.yy: bye bye enum db_type sql/table.cc: bye bye enum db_type sql/table.h: bye bye enum db_type sql/unireg.cc: bye bye enum db_type storage/csv/ha_tina.cc: make tina into a loadable plugin storage/example/ha_example.cc: make into a plugin storage/csv/Makefile.am: New BitKeeper file ``storage/csv/Makefile.am'' storage/example/Makefile.am: New BitKeeper file ``storage/example/Makefile.am''
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r--sql/unireg.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc
index ebbf1177953..66be20736e8 100644
--- a/sql/unireg.cc
+++ b/sql/unireg.cc
@@ -35,7 +35,7 @@ static uchar * pack_screens(List<create_field> &create_fields,
uint *info_length, uint *screens, bool small_file);
static uint pack_keys(uchar *keybuff,uint key_count, KEY *key_info,
ulong data_offset);
-static bool pack_header(uchar *forminfo,enum db_type table_type,
+static bool pack_header(uchar *forminfo,enum legacy_db_type table_type,
List<create_field> &create_fields,
uint info_length, uint screens, uint table_options,
ulong data_offset, handler *file);
@@ -43,7 +43,7 @@ static uint get_interval_id(uint *int_count,List<create_field> &create_fields,
create_field *last_field);
static bool pack_fields(File file, List<create_field> &create_fields,
ulong data_offset);
-static bool make_empty_rec(THD *thd, int file, enum db_type table_type,
+static bool make_empty_rec(THD *thd, int file, enum legacy_db_type table_type,
uint table_options,
List<create_field> &create_fields,
uint reclength, ulong data_offset,
@@ -103,7 +103,8 @@ bool mysql_create_frm(THD *thd, const char *file_name,
create_info->null_bits++;
data_offset= (create_info->null_bits + 7) / 8;
- if (pack_header(forminfo, create_info->db_type,create_fields,info_length,
+ if (pack_header(forminfo, ha_legacy_type(create_info->db_type),
+ create_fields,info_length,
screens, create_info->table_options,
data_offset, db_file))
{
@@ -115,7 +116,8 @@ bool mysql_create_frm(THD *thd, const char *file_name,
thd->net.last_error[0]=0;
if (!(screen_buff=pack_screens(create_fields,&info_length,&screens,1)))
DBUG_RETURN(1);
- if (pack_header(forminfo, create_info->db_type, create_fields,info_length,
+ if (pack_header(forminfo, ha_legacy_type(create_info->db_type),
+ create_fields,info_length,
screens, create_info->table_options, data_offset, db_file))
{
my_free((gptr) screen_buff,MYF(0));
@@ -125,7 +127,7 @@ bool mysql_create_frm(THD *thd, const char *file_name,
reclength=uint2korr(forminfo+266);
/* Calculate extra data segment length */
- str_db_type.str= (char *) ha_get_storage_engine(create_info->db_type);
+ str_db_type.str= (char *) ha_resolve_storage_engine_name(create_info->db_type);
str_db_type.length= strlen(str_db_type.str);
/* str_db_type */
create_info->extra_size= (2 + str_db_type.length +
@@ -168,7 +170,7 @@ bool mysql_create_frm(THD *thd, const char *file_name,
#ifdef WITH_PARTITION_STORAGE_ENGINE
if (part_info)
- fileinfo[61]= (uchar) part_info->default_engine_type;
+ fileinfo[61]= (uchar) ha_legacy_type(part_info->default_engine_type);
#endif
int2store(fileinfo+59,db_file->extra_rec_buf_length());
if (my_pwrite(file,(byte*) fileinfo,64,0L,MYF_RW) ||
@@ -178,7 +180,8 @@ bool mysql_create_frm(THD *thd, const char *file_name,
VOID(my_seek(file,
(ulong) uint2korr(fileinfo+6)+ (ulong) key_buff_length,
MY_SEEK_SET,MYF(0)));
- if (make_empty_rec(thd,file,create_info->db_type,create_info->table_options,
+ if (make_empty_rec(thd,file,ha_legacy_type(create_info->db_type),
+ create_info->table_options,
create_fields,reclength, data_offset, db_file))
goto err;
@@ -480,7 +483,7 @@ static uint pack_keys(uchar *keybuff, uint key_count, KEY *keyinfo,
/* Make formheader */
-static bool pack_header(uchar *forminfo, enum db_type table_type,
+static bool pack_header(uchar *forminfo, enum legacy_db_type table_type,
List<create_field> &create_fields,
uint info_length, uint screens, uint table_options,
ulong data_offset, handler *file)
@@ -739,7 +742,7 @@ static bool pack_fields(File file, List<create_field> &create_fields,
/* save an empty record on start of formfile */
-static bool make_empty_rec(THD *thd, File file,enum db_type table_type,
+static bool make_empty_rec(THD *thd, File file,enum legacy_db_type table_type,
uint table_options,
List<create_field> &create_fields,
uint reclength,