Bug tracker

This ticket has been moved to our new tracker. Open Ticket PHPBB3-190 now.

Fulltext & MySQL engine (fix completed in vcs)

Fulltext indexing requires the MyISAM engine but it may not be the one used by default.
When you try to create an index phpBB tries to alter the table which fails when the engine is not MyISAM.

You could explicidly set the posts table to MyISAM at install or attempt to change the engine before altering the table.

Comments / History

Posted by naderman (Development Team Leader) on Mar 24th 2006, 11:45

fulltext_mysql checks whether the table is MyISAM prior to adding the index. If this doesn't work for you reply to this comment please.

Posted by APTX (Former Team Member) on Mar 24th 2006, 17:48

I am using the MySQL database with the mysqli driver.
When I wanted to create the mysql fulltext index I get this error:
Code: Select all
SQL ERROR [ mysqli ]

The used table type doesn't support FULLTEXT indexes [1214]

SQL

ALTER TABLE phpbb_posts ADD FULLTEXT (post_subject)

BACKTRACE


FILE: includes/db/mysqli.php
LINE: 118
CALL: dbal->sql_error('ALTER TABLE phpbb_posts ADD FULLTEXT (post_subject)')

FILE: includes/search/fulltext_mysql.php
LINE: 633
CALL: dbal_mysqli->sql_query('ALTER TABLE phpbb_posts ADD FULLTEXT (post_subject)')

FILE: includes/acp/acp_search.php
LINE: 290
CALL: fulltext_mysql->create_index(Object(acp_search), './index.php?i=search&mode=i...')

FILE: includes/acp/acp_search.php
LINE: 35
CALL: acp_search->index('search', 'index')

FILE: includes/functions_module.php
LINE: 336
CALL: acp_search->main('search', 'index')

FILE: adm/index.php
LINE: 79
CALL: p_master->load_active()

The error made me jump to conclusions that the engine was not checked.
I just reinstalled that snapshot (which was about 30 minutes old when I posted the bug if my math is correct) and I could reproduece the error without problems.
I use PHP5.1.2 & MySQL5.0.18 and the tables use the InnoDB engine by default.
Changing the engine to MyISAM did the trick and the Fulltext table indexes were created without problems.

Posted by naderman (Development Team Leader) on Mar 24th 2006, 21:53

Are you able to switch to the fulltext_mysql search backend on the search settings page?

Posted by APTX (Former Team Member) on Mar 24th 2006, 21:59

The option is available but it informs me that I have to have a MyISAM table as it probably should.
Though you could change that comment to make it clear that only phpbb_posts needs to be a MyISAM table as it worked after changing only that one table.

Posted by naderman (Development Team Leader) on Mar 24th 2006, 23:10

So the message was just missing from the function creating the index. I'll adjust the message so it will make clear that only phpbb_posts needs to be MyISAM.

Ticket details