Levente Birta via Postfix-users: > Hello > > I'm building the latest 3.9 with mariadb 10.8, but when I running I get > the error: > > fatal: load_library_symbols: dlopen failure loading > /usr/lib64/postfix/postfix-mysql.so: > /usr/lib64/postfix/postfix-mysql.so: undefined symbol: > mysql_real_escape_string_quote > > As I see, mariadb have no mysql_real_escape_string_quote, only > mysql_real_escape_string. > > I think this change is the source of problem: > > 20230903 > > Cleanup: removed support for MySQL < 4.0 (released 2003), > removed the deprecated mysql_escape_string() call, added > the preferred mysql_real_escape_string_quote() call, and > added error handling for the unlikely case that the legacy > mysql_real_escape_string() returns an error. File: > global/dict_mysql.c.
Thanks for contributing this. In other code, I see people doing using a workaround that uses a different MARIADB_<mumble> macro to detect the same thing. Acccording to https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-6.html, mysql_real_escape_string_quote() was introduced in MySQL 5.7.6, released in 2015. We're eight years later, and I see no evidence of any MariaDB version that implements this function. Wietse > > I build a patch, even if I'm hardly a programmer :) > > --- dict_mysql.c.orig 2023-10-12 18:34:40.000000000 +0300 > +++ dict_mysql.c 2023-11-09 16:12:52.680166429 +0200 > @@ -210,7 +210,7 @@ > > if (dict_mysql->active_host == 0) > msg_panic("dict_mysql_quote: no active host"); > -#if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 50700 > +#if defined(MYSQL_VERSION_ID) && MYSQL_VERSION_ID >= 50700 && > !defined(MARIADB_VERSION_ID) > mysql_real_escape_string_quote(dict_mysql->active_host->db, > vstring_end(result), name, len, '\''); > #else > > > Thanks > Levi > > > _______________________________________________ > Postfix-users mailing list -- postfix-users@postfix.org > To unsubscribe send an email to postfix-users-le...@postfix.org > _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org