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.


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

Reply via email to