Internal server error in Admin after migration I'm setting up a website using Craft Cms.

Everything was working fine on local dev, but now I moved it to a development server, I'm getting an error every time I try to create a new entry (or section).

When devMode == false I get:


  CDbCommand failed to execute the SQL statement: SQLSTATE[HY000]:
  General error: 1785 Statement violates GTID consistency: Updates to
  non-transactional tables can only be done in either autocommitted
  statements or single-statement transactions, and never in the same
  statement as updates to transactional tables.. The SQL statement
  executed was: INSERT INTO craft_searchindex (elementId,
  attribute, fieldId, locale, keywords) VALUES (:elementId,
  :attribute, :fieldId, :locale, :keywords) ON DUPLICATE KEY UPDATE
  keywords = :keywords. Bound with :elementId='61',
  :attribute='field', :fieldId='1', :locale='en', :keywords=''
After some debugging I found the answer:

Problem is caused by craft_searchindex using MyISAM as the table engine, while the rest are using InnoDB, and the server having enforce_gtid_consistency ON. This caused issues on transactions that included queries to MyISAM tables.

Seems that the reason for this is supporting full text searchess in old MySQL versions (as InnoDB gained full text search support around 5.6.4)

I'm now experimenting on switching the engine for that table and seems to work nicely.