magento / magento/data-migration-tool

[PDOException (42000)] SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ORDER BY `entity_attrib ute_id` ASC LIMIT 392' at line 1

Open
#827 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
339
Forks
195
PR merge metrics
No merged PRs in 30d

Description

Hello,

I try migration webshop but i have problem.

Preconditions
  1. Magento 1.9.3.7 => Magento 2.3.5-P1
  2. PHP 7.3.19-1 | 10.3.22-MariaDB
Steps to reproduce

php7.3 bin/magento migrate:data -r -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.7/config.xml

Actual result

In Mysql.php line 110:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syn
tax to use near ')) ORDER BY entity_attribute_id ASC
LIMIT 392' at line 1, query was: SELECT eav_entity_attribute.* FROM eav_entity_attribute WHERE (entity_attribute_id >= 0) AND (attribute_id IN ()) ORDER BY entity_attri bute_id ASC
LIMIT 392

In Mysql.php line 91:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syn
tax to use near ')) ORDER BY entity_attribute_id ASC
LIMIT 392' at line 1

Product is OK (can be informations missing...)
Categories is OK
Page CMS is OK
Block CMS is OK
Order/invoice/shipping/credit memo is not imported
Customer not imported
Review not imported

Thank you very much for your help.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the migration command and vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.7/config.xml, then inspect Mysql.php at lines 91 and 110 where the reported exception occurs. Trace the query that produces an empty attribute_id list and rerun the migration to verify that this SQL error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
mariadb, php
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.