Skip to content

Commit ef32a3b

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Use MYSQL_TYPE constants instead of FIELD_TYPE
2 parents 2a0931d + c7fc819 commit ef32a3b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ext/pdo_mysql/mysql_statement.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ static int pdo_mysql_stmt_get_col(
715715

716716
static char *type_to_name_native(int type) /* {{{ */
717717
{
718-
#define PDO_MYSQL_NATIVE_TYPE_NAME(x) case FIELD_TYPE_##x: return #x;
718+
#define PDO_MYSQL_NATIVE_TYPE_NAME(x) case MYSQL_TYPE_##x: return #x;
719719

720720
switch (type) {
721721
PDO_MYSQL_NATIVE_TYPE_NAME(STRING)
@@ -749,10 +749,11 @@ static char *type_to_name_native(int type) /* {{{ */
749749
#ifdef FIELD_TYPE_NEWDATE
750750
PDO_MYSQL_NATIVE_TYPE_NAME(NEWDATE)
751751
#endif
752-
#ifdef FIELD_TYPE_VECTOR
752+
/* The following 2 don't have BC FIELD_TYPE_* aliases. */
753+
#if MYSQL_VERSION_ID >= 90000 && !defined(MARIADB_BASE_VERSION) /* TODO: mysqlnd support (added in 8.4 via a1ab846231aeff49c0441a30ebd44463fc7825b1) */
753754
PDO_MYSQL_NATIVE_TYPE_NAME(VECTOR)
754755
#endif
755-
#ifdef FIELD_TYPE_JSON
756+
#if MYSQL_VERSION_ID >= 50708 || defined(PDO_USE_MYSQLND)
756757
PDO_MYSQL_NATIVE_TYPE_NAME(JSON)
757758
#endif
758759
PDO_MYSQL_NATIVE_TYPE_NAME(TIME)

0 commit comments

Comments
 (0)