I have upgraded my Magento 2.1.6 to Magento 2.1.9, while saving category it's throwing an error as
"Something went wrong"`. exception log ,
[2017-09-25 13:20:22] report.CRITICAL: PDOException: SQLSTATE[HY000]: General error: 1787 Statement violates GTID consistency: CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can only be executed outside transactional context. These statements are also not allowed in a function or trigger because functions and triggers are also considered to be multi-statement transactions. in /var/www/html/sheamoisture/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228
Stack trace:
# 0 /var/www/html/sheamoisture/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
# 1 /var/www/html/sheamoisture/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(95): Zend_Db_Statement_Pdo->_execute(Array)
# 2 /var/www/html/sheamoisture/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): Magento\Framework\DB\Statement\Pdo\Mysql->_execute(Array)
# 3 /var/www/html/sheamoisture/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute(Array)
# 4 /var/www/html/sheamoisture/vendor/magento/zendframework1/library/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('CREATE TEMPORAR...', Array)
# 5 /var/www/html/sheamoisture/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(465): Zend_Db_Adapter_Pdo_Abstract->query('CREATE TEMPORAR...', Array)
# 6 /var/www/html/sheamoisture/vendor/magento/framework/DB/Adapter/Pdo/Mysql.php(520): Magento\Framework\DB\Adapter\Pdo\Mysql->_query('CREATE TEMPORAR...', Array)
# 7 /var/www/html/sheamoisture/vendor/magento/framework/DB/TemporaryTableService.php(145): Magento\Framework\DB\Adapter\Pdo\Mysql->query('CREATE TEMPORAR...', Array)
# 8 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/Map/DataCategoryUrlRewriteDatabaseMap.php(116): Magento\Framework\DB\TemporaryTableService->createFromSelect(Object(Magento\Framework\DB\Select), Object(Magento\Framework\DB\Adapter\Pdo\Mysql), Array)
# 9 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/Map/DataCategoryUrlRewriteDatabaseMap.php(76): Magento\CatalogUrlRewrite\Model\Map\DataCategoryUrlRewriteDatabaseMap->generateData('7')
# 10 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/Map/DataCategoryUrlRewriteDatabaseMap.php(147): Magento\CatalogUrlRewrite\Model\Map\DataCategoryUrlRewriteDatabaseMap->generateTableAdapter('7')
# 11 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/Map/UrlRewriteFinder.php(96): Magento\CatalogUrlRewrite\Model\Map\DataCategoryUrlRewriteDatabaseMap->getData('7', '1_40')
# 12 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/Category/CurrentUrlRewritesRegenerator.php(94): Magento\CatalogUrlRewrite\Model\Map\UrlRewriteFinder->findAllByData('40', 1, 'category', '7')
# 13 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/CategoryUrlRewriteGenerator.php(190): Magento\CatalogUrlRewrite\Model\Category\CurrentUrlRewritesRegenerator->generate(1, Object(Magento\Catalog\Model\Category\Interceptor), '7')
# 14 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/CategoryUrlRewriteGenerator.php(95): Magento\CatalogUrlRewrite\Model\CategoryUrlRewriteGenerator->generateForSpecificStoreView(1, Object(Magento\Catalog\Model\Category\Interceptor), '7')
# 15 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/Category/ChildrenUrlRewriteGenerator.php(64): Magento\CatalogUrlRewrite\Model\CategoryUrlRewriteGenerator->generate(Object(Magento\Catalog\Model\Category\Interceptor), false, '7')
# 16 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/CategoryUrlRewriteGenerator.php(187): Magento\CatalogUrlRewrite\Model\Category\ChildrenUrlRewriteGenerator->generate('1', Object(Magento\Catalog\Model\Category\Interceptor), '7')
# 17 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/CategoryUrlRewriteGenerator.php(120): Magento\CatalogUrlRewrite\Model\CategoryUrlRewriteGenerator->generateForSpecificStoreView('1', Object(Magento\Catalog\Model\Category\Interceptor), '7')
# 18 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Model/CategoryUrlRewriteGenerator.php(94): Magento\CatalogUrlRewrite\Model\CategoryUrlRewriteGenerator->generateForGlobalScope(Object(Magento\Catalog\Model\Category\Interceptor), false, '7')
# 19 /var/www/html/sheamoisture/vendor/magento/module-catalog-url-rewrite/Observer/CategoryProcessUrlRewriteSavingObserver.php(96): Magento\CatalogUrlRewrite\Model\CategoryUrlRewriteGenerator->generate(Object(Magento\Catalog\Model\Category\Interceptor))
# 20 /var/www/html/sheamoisture/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\CatalogUrlRewrite\Observer\CategoryProcessUrlRewriteSavingObserver->execute(Object(Magento\Framework\Event\Observer))
# 21 /var/www/html/sheamoisture/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\CatalogUrlRewrite\Observer\CategoryProcessUrlRewriteSavingObserver), Object(Magento\Framework\Event\Observer))
# 22 /var/www/html/sheamoisture/vendor/magento/module-staging/Model/Event/Manager.php(97): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
# 23 /var/www/html/sheamoisture/var/generation/Magento/Staging/Model/Event/Manager/Proxy.php(95): Magento\Staging\Model\Event\Manager->dispatch('catalog_categor...', Array)
# 24 /var/www/html/sheamoisture/vendor/magento/framework/Model/AbstractModel.php(802): Magento\Staging\Model\Event\Manager\Proxy->dispatch('catalog_categor...', Array)
# 25 /var/www/html/sheamoisture/vendor/magento/module-catalog/Model/Category.php(1080): Magento\Framework\Model\AbstractModel->afterSave()
# 26 /var/www/html/sheamoisture/var/generation/Magento/Catalog/Model/Category/Interceptor.php(583): Magento\Catalog\Model\Category->afterSave()
# 27 /var/www/html/sheamoisture/vendor/magento/framework/EntityManager/Observer/AfterEntitySave.php(34): Magento\Catalog\Model\Category\Interceptor->afterSave()
# 28 /var/www/html/sheamoisture/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Magento\Framework\EntityManager\Observer\AfterEntitySave->execute(Object(Magento\Framework\Event\Observer))
# 29 /var/www/html/sheamoisture/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Framework\EntityManager\Observer\AfterEntitySave), Object(Magento\Framework\Event\Observer))
# 30 /var/www/html/sheamoisture/vendor/magento/module-staging/Model/Event/Manager.php(97): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))
# 31 /var/www/html/sheamoisture/var/generation/Magento/Staging/Model/Event/Manager/Proxy.php(95): Magento\Staging\Model\Event\Manager->dispatch('magento_catalog...', Array)
# 32 /var/www/html/sheamoisture/vendor/magento/framework/EntityManager/EventManager.php(52): Magento\Staging\Model\Event\Manager\Proxy->dispatch('magento_catalog...', Array)
# 33 /var/www/html/sheamoisture/vendor/magento/module-staging/Model/Operation/Update.php(210): Magento\Framework\EntityManager\EventManager->dispatchEntityEvent('Magento\\Catalog...', 'save_after', Array)
# 34 /var/www/html/sheamoisture/vendor/magento/framework/EntityManager/EntityManager.php(87): Magento\Staging\Model\Operation\Update->execute(Object(Magento\Catalog\Model\Category\Interceptor), Array)
# 35 /var/www/html/sheamoisture/vendor/magento/module-catalog/Model/ResourceModel/Category.php(1041): Magento\Framework\EntityManager\EntityManager->save(Object(Magento\Catalog\Model\Category\Interceptor))
# 36 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Catalog\Model\ResourceModel\Category->save(Object(Magento\Catalog\Model\Category\Interceptor))
# 37 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Model\ResourceModel\Category\Interceptor->___callParent('save', Array)
# 38 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Array, 'catalogsearchFu...')
# 39 /var/www/html/sheamoisture/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Category.php(43): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Catalog\Model\Category\Interceptor))
# 40 /var/www/html/sheamoisture/vendor/magento/module-catalog-search/Model/Indexer/Fulltext/Plugin/Category.php(29): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Category->addCommitCallback(Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Category\Interceptor))
# 41 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\CatalogSearch\Model\Indexer\Fulltext\Plugin\Category->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Category\Interceptor))
# 42 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'save', Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Array, 'clean_cache')
# 43 /var/www/html/sheamoisture/vendor/magento/framework/App/Cache/FlushCacheByTags.php(71): Magento\Catalog\Model\ResourceModel\Category\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Catalog\Model\Category\Interceptor))
# 44 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\App\Cache\FlushCacheByTags->aroundSave(Object(Magento\Catalog\Model\ResourceModel\Category\Interceptor), Object(Closure), Object(Magento\Catalog\Model\Category\Interceptor))
# 45 /var/www/html/sheamoisture/var/generation/Magento/Catalog/Model/ResourceModel/Category/Interceptor.php(364): Magento\Catalog\Model\ResourceModel\Category\Interceptor->___callPlugins('save', Array, Array)
# 46 /var/www/html/sheamoisture/vendor/magento/framework/Model/AbstractModel.php(631): Magento\Catalog\Model\ResourceModel\Category\Interceptor->save(Object(Magento\Catalog\Model\Category\Interceptor))
# 47 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Framework\Model\AbstractModel->save()
# 48 /var/www/html/sheamoisture/var/generation/Magento/Catalog/Model/Category/Interceptor.php(1534): Magento\Catalog\Model\Category\Interceptor->___callPlugins('save', Array, Array)
# 49 /var/www/html/sheamoisture/vendor/magento/module-catalog/Controller/Adminhtml/Category/Save.php(211): Magento\Catalog\Model\Category\Interceptor->save()
# 50 /var/www/html/sheamoisture/var/generation/Magento/Catalog/Controller/Adminhtml/Category/Save/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Category\Save->execute()
# 51 /var/www/html/sheamoisture/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->execute()
# 52 /var/www/html/sheamoisture/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
# 53 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
# 54 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->___callParent('dispatch', Array)
# 55 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Array, 'adminAuthentica...')
# 56 /var/www/html/sheamoisture/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
# 57 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
# 58 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Array, 'log')
# 59 /var/www/html/sheamoisture/vendor/magento/module-logging/App/Action/Plugin/Log.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
# 60 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Logging\App\Action\Plugin\Log->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
# 61 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Array, 'adminMassaction...')
# 62 /var/www/html/sheamoisture/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
# 63 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
# 64 /var/www/html/sheamoisture/var/generation/Magento/Catalog/Controller/Adminhtml/Category/Save/Interceptor.php(65): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->___callPlugins('dispatch', Array, Array)
# 65 /var/www/html/sheamoisture/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Category\Save\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
# 66 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
# 67 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
# 68 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
# 69 /var/www/html/sheamoisture/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
# 70 /var/www/html/sheamoisture/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
# 71 /var/www/html/sheamoisture/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
# 72 /var/www/html/sheamoisture/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
# 73 /var/www/html/sheamoisture/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
# 74 /var/www/html/sheamoisture/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
# 75 {main}
Please help me to solve this. Thank you in advance!