Closed asim-vax closed 5 years ago
Hi @asim-vax. Thank you for your report. To help us process this issue please make sure that you provided the following information:
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:
@magento give me 2.3-develop instance
- upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@asim-vax do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
@magento give me 2.6-develop instance
Hi @irving0mar. Thank you for your request. I'm working on Magento 2.6-develop instance for you
@magento give me 2.2.6-develop instance
Hi @irving0mar. Thank you for your request.
Unfortunately, I can only deploy instances for 2.3
release line
This issue is on Magento 2.3.2
Hi @engcom-Charlie. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop
branchDetails
- Add the comment @magento give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop
branch, please, add the label Reproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
:white_check_mark: Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-19791
were created
Issue Available: @engcom-Charlie, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Further examples of this:
SELECT `sales_order`.`entity_id` FROM `sales_order` WHERE (entity_id = '105465') FOR UPDATE
and:
UPDATE `quote` SET `store_id` = ?, `created_at` = '2019-09-02 17:04:24', `converted_at` = ?, `is_active` = ?, `is_virtual` = ?, `is_multi_shipping` = ?, `items_count` = ?, `items_qty` = ?, `orig_order_id` = ?, `store_to_base_rate` = ?, `store_to_quote_rate` = ?, `base_currency_code` = ?, `store_currency_code` = ?, `quote_currency_code` = ?, `grand_total` = ?, `base_grand_total` = ?, `checkout_method` = ?, `customer_id` = ?, `customer_tax_class_id` = ?, `customer_group_id` = ?, `customer_email` = ?, `customer_prefix` = ?, `customer_firstname` = ?, `customer_middlename` = ?, `customer_lastname` = ?, `customer_suffix` = ?, `customer_dob` = ?, `customer_note` = ?, `customer_note_notify` = ?, `customer_is_guest` = ?, `remote_ip` = ?, `applied_rule_ids` = ?, `reserved_order_id` = ?, `password_hash` = ?, `coupon_code` = ?, `global_currency_code` = ?, `base_to_global_rate` = ?, `base_to_quote_rate` = ?, `customer_taxvat` = ?, `customer_gender` = ?, `subtotal` = ?, `base_subtotal` = ?, `subtotal_with_discount` = ?, `base_subtotal_with_discount` = ?, `is_changed` = ?, `trigger_recollect` = ?, `ext_shipping_info` = ?, `customer_balance_amount_used` = ?, `base_customer_bal_amount_used` = ?, `use_customer_balance` = ?, `gift_cards` = ?, `gift_cards_amount` = ?, `base_gift_cards_amount` = ?, `gift_cards_amount_used` = ?, `base_gift_cards_amount_used` = ?, `gift_message_id` = ?, `gw_id` = ?, `gw_allow_gift_receipt` = ?, `gw_add_card` = ?, `gw_base_price` = ?, `gw_price` = ?, `gw_items_base_price` = ?, `gw_items_price` = ?, `gw_card_base_price` = ?, `gw_card_price` = ?, `gw_base_tax_amount` = ?, `gw_tax_amount` = ?, `gw_items_base_tax_amount` = ?, `gw_items_tax_amount` = ?, `gw_card_base_tax_amount` = ?, `gw_card_tax_amount` = ?, `gw_base_price_incl_tax` = ?, `gw_price_incl_tax` = ?, `gw_items_base_price_incl_tax` = ?, `gw_items_price_incl_tax` = ?, `gw_card_base_price_incl_tax` = ?, `gw_card_price_incl_tax` = ?, `use_reward_points` = ?, `reward_points_balance` = ?, `base_reward_currency_amount` = ?, `reward_currency_amount` = ?, `is_persistent` = ?, `account_id` = ?, `case_id` = ?, `agent_name` = ?, `nvm_agent_id` = ?, `is_drtv` = ?, `foc_code` = ?, `foc_reason` = ?, `sf_agent_id` = ?, `call_product_sku` = ?, `is_custom_upgrade` = ?, `tcs_agreement_date` = ?, `delivery_date` = '2019-09-04 00:00:00', `marketing_opt_in` = ?, `marketing_post_opt_in` = ?, `instalments_first_date` = ? WHERE (entity_id='178265')
entity_id should not be enclosed in quotes.
"#mm19pl"
Hi @pierzakp. Thank you for working on this issue. Looks like this issue is already verified and confirmed. But if you want to validate it one more time, please, go though the following instruction:
[ ] 1. Add/Edit Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 2. Verify that the issue is reproducible on 2.3-develop
branchDetails
- Add the comment @magento give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop
branch, please, add the label Reproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 3. If the issue is not relevant or is not reproducible any more, feel free to close it.
Hi @asim-vax, @pierzakp.
Thank you for your report and collaboration!
The issue was fixed by Magento team.
The fix will be available with the upcoming 2.3.4
release.
@magento-engcom-team do you have a link to the commit or PR?
This issue was fixed by internal team and PR currently in delivery queue
It's sad that there was no label / information that core team is handling it, waste of my time.
Already merged into mainline
@pierzakp there was information about internal ticket created, but i am agree, probably for such cases should be information about progress of internal ticket
Looks like this is the merge commit (for the people interested): https://github.com/magento/magento2/commit/0a390bbf1d0f27fc3fdcbf6844d7cf7c67efbf0c
There are lots of places in magento code where string is used instead of int when querying by id-fields. You can seen them by first enabling db query log php bin/magento dev:query-log:enable
and then browse some time your magento store. After a while check db log with: grep "_id = '" var/debug/db.log
and grep "_id IN ('" var/debug/db.log
"
@pemann Is that with this commit applied or before?
@craigcarnell before. My comment was just a remark that there are similar problems all-over magento. Someone should look into this with wider perspective and try to fix them all.
@pemann my PR was fixing it in all cases have confirmed that after reviewing var/debug/db.log, for update and select statements.
Commit mentioned above is fixing it (still think that my PR was a cleaner solution) only for update statements, what about selects??
@pierzakp The issue opened for update query, if you have proved measurement that for select queries this will increase performance please add new issue
@o-iegorov: it looks like a new issue was opened for select queries some days ago: https://github.com/magento/magento2/issues/25199
When running a sales order update, the where clause entity_id is a string. It is then comparing a string to an integer and the index is not used. same issue as https://github.com/magento/magento2/issues/20969 just for a different query. eg. WHERE (entity_id='99015') query below:
should finish
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)