Question

I get the following error on Railo with CFWheels when using save():

Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

Here's is my code:

<cfset params.vote['voteUserID'] = params.link.linkUserID />
<cfset params.vote['voteLinkID'] = params.link.linkID />
<cfset params.vote['voteType'] = 1 />

<cfset vote = model("vote").new(params.vote) />
<cfset vote.save() />

Any idea what's going on? I have another insert statement that's similar and it works fine. I suspect it's something to do with a seTting in my database table? I'm using MySQL.

Thanks.

Was it helpful?

Solution 2

Ok, so it seems changing the storage engine on the database table from "InnoDB" to "MyISAM" solved the issue. Perhaps CFWheels doesn't play nicely with "InnoDB" for some reason; perhaps someone could add a comment about why that is?

OTHER TIPS

Are you using replication in this particular environment? Looks like the BINLOG_FORMAT setting is related to replication.

I'd recommend looking up where BINLOG_FORMAT is set in MySQL, research what the various options are, and change it to something that is suitable for your scenario.

See this SO answer: Why do I get 'Binary logging not possible.' on my MySQL server?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top