php / php/php-src

Add support for all flags from mysql in the PDO MySql driver in the getColumnMeta function.

Open
#15,093 0 comments 0 reactions 1 assignee View on GitHub

@SakiTakamachi is already working on this.

Since Jul 24, 2024.

Extension: pdo_mysql Feature Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

The getColumnMeta function currently returns a small subset of the flags from the native mysql library as shown here: https://github.com/php/php-src/blob/6727f548b084ef063474949fb884c7770b77af29/ext/pdo_mysql/mysql_statement.c#L790-L801 Please add support for all applicable flags specified here: https://github.com/php/php-src/blob/6727f548b084ef063474949fb884c7770b77af29/ext/mysqlnd/mysqlnd_enum_n_def.h#L337-L353
These flags provide valuable information about the column returned and how to potentially process it. For instance, one might need to treat binary strings different from non-binary strings. Without the binary flag, it is impossible to know whether or not a string might require special handling without examining the values of the result set. Additionally, consider adding a native_flags attribute which returns the unmodified numeric value of the flags from the mysql library.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.