1

After updating to 2.1.8, and more recently trying 2.1.9, my category pages stopped displaying products.

I started seeing an error when reindexing:

There is no such adapter: mysql2

I put my dev site into developer mode to get more info. When opening a category page I see the above error and this one as well:

Exception #0 (Zend_Db_Statement_Exception): SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`entity_id` NOT IN ('4336', '4337', '4338', '4341', '4336', '4337', '4338', '43' at line 4, query was:

INSERT INTO `search_tmp_59c45499257c35_41892677` SELECT `main_select`.`entity_id`, MAX(score) AS `relevance` FROM (SELECT `search_index`.`entity_id`, (((0) + (0)) * 1) AS `score` FROM `catalogsearch_fulltext_scope1` AS `search_index` LEFT JOIN `catalog_eav_attribute` AS `cea` ON search_index.attribute_id = cea.attribute_id INNER JOIN `catalog_category_product_index` AS `category_ids_index` ON search_index.entity_id = category_ids_index.product_id LEFT JOIN `cataloginventory_stock_status` AS `stock_index` ON search_index.entity_id = stock_index.product_id AND stock_index.website_id = 0 WHERE (stock_index.stock_status = 1) AND (category_ids_index.category_id = 14) AND (`search_index`.`entity_id_filter`.`search_index`.`entity_id` NOT IN ('4336', '4337', '4338', '4341', '4336', '4337', '4338', '4341'))) AS `main_select` GROUP BY `entity_id` ORDER BY `relevance` DESC LIMIT 10000

I tried changing the database entries in my core_config_data data table where path is search/engine/engine/ and catalog/search/engine from mysql2 to mysql.

After recompile removed the "no such adapter" error, but the second error is still there. In retrospect, this doesn't seem right because I've since checked the live database of my site and both entries are mysql2.

So I have a few questions with this, but the obvious and most important one is how can I fix this error?

Not as important but I'm also curious what the difference between mysql and mysql2 in the option. How do I know what option to use in the future?

  • This probably won't help anyone but I narrowed it down to a specific module. – jamil Sep 23 '17 at 0:21
0

TL DR

Restore your SQL database from the backup that was created before the update.

SSH in your server and run

php bin/magento setup:rollback -d sqlbackupFileName

Find the SQL back file name with php bin/magento info:backups:list

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.