Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Beginning MySQL
|
BOOK: Beginning MySQL
This is the forum to discuss the Wrox book Beginning MySQL by Robert Sheldon, Geoff Moes; ISBN: 9780764579509
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 22nd, 2005, 05:23 AM
Registered User
 
Join Date: Aug 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Adding FULLTEXT to MyISAM table error.

Hi,

My problem occurs on the page 176 where I was just trying to add a FULLTEXT index to the Cds table. MyISAM is the default table type for the MySQL Server 4.1.13 (which I have installed on my windows based machine) and it's the only table type which supports FULLTEXT index type.
For some reason I'm receiving an error when executing the following statement:

mysql> CREATE TABLE cds(
    -> intCdID SMALLINT UNSIGNED NOT NULL PRIMARY KEY,
    -> txtCdName VARCHAR(40) NOT NULL
    -> );
Query OK, 0 rows affected (0.06 sec)

mysql> ALTER TABLE cds
    -> ADD FULLTEXT (txtCdName);
ERROR 1214 (HY000): The used table type doesn't support FULLTEXT indexes

Any idea what might cause this error?

Thanks,


 
Old August 22nd, 2005, 05:28 AM
Registered User
 
Join Date: Aug 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

What I've done is I simply defined the table type adding the ENGINE=MYISAM; at the end of the CREATE TABLE statement.
This time it worked ok when I've used ALTER statement.

Still however I don't know why it caused the problem without defining the table ENGINE=MYISAM - which suppose to be the default one.

If you know why - please post the answer.

Thanks,

 
Old August 22nd, 2005, 05:46 AM
Registered User
 
Join Date: Aug 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry for this mess.

I think I've found the answer.
I've just opened 'my.ini' file and found out that the line which determines the default type of database is set up to INNODB:

# The default storage engine that will be used when create new tables when
default-storage-engine=INNODB

- which considering that this is the only table type which support foreign key functionality and in addition is transaction-safe is even better choice. Adding ENGINE=MYISAM in case if I really need it is not a big problem - I'm not using this type of tables very frequently because it doesn't support foreign key functionality.

Take care,






Similar Threads
Thread Thread Starter Forum Replies Last Post
Fulltext Search Stored Procedure. maulik77 SQL Server 2000 0 December 28th, 2006 11:52 PM
Incorrect syntax near 'FULLTEXT'? Ron Howerton SQL Server 2005 5 August 30th, 2006 03:39 PM
FULLTEXT index help Horst Azeglio MySQL 1 June 26th, 2006 11:47 PM
Chp 3 96-98 syntax error: ') TYPE=MYISAM saross BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 7 January 29th, 2006 05:28 PM
MYISAM or InnoDB? lanita BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 3 July 20th, 2004 09:40 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.