-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database backup missing table information "inventory_stock_1" #19542
Comments
Hi @in-session. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @in-session do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
Hi @in-session. Thank you for your report.
and then reopen the issue. |
I can confirm the same problem, error that occurs: Analisi statica: Sono stati trovati 1 errori durante l'analisi. Tipo statement non riconosciuto. (near "LOCK" at position 53) -- -- Dumping data for table Messaggio di MySQL: Documentazione |
Same error:: Static analysis: 1 errors were found during analysis. Unrecognized statement type. (near "LOCK" at position 53) -- -- Dumping data for table MySQL said: Documentation #1146 - Table 'magento.inventory_stock_1' doesn't exist |
Just a heads up. Using mysqldump to create the backup and restoring this backup will not give you this error. It has to do something with Magento's own database backup functionality. [EDIT] |
It looks like an issue with database backup. |
The CREATE ALGORITHM statement requires elevated MySQL access. This line needs to come out of the SQL being migrated. Instead run the following to create the view
|
Has anyone got a solution for this? I am trying to migrate an existing Magento 2.3 website to a new server, I ran a full database exporting using Magento's internal backup system - bin/magento magento setup:backup --db When I try and import the .sql it generated, I keep getting the following error - Table 'inventory_stock_1' was not locked with LOCK TABLES I have tried the above suggestion - but this has not worked for me. |
@Dan547 Remove your current
|
That works for me! Great Thanks! |
bypassed that problem with ssh mysql adds this line in sql export so cat the file | remove that line with export > export to new sql |
Hello what does it mean " Remove your current inventory_stock_1" ? delete the table in the old database ? |
No, delete the view != delete the table. The view is not persistent and all data are populated dynamically. |
I Have been having the same issue, i have tried the above query by deleting inventory_stock_1. then i get the following error #1932 - Table 'magento2.cataloginventory_stock_status' doesn't exist in engine |
Have you recently enabled MSI? or what version of Magento are you using?
more information needed
…On Tue, Dec 20, 2022 at 6:07 PM NoorSabah ***@***.***> wrote:
CREATE
SQL SECURITY INVOKER
VIEW inventory_stock_1
AS
SELECT
DISTINCT
legacy_stock_status.product_id,
legacy_stock_status.website_id,
legacy_stock_status.stock_id,
legacy_stock_status.qty quantity,
legacy_stock_status.stock_status is_salable,
product.sku
FROM cataloginventory_stock_status legacy_stock_status
INNER JOIN catalog_product_entity product
ON legacy_stock_status.product_id = product.entity_id;
I Have been having the same issue, i have tried the above query by
deleting inventory_stock_1. then i get the following error #1932
<#1932> - Table
'magento2.cataloginventory_stock_status' doesn't exist in engine
—
Reply to this email directly, view it on GitHub
<#19542 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACG4T6SPOOFFUJBS35RSY63WOGSB7ANCNFSM4GICKMJQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
i am using Magento 2.4.5 and Xampp and originally i am getting the following error _In Mysql.php line 109: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'magento2.cataloginventory_stock_status' doesn't exist In Mysql.php line 90: SQLSTATE[42S02]: Base table or view not found: 1932 Table 'magento2.cataloginventory_stock_status' doesn't exist
|
Database backup cannot be restored within the same version of Magento in a blank database.
Magento 2.3.0
PHP 7.2.10
MySQL 5.7
I think the following part is missing in the sql backup file:
The text was updated successfully, but these errors were encountered: