Skip to content

Commit 5887c76

Browse files
committed
Merge branch 'PHP-8.5'
* PHP-8.5: Use MYSQL_TYPE constants instead of FIELD_TYPE
2 parents 005d04a + dd6a320 commit 5887c76

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
@@ -713,7 +713,7 @@ static int pdo_mysql_stmt_get_col(
713713

714714
static char *type_to_name_native(int type) /* {{{ */
715715
{
716-
#define PDO_MYSQL_NATIVE_TYPE_NAME(x) case FIELD_TYPE_##x: return #x;
716+
#define PDO_MYSQL_NATIVE_TYPE_NAME(x) case MYSQL_TYPE_##x: return #x;
717717

718718
switch (type) {
719719
PDO_MYSQL_NATIVE_TYPE_NAME(STRING)
@@ -747,10 +747,11 @@ static char *type_to_name_native(int type) /* {{{ */
747747
#ifdef FIELD_TYPE_NEWDATE
748748
PDO_MYSQL_NATIVE_TYPE_NAME(NEWDATE)
749749
#endif
750-
#ifdef FIELD_TYPE_VECTOR
750+
/* The following 2 don't have BC FIELD_TYPE_* aliases. */
751+
#if MYSQL_VERSION_ID >= 90000 && !defined(MARIADB_BASE_VERSION) /* TODO: mysqlnd support (added in 8.4 via a1ab846231aeff49c0441a30ebd44463fc7825b1) */
751752
PDO_MYSQL_NATIVE_TYPE_NAME(VECTOR)
752753
#endif
753-
#ifdef FIELD_TYPE_JSON
754+
#if MYSQL_VERSION_ID >= 50708 || defined(PDO_USE_MYSQLND)
754755
PDO_MYSQL_NATIVE_TYPE_NAME(JSON)
755756
#endif
756757
PDO_MYSQL_NATIVE_TYPE_NAME(TIME)

0 commit comments

Comments
 (0)