MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:DAVE THOMAS Date:May 31 2001 7:28pm
Subject:RE: how do you create a new database type (DISAM or TEXT)
View as plain text  
One more question. Now that it recognized the new type that I added, it is
giving me an ERROR 1005: Can't create table './test/newtest.frm' (errno: 0)

test is the name of the database I am trying to create the table in and
newtest is the name of the table I am trying to create. Is there something
special I have to do to allow it to make the .frm, .myi, and .myd files for
the table?


-----Original Message-----
From: Michael Widenius [mailto:monty@stripped]
Sent: Thursday, May 31, 2001 4:26 AM
To: DAVE THOMAS
Cc: 'internals@stripped'
Subject: Re: how do you create a new database type (DISAM or TEXT)



Hi!

>>>>> "DAVE" == DAVE THOMAS <DAVET@stripped> writes:

DAVE> Hi, I am trying to make a new table type in MySQL. I want to be able
to
DAVE> specify type=disam in my create table statement. The statement I am
using
DAVE> is: 
mysql> create table dave (ID int, CreateDate date) type=disam;
DAVE> The error I am getting is:
DAVE> ERROR 1064: You have an error in your SQL syntax near 'disam' at line
1.

DAVE> So far I have done the following:
DAVE> - Written a ha_disam.cc and ha_disam.h that are based on ha_myisam.*
DAVE> - I over-rided the virtual functions from the base class (class
handler)
DAVE> - modified sql_yacc.yy and lex.h everywhere I found code dealing with
MYISAM
DAVE> I copied it and changed it to DISAM
DAVE> - I added DB_TYPE_DISAM to 'enum db_type' in handler.h
DAVE> - I copied the MYISAM code in handler.cc and changed it to DISAM.

DAVE> Is there anything that I am not changing that needs to be changed? Any
help
DAVE> is appreciated! Thanks

DAVE> Dave

To get MySQL to recognize the DISAM and keyword, you have to do
the following:

- In sql/sql_yacc.yy, look for MYISAM_SYM and add identical rules for
  DISAM_SYM.
- In sql/lex.h add in the first table (under "MYISAM"):

  { "DISAM",		SYM(DISAM_SYM),0,0},

Note: to compile sql_yacc.yy, to sql_yacc.cc you need to have 'bison'
installed!  (You probably have this already!)


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