Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-134015

[MinGW-w64] qtbase: SQL/MySQL: build error, mysql_real_escape_string_quote() undeclared

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.9
    • SQL Support
    • None
    • CYGWIN Bash + MinGW-w64
    • Windows

    Description

      When building latest sources of Qt with MinGW-w64, I got this error:

      qtbase/src/plugins/sqldrivers/mysql/qsql_mysql.cpp: In member function ‘virtual QSqlRecord QMYSQLDriver::record(const QString&) const’:
      qtbase/src/plugins/sqldrivers/mysql/qsql_mysql.cpp:1519:22: error: ‘mysql_real_escape_string_quote’ was not declared in this scope; did you mean ‘mysql_real_escape_string’?
       1519 |     const auto len = mysql_real_escape_string_quote(d->mysql, tableNameQuoted.data(),
            |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            |                      mysql_real_escape_string
      ninja: build stopped: subcommand failed.
      

      Here there is already an #ifdef...#else...#endif, so I did a quick hack into the source for using mysql_real_escape_string() instead, then I executed again ninja and it completed the build.
      I had installed on my sysroot:

      SQLite3-3.34.0
      mariadb-connector-c-2.3.3
      

      After uninstalling mariadb-connector-c , the error disappeared.
      See also QTBUG-133778 for additional details.

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            chehrlic Christian Ehrlicher
            carlo-bramini Carlo Bramini
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes