Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBD::mysql and mariadb building #66

Closed
arto-p opened this issue Sep 19, 2018 · 5 comments
Closed

DBD::mysql and mariadb building #66

arto-p opened this issue Sep 19, 2018 · 5 comments

Comments

@arto-p
Copy link

arto-p commented Sep 19, 2018

# make all
...
dbdimp.c: In function 'mysql_dr_connect':
/usr/include/mysql/mariadb_version-i386.h:14:31: error: token ""mariadb-10.3"" is not valid in preprocessor expressions
 #define MARIADB_BASE_VERSION  "mariadb-10.3"
                               ^~~~~~~~~~~~~~
dbdimp.c:1910:56: note: in expansion of macro 'MARIADB_BASE_VERSION'
 #if (MYSQL_VERSION_ID >= 50723) && (MYSQL_VERSION_ID < MARIADB_BASE_VERSION)
                                                        ^~~~~~~~~~~~~~~~~~~~
/usr/include/mysql/mariadb_version-i386.h:14:31: error: token ""mariadb-10.3"" is not valid in preprocessor expressions
 #define MARIADB_BASE_VERSION  "mariadb-10.3"
                               ^~~~~~~~~~~~~~
dbdimp.c:1917:56: note: in expansion of macro 'MARIADB_BASE_VERSION'
 #if (MYSQL_VERSION_ID >= 50600) && (MYSQL_VERSION_ID < MARIADB_BASE_VERSION)

I think You shuld use MARIADB_VERSION_ID instad of MARIADB_BASE_VERSION there.

@arto-p
Copy link
Author

arto-p commented Sep 19, 2018

Patch:

--- dbdimp.c.orig    2018-09-19 13:13:58.262356606 +0300
+++ dbdimp.c    2018-09-19 13:17:07.646319186 +0300
@@ -1907,14 +1907,14 @@
                          (SvTRUE(*svp) ? "utf8" : "latin1"));
         }
 
-#if (MYSQL_VERSION_ID >= 50723) && (MYSQL_VERSION_ID < MARIADB_BASE_VERSION)
+#if (MYSQL_VERSION_ID >= 50723) && (MYSQL_VERSION_ID < MARIADB_VERSION_ID)
         if ((svp = hv_fetch(hv, "mysql_get_server_pubkey", 23, FALSE)) && *svp && SvTRUE(*svp)) {
           my_bool server_get_pubkey = 1;
           mysql_options(sock, MYSQL_OPT_GET_SERVER_PUBLIC_KEY, &server_get_pubkey);
         }
 #endif
 
-#if (MYSQL_VERSION_ID >= 50600) && (MYSQL_VERSION_ID < MARIADB_BASE_VERSION)
+#if (MYSQL_VERSION_ID >= 50600) && (MYSQL_VERSION_ID < MARIADB_VERSION_ID)
         if ((svp = hv_fetch(hv, "mysql_server_pubkey", 19, FALSE)) && *svp) {
           STRLEN plen;
           char *server_pubkey = SvPV(*svp, plen);

@pali
Copy link
Member

pali commented Oct 4, 2018

DBD::mysql driver has known problems with (new version of) MariaDB clients. You can look at DBD::MariaDB driver https://metacpan.org/pod/DBD::MariaDB which is properly tested with lot of new MariaDB versions https://travis-ci.org/gooddata/DBD-MariaDB

@dveeden
Copy link
Contributor

dveeden commented Jan 13, 2019

This was fixed in DBD::mysql.
Please report DBD::mysql bugs int the DBD-mysql github project.
I think this issue should be closed.

@dveeden
Copy link
Contributor

dveeden commented Nov 16, 2023

@timbunce could you close this?

@Tux
Copy link
Member

Tux commented Nov 16, 2023

I'll do it :)

@Tux Tux closed this as completed Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants