Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Transactions And InnoDB


Go to End


3 Posts   2197 Views

Avatar
swaiba

Forum Moderator, 1899 Posts

13 July 2010 at 10:53pm

Hi,

I am about to update all my DataObjects with the following...

static $create_table_options = array('MySQLDatabase' => 'ENGINE=InnoDB');

(After reading... http://www.silverstripe.org/archive/show/515#post515)

This is because I need to run scripts on my database and the best way of doing that is with transactions in the first place... i.e.

use test;
BEGIN;
SELECT count(*) FROM dummy;
INSERT INTO dummy (ClassName) VALUES ('Dummy');
SELECT count(*) FROM dummy;
ROLLBACK;
#COMMIT; 

Is there any disadvantage to change the table types to 'InnoDB'? Will I lose any silver stripe functionality?

Barry

Avatar
mark_s

Community Member, 78 Posts

13 July 2010 at 11:22pm

Hi.

The main feature you'll lose is full text search. If that is an issue for you, but you also can't do without transactions, you could consider using the sphinx module, which interfaces SilverStripe to sphinx search. Takes a little configuration, but works well once up and running.

Mark

Avatar
swaiba

Forum Moderator, 1899 Posts

13 July 2010 at 11:52pm

Hi Mark,

Thanks for that. I am unsure what full text search is - would I have something in my config to enable it?

As long as I can still use the basic search - which I have customised to add in some data objects in Page.php to add in some dynamic pages based on data I am happy.

function results($data, $form){
...
}

I've just looked at your sphinx module and it looks very nice - I was going to add searching PDFs soon, but this will do that and much more!

Thanks again,

Barry