Skip to content

Conversation

@Totktonada
Copy link
Contributor

Technically we should return FAILURE (not -1) from the changed function
in case of a failure. FAILURE is -1 in fact and it unlikely will be
changed, but the only formal guarantee we have is that FAILURE is a
negative value.

Cited from 1:

typedef enum {
  SUCCESS =  0,
  FAILURE = -1,		/* this MUST stay a negative number, or it may affect functions! */
} ZEND_RESULT_CODE;

No behaviour actually changed in this commit.

It is the follow up for 5647d24 ('Fix
select() by space_no and index_name'), where we initially set eyes on
this point.

Follows up #42.

Technically we should return FAILURE (not -1) from the changed function
in case of a failure. FAILURE is -1 in fact and it unlikely will be
changed, but the only formal guarantee we have is that FAILURE is a
negative value.

Cited from [1]:

 | typedef enum {
 |   SUCCESS =  0,
 |   FAILURE = -1,		/* this MUST stay a negative number, or it may affect functions! */
 | } ZEND_RESULT_CODE;

No behaviour actually changed in this commit.

It is the follow up for 5647d24 ('Fix
select() by space_no and index_name'), where we initially set eyes on
this point.

[1]: https://github.com/php/php-src/blob/4903f7c5fde11a115f659ec54a1d0ede6fd7232c/Zend/zend_types.h#L53-L56

Follows up #42.
@Totktonada Totktonada requested a review from LeonidVas July 17, 2020 13:22
@Totktonada Totktonada merged commit 7c20812 into master Jul 17, 2020
@Totktonada Totktonada deleted the Totktonada/gh-42-select-space-no-index-name-follow-up branch July 17, 2020 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants