My code had a critical bug.
The logic of code is to add Equivalent Items.
I tried to add items on child tables but a bug on code added like 500 child item on each Item.
I tried to delete with SQL query all the child items, and when I do a query to see if there are items, it return 0.
BUT, when I open the site the child items are there, and not deleted.
I executed bench clear-website-cache && bench restart && bench build && bench migrate
and nothing happened.
I cleared cookies and cache on browser and the items are still there. While when I do a sql query they are deleted.
remove that code or comment it for now
in mysql delete all records in child table via and then execute commit
commit
? What command should I execute? Because I tried bench execute commit
.
no I mean in mysql after deleting everything from child table, in the mysql command line write commit and execute it.
Can you post your query and its result ?
Yup. It worked.
delete from tabCHILD DB NAME
;
Query OK, 321031 rows affected (29.41 sec)
commit;
Query OK, 0 rows affected (0.00 sec)
I checked on site for 1 item and it does not have the items. Thanks a lot!
delete from tabCHILD DB NAME;
Query OK, 321031 rows affected (29.41 sec)
You see the mysql is probably in autocommit mode. But I don’t think commit actually solved this problem something else did.
That is strange because I used the same query before and it did not work out.