Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4148

Cannot build MySQL ODBC connector with MariaDB (macro "longlong2str" requires 4 arguments, but only 3 given)

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.2.14, 5.3.12
    • None
    • None
    • None

    Description

      When I'm trying to build MySQL ODBC connector with MariaDB 5.2 or 5.3, I'm getting the following error:

      [ 23%] Building C object driver/CMakeFiles/myodbc5w.dir/execute.c.o
      In file included from /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/driver.h:497:0,
                       from /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/execute.c:30:
      /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/myutil.h:340:1: warning: parameter names (without types) in function declaration [enabled by default]
      /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/execute.c: In function 'convert_c_type2str':
      /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/execute.c:540:61: error: macro "longlong2str" requires 4 arguments, but only 3 given
      /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/execute.c:540:18: error: 'longlong2str' undeclared (first use in this function)
      /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/execute.c:540:18: note: each undeclared identifier is reported only once for each function it appears in
      /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/execute.c:544:61: error: macro "longlong2str" requires 4 arguments, but only 3 given
      /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/execute.c: In function 'insert_param':
      /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/execute.c:776:30: warning: passing argument 5 of 'convert_c_type2str' from incompatible pointer type [enabled by default]
      /home/elenst/Downloads/mysql-connector-odbc-5.2.3-src/driver/execute.c:479:11: note: expected 'int *' but argument is of type 'long int *'
      make[2]: *** [driver/CMakeFiles/myodbc5w.dir/execute.c.o] Error 1
      make[1]: *** [driver/CMakeFiles/myodbc5w.dir/all] Error 2
      make: *** [all] Error 2

      It works all right with MariaDB 5.1 and 5.5.
      Indeed, the macro has 4 arguments in 5.2/5.3 and 3 arguments in 5.1/5.5:

      ~/maria-5.3:
      m_string.h:#define longlong2str(A,B,C,D) int2str((A),(B),(C),(D))
       
      ~/maria-5.1:
      m_string.h:#define longlong2str(A,B,C) int2str((A),(B),(C),1)
       
      ~/maria-5.5:
      m_string.h:#define longlong2str(A,B,C) ll2str((A),(B),(C),1)

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.