Skip to content

Fixes #18357 - SQL error when table prefix used. #18412

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

Merged
merged 1 commit into from
Oct 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private function getStoresForAgreements()

if (!empty($agreementId)) {
$select = $this->getConnection()->select()->from(
['agreement_store' => 'checkout_agreement_store']
['agreement_store' => $this->getResource()->getTable('checkout_agreement_store')]
Copy link
Contributor

@okorshenko okorshenko Oct 6, 2018

Choose a reason for hiding this comment

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

thank you for your fix. The solution looks reasonable. The reason why this issue appeared is that there is not an integration test for this case. We are running integration tests with and w/o table prefixes to make sure that such issues won't appear.

Please cover this case with the integration test (and earn additional contribution points :) ) to avoid a regression issue for your solution.

Also, could you please fix broken static tests.
Thank you

Copy link
Contributor

Choose a reason for hiding this comment

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

@okobchenko is getResource() really neccessary?

)->where(
'agreement_store.agreement_id IN (?)',
$agreementId
Expand Down