Kouhei Sutou
null+****@clear*****
Mon Jul 9 11:54:30 JST 2018
Kouhei Sutou 2018-07-09 11:54:30 +0900 (Mon, 09 Jul 2018) New Revision: e4df9db336c903b023f88721f171f00024840cac https://github.com/mroonga/mroonga/commit/e4df9db336c903b023f88721f171f00024840cac Message: mysql8: use ER_DEFAULT() instead of ER() Modified files: ha_mroonga.cpp mrn_mysql_compat.h Modified: ha_mroonga.cpp (+9 -1) =================================================================== --- ha_mroonga.cpp 2018-07-09 11:44:24 +0900 (2bbcae2a) +++ ha_mroonga.cpp 2018-07-09 11:54:30 +0900 (65b1f830) @@ -51,6 +51,10 @@ # include <mysql/psi/mysql_memory.h> #endif +#ifdef MRN_HAVE_SQL_DERROR_H +# include <sql/derror.h> +#endif + #include <sys/types.h> #include <sys/stat.h> @@ -202,7 +206,11 @@ static mysql_mutex_t *mrn_LOCK_open; *(off) = thd->variables.auto_increment_offset; \ *(inc) = thd->variables.auto_increment_increment; \ } -# define MRN_GET_ERR_MSG(code) ER(code) +# if MYSQL_VERSION_ID >= 80011 && !defined(MRN_MARIADB_P) +# define MRN_GET_ERR_MSG(code) ER_DEFAULT(code) +# else +# define MRN_GET_ERR_MSG(code) ER(code) +# endif #endif #if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) Modified: mrn_mysql_compat.h (+4 -0) =================================================================== --- mrn_mysql_compat.h 2018-07-09 11:44:24 +0900 (ec0d3fa7) +++ mrn_mysql_compat.h 2018-07-09 11:54:30 +0900 (31f680e4) @@ -322,6 +322,10 @@ # define MRN_HAVE_MYSQL_PSI_MYSQL_MEMORY_H #endif +#if MYSQL_VERSION_ID >= 80011 && !defined(MRN_MARIADB_P) +# define MRN_HAVE_SQL_DERROR_H +#endif + #if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P) # define MRN_HAVE_SPATIAL #elif defined(HAVE_SPATIAL) -------------- next part -------------- HTML����������������������������... URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180709/facf89a7/attachment.htm