Skip to content

ext/mysqlnd: Use iterated struct and remove dulicate SET_AFFECTED_ROWS#21713

Merged
kamil-tekiela merged 2 commits intophp:masterfrom
kamil-tekiela:mysqlnd_result-fixes
May 5, 2026
Merged

ext/mysqlnd: Use iterated struct and remove dulicate SET_AFFECTED_ROWS#21713
kamil-tekiela merged 2 commits intophp:masterfrom
kamil-tekiela:mysqlnd_result-fixes

Conversation

@kamil-tekiela
Copy link
Copy Markdown
Member

No description provided.

@kamil-tekiela kamil-tekiela changed the title Use iterated struct and remove dulicate SET_AFFECTED_ROWS ext/mysqlnd: Use iterated struct and remove dulicate SET_AFFECTED_ROWS Apr 10, 2026
Comment thread ext/mysqlnd/mysqlnd_result.c Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Very outdated and inaccurate comment

COPY_CLIENT_ERROR(&set->error_info, row_packet.error_info);
} else {
/* libmysql's documentation says it should be so for SELECT statements */
UPSERT_STATUS_SET_AFFECTED_ROWS(conn->upsert_status, set->row_count);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Huh? I don't see how this is set elsewhere

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

After each time this method is called, the caller sets it.

Copy link
Copy Markdown
Member

@arnaud-lb arnaud-lb left a comment

Choose a reason for hiding this comment

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

Looks correct to me

@kamil-tekiela kamil-tekiela merged commit e5fa4ec into php:master May 5, 2026
19 checks passed
bwoebi added a commit to bwoebi/php-src that referenced this pull request May 6, 2026
* 'master' of github.com:php/php-src: (156 commits)
  PHP-8.2 is now for PHP 8.2.32-dev
  [skip ci] Add NEWS entries for 8.2.31 security issues
  Fix mbstring test with oniguruma deprecation
  GHSA-74r9-qxhc-fx53: [mbstring] Fix out-of-bounds access in mbfl_name2encoding_ex()
  GHSA-m8rr-4c36-8gq4: Consistently pass unsigned char to ctype.h functions
  GHSA-96wq-48vp-hh57: [metaphone] Fix signed integer overflow of char array offset
  GHSA-w476-322c-wpvm: [pdo_firebird] Fix SQL injection via NUL bytes in quoted strings
  GHSA-wm6j-2649-pv75: [mbstring] Fix null pointer dereference in php_mb_check_encoding() via mb_ereg_search_init()
  GHSA-7qg2-v9fj-4mwv: [fpm] XSS within status endpoint
  GHSA-hmxp-6pc4-f3vv: [soap] Fix broken Apache map value NULL check
  GHSA-m33r-qmcv-p97q: [soap] Fix use-after-free after header parsing failure with SOAP_PERSISTENCE_SESSION
  GHSA-85c2-q967-79q5: [soap] Fix stale SOAP_GLOBAL(ref_map) pointer with Apache Map
  Fix bad merge
  Fix compiler warning with glibc 2.43 support of C23 const-preserving standard library macros: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  Fix compiler warning with GCC 16: variable 'offset' set but not used [-Werror=unused-but-set-variable=]
  Fix compiler warning with glibc 2.43 support of C23 const-preserving standard library macros: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  ext/mysqlnd: Use iterated struct and remove dulicate SET_AFFECTED_ROWS (php#21713)
  ext/intl: Use ICU U16_APPEND_UNSAFE macro for UTF-16 surrogate pair encoding (php#21954)
  Fix incorrect trace stop type
  [ci skip] fix NEWS last entry
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants