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

SUP-20245: add Price <> 0 when fetching all vendor task to avoid return unnecessary results which may exceed the php memory_limit #8935

Merged
merged 2 commits into from Nov 21, 2019

Conversation

@amiras89
Copy link
Contributor

amiras89 commented Nov 20, 2019

No description provided.

…rn unnecessary results which may exceed the php memory_limit
@amiras89 amiras89 requested review from yossipapi and MosheMaorKaltura Nov 20, 2019
@MosheMaorKaltura

This comment has been minimized.

Copy link
Contributor

MosheMaorKaltura commented Nov 20, 2019

Reviewed

…ask to avoid return unnecessary results which may exceed the php memory_limit
@amiras89

This comment has been minimized.

Copy link
Contributor Author

amiras89 commented Nov 21, 2019

Add check if($rows[0]['calculated_price'])
Because the query may return NULL:
mysql> SELECT SUM(entry_vendor_task.PRICE) as calculated_price FROM entry_vendor_task WHERE entry_vendor_task.REACH_PROFILE_ID='4061' AND (entry_vendor_ task.STATUS IN ('1','3','2') AND entry_vendor_task.STATUS<>'7') AND (entry_vendor_task.QUEUE_TIME>='2019-11-21 06:56:27' AND entry_vendor_task.QUEUE_TIME< ='2019-12-31 18:59:59') AND entry_vendor_task.PRICE<>'0' AND entry_vendor_task.PARTNER_ID='1751071';
+------------------+
| calculated_price |
+------------------+
| NULL |
+------------------+
1 row in set (0.28 sec)

@amiras89 amiras89 merged commit ef11d32 into Orion-15.11.0 Nov 21, 2019
2 checks passed
2 checks passed
Datree Smart Policy Best Practices Verification
Details
Datree insights datreeio insights events
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.