Ch 8 - RBAC table creation needs InnoDB engine?

On page 180, it talks about using the schema.sql file to create the necessary auth tables. These tables use foreign keys, but MySQL defaults to the MyISAM engine, which doesn’t do foreign keys. You have to use the InnoDB engine to use foreign keys.

Might want to add a note for page 180 to the addendum list to remind people that if they’re using MySQL, to be sure and specify Engine=InnoDB when creating each of the three auth tables.

EDIT: Oops, meant to post this in the existing book addendum thread, not create a new one. I don’t see a delete option, so will just have to leave it here…

You can use sqlite, but you will not have any constraints. Deleting one record may cause inconsistency in your database.

Seems like using sqlite cause some other strange problems.

I have been "struggling" with a unit test function. The book says that (at page 194) that the CDbCommand::execute() method returns the number of rows affected by the executed SQL statement.

But my experience is that if I’m using sqlite, I get 0 or 1 in return. I even tried to select things with criteria that will case nothing to be selected. Still the returned value is 1.