<p>After some debugging I found the answer:</p>

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

<p>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)</p>

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

CC BY-SA 3.0
2017-02-15T15:18:05.170Z
2017-02-15T15:18:05.170Z
Nazareno Lorenzo
<p>I'm setting up a website using Craft Cms.</p>

<p>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).</p>

<p>When devMode == false I get:</p>

<blockquote>
  <p>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 <code>craft_searchindex</code> (<code>elementId</code>,
  <code>attribute</code>, <code>fieldId</code>, <code>locale</code>, <code>keywords</code>) VALUES (:elementId,
  :attribute, :fieldId, :locale, :keywords) ON DUPLICATE KEY UPDATE
  <code>keywords</code> = :keywords. Bound with :elementId='61',
  :attribute='field', :fieldId='1', :locale='en', :keywords=''</p>
</blockquote>

<error-message><admin><mysql>
Internal server error in Admin after migration
# Internal server error in Admin after migration

(Asked by: username_0 on 2017-02-15)

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=''

**Tags:** error-message, admin, mysql

---

## 1 answers

### Answer by username_0 on 2017-02-15. Score: 1 | Accepted answer

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.


---

