Skip to content
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

FIX : Fix SQL request for fix duplicate accounting account and remove wrong and obsolete SQL request who break the accounting account when we launch repair with multi-entities #31438

Open
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

kkhelifa-opendsi
Copy link
Contributor

Fix SQL request for fix duplicate accounting account and remove wrong and obsolete SQL request who break the accounting account when we launch repair with multi-entities

… wrong and obsolete SQL request who break the accounting account when we launch repair with multi-entities
AND aa.rowid != aad.min;
-- SELECT * from tmp_llx_accouting_account;
-- If there is record in tmp_llx_accouting_account, make a look on each line to do
UPDATE llx_facturedet AS t LEFT JOIN tmp_llx_accouting_account AS taa ON taa.rowid = t.fk_code_ventilation SET t.fk_code_ventilation = taa.min WHERE taa.rowid IS NOT NULL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this kind of syntax Update xxx left join yyy is standard sql accepted by pgsql. Did you test it in postgres ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's in /mysql/migration/repair.sql so is it not executed only for mysql ?

Copy link
Member

@eldy eldy Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid no, it is common to all databases.
Mysql is the database to use for main sql code (so contains allnpart common) and other dir for specific. Repair is currently common so found into the mysql dir.

Does this patch is not enough ?
d9d0618

@eldy eldy added the Discussion Some questions or discussions are opened and wait answers of author or other people to be processed label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Some questions or discussions are opened and wait answers of author or other people to be processed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants