From 7fe61d9ff13312327687b5ffe26f17f7dcb43b64 Mon Sep 17 00:00:00 2001 From: Accelerator Date: Tue, 16 Jul 2024 11:35:58 +0300 Subject: [PATCH] Update to MySQL driver to 8.0 --- extensions/mysql/mysql/MyDriver.h | 5 +++++ tools/checkout-deps.sh | 12 ++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/extensions/mysql/mysql/MyDriver.h b/extensions/mysql/mysql/MyDriver.h index 86c9dfa603..03eede9f2f 100644 --- a/extensions/mysql/mysql/MyDriver.h +++ b/extensions/mysql/mysql/MyDriver.h @@ -39,8 +39,13 @@ #include #endif +#include +#if MYSQL_VERSION_ID < 80000 #include #include +#else +typedef bool my_bool; +#endif #include // On macOS, the MySQL includes define min/max. diff --git a/tools/checkout-deps.sh b/tools/checkout-deps.sh index c6877ea89d..d76b68000b 100755 --- a/tools/checkout-deps.sh +++ b/tools/checkout-deps.sh @@ -24,7 +24,7 @@ ismac=0 iswin=0 archive_ext=tar.gz -decomp="tar zxf" +decomp="tar xf" if [ `uname` = "Darwin" ]; then ismac=1 @@ -47,7 +47,7 @@ getmysql () if [ `command -v wget` ]; then wget -q $mysqlurl -O $mysqlfolder.$archive_ext elif [ `command -v curl` ]; then - curl -sS -o $mysqlfolder.$archive_ext $mysqlurl + curl -L -sS -o $mysqlfolder.$archive_ext $mysqlurl else echo "Failed to locate wget or curl. Install one of these programs to download MySQL." exit 1 @@ -69,8 +69,8 @@ elif [ $iswin -eq 1 ]; then # The folder in the zip archive does not contain the substring "-noinstall", so strip it mysqlver=${mysqlver/-noinstall} else - mysqlver=mysql-5.7.44-linux-glibc2.12-i686 - mysqlurl=https://cdn.mysql.com/archives/mysql-5.7/$mysqlver.$archive_ext + mysqlver=mysql-8.0.38-linux-glibc2.28-i686 + mysqlurl=https://dev.mysql.com/get/Downloads/MySQL-8.0/$mysqlver.$archive_ext fi if [ $download_mysql -eq 1 ]; then getmysql @@ -85,8 +85,8 @@ elif [ $iswin -eq 1 ]; then mysqlver=mysql-5.5.62-winx64 mysqlurl=https://cdn.mysql.com/archives/mysql-5.5/$mysqlver.$archive_ext else - mysqlver=mysql-5.7.44-linux-glibc2.12-i686 - mysqlurl=https://cdn.mysql.com/archives/mysql-5.7/$mysqlver.$archive_ext + mysqlver=mysql-8.0.38-linux-glibc2.28-x86_64 + mysqlurl=https://dev.mysql.com/get/Downloads/MySQL-8.0/$mysqlver.$archive_ext fi if [ $download_mysql -eq 1 ]; then getmysql