FTBFS with MySQL 8.0

Bug #1795314 reported by Lars Tangvald
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
isc-kea (Ubuntu)
Fix Released
Undecided
Andreas Hasenack

Bug Description

MySQL 8.0 removes the my_bool symbol, and it should simply be replaced with int or bool (this is also backwards-compatible with older versions of MySQL)

Related branches

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This was fixed upstream, but the fix clashes with Ubuntu's reintroduction of my_bool as a bool.

Ubuntu has:
typedef bool my_bool;

When isc-kea finds my_bool, it does this:
#define HAVE_MYSQL_MY_BOOL
typedef my_bool my_bools;
const my_bool MLM_FALSE = 0;
const my_bool MLM_TRUE = 1;

So now we have my_bools as a bool.

The code later does this (one example, there other places):
    static void setErrorIndicators(std::vector<MYSQL_BIND>& bind,
                                   std::vector<my_bools>& error) {
        for (size_t i = 0; i < error.size(); ++i) {
            error[i] = MLM_FALSE;
#ifdef HAVE_MYSQL_MY_BOOL
            bind[i].error = reinterpret_cast<char*>(&error[i]);
#else
            bind[i].error = reinterpret_cast<bool*>(&error[i]);
#endif

Since HAVE_MYSQL_MY_BOOL was defined (because of Ubuntu's workaround), this is executed:

    bind[i].error = reinterpret_cast<char*>(&error[i]);

And it fails because MYSQL_BIND.error is, in mysql 8, a bool, not a char.

Changed in isc-kea (Ubuntu):
status: New → In Progress
assignee: nobody → Andreas Hasenack (ahasenack)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package isc-kea - 1.6.1-0ubuntu1

---------------
isc-kea (1.6.1-0ubuntu1) focal; urgency=medium

  * New upstream release: 1.6.1 (LP: #1809262, LP: #1858347)
  * Dropped patches:
    - d/p/0001-fix_typo: applied upstream
    - d/p/0004-Use-runstatedir-for-pid-file-location.patch: fixed
      upstream in another way
    - d/p/mysql-8.0: fixed upstream
  * d/p/0003-kea_admin_fix: refresh to remove fuzz
  * d/control: add build-deps for python3-sphinx and
    python3-sphinx-rtd-theme ("sphinx_rtd_theme is no longer a hard
    dependency since version 1.4.0.")
  * d/control: add python3-kea-connector dependency to kea-ctrl-agent,
    as that is not calculated automatically by dh_python.
  * d/p/mysql8-mybool-ubuntu.patch: drop the my_bool configure check
    to have this build again with Ubuntu's MySQL8. (LP: #1795314)
  * d/rules: use rm -f in the clean step so it doesn't fail if the
    file to be removed cannot be found.
  * d/kea-common.install: hooks directory changed to kea/hooks
  * d/rules: enable generate messages, it could be needed by third
    parties.
  * d/rules: enable perfdhcp
  * d/rules: localstatedir should be /var
  * d/python3-kea-connector.install, d/rules: fix python module path
  * d/kea-dev.install: dns++.pc was dropped by upstream in
    commit 93cd62c99f69cc379c08cd06791db522c1fb0aca
  * d/kea-doc.install: fix doc path
  * d/not-installed: add kea-netconf.8 and CONTRIBUTING.md (the latter
    is included via d/docs). We are not building netconf as it requires
    Sysrepo which Debian and Ubuntu do not have.
  * d/docs: add CONTRIBUTING.md
  * Logging path fixes:
    - d/kea-ctrl-agent.service, d/kea-dhcp-ddns-server.service,
      d/kea-dhcp4-server.service, d/kea-dhcp6-server.service: drop
      the env var override for logging target and rely on the
      configuration file setting instead, as this can create confusion.
    - d/p/0006-fix-logger-path.patch: fix logger path
  * d/p/0007-keyctrl-colored-ddns-status.patch: typo that was preventing
    the ddns status text from being colored
  * d/p/0008-change-default-ca-port-to-match.patch: change the
    control agent's default port to 8000 to match the client
    defaults.
  * d/rules, d/kea-common.install: add back keactrl.8 manpage

 -- Andreas Hasenack <email address hidden> Thu, 13 Feb 2020 09:31:42 -0300

Changed in isc-kea (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.