List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:May 25 2001 11:58pm
Subject:how do you create a new database type (DISAM or TEXT)
View as plain text  
Hi!

>>>>> "Dave" == Dave Thomas <ssl476@stripped> writes:

Dave> I am trying to create a new type of database. I am modifying the source 
Dave> files for MySql server. Does anyone know how to go about adding a new type? 
Dave> When you create a table you use a statement like this:

Dave> create table NewTest (ID bigint, CreateDate date, LastName char(50), 
Dave> FirstName char(50)) type=myisam;

Dave> I want to be able to specify type=disam or type=text. I would like to be 
Dave> able to create a text type for simplicity so I can be able to creeate a 
Dave> simple text editable database. My overall goal is to create a DISAM type. I 
Dave> have a DISAM library I plan to use to handle most of the functionality but I 
Dave> need help with how to go about making MySQL recognize DISAM or TEXT as a 
Dave> database type. Any help will be appreciated. Thanks!

Dave> Dave

To add a new table type you would have to do at least
(I use here DISAM as an example):

- Write a ha_disam.cc and ha_disam.h (You can probably base these on
  ha_myisam.*)
- Check how MYISAM is used in sql_yacc.yy and lex.h and do similar for
  DISAM.
- Add DB_TYPE_DISAM to 'enum db_type' in handler.h
- Modify configure to define HAVE_DISAM if you configure with --with-disam
- Look after how MYISAM is used in handler.cc and duplicate this with
  DISAM

Good luck.

Regards,
Monty


Thread
how do you create a new database type (DISAM or TEXT)Dave Thomas24 May
  • Re: how do you create a new database type (DISAM or TEXT)Timothy Smith24 May
  • Re: how do you create a new database type (DISAM or TEXT)Sinisa Milivojevic25 May
  • how do you create a new database type (DISAM or TEXT)Michael Widenius26 May
Re: how do you create a new database type (DISAM or TEXT)DAVE THOMAS30 May
  • Re: how do you create a new database type (DISAM or TEXT)Timothy Smith30 May
  • Re: how do you create a new database type (DISAM or TEXT)Sinisa Milivojevic31 May
  • Re: how do you create a new database type (DISAM or TEXT)Michael Widenius31 May
RE: how do you create a new database type (DISAM or TEXT)DAVE THOMAS31 May
RE: how do you create a new database type (DISAM or TEXT)DAVE THOMAS31 May
RE: how do you create a new database type (DISAM or TEXT)DAVE THOMAS31 May
  • Re: how do you create a new database type (DISAM or TEXT)Timothy Smith31 May
RE: how do you create a new database type (DISAM or TEXT)DAVE THOMAS31 May
  • RE: how do you create a new database type (DISAM or TEXT)Michael Widenius1 Jun