diff -pruN 0.3.1+dfsg-9/debian/changelog 0.3.1+dfsg-9ubuntu1/debian/changelog
--- 0.3.1+dfsg-9/debian/changelog	2021-10-19 14:21:37.000000000 +0000
+++ 0.3.1+dfsg-9ubuntu1/debian/changelog	2022-05-06 14:35:04.000000000 +0000
@@ -1,3 +1,12 @@
+cppdb (0.3.1+dfsg-9ubuntu1) kinetic; urgency=medium
+
+  * Merge with Debian unstable. Remaining changes:
+    - Fix build against MySQL 8.0
+    - d/p/mysql8_my_bool.patch: Reintroduce my_bool to fix build with MySQL 8.
+      (LP #1863026)
+
+ -- Andreas Hasenack <andreas@canonical.com>  Fri, 06 May 2022 11:35:04 -0300
+
 cppdb (0.3.1+dfsg-9) unstable; urgency=medium
 
   [ Ondřej Nový ]
@@ -21,6 +30,19 @@ cppdb (0.3.1+dfsg-9) unstable; urgency=m
 
  -- Tobias Frost <tobi@debian.org>  Tue, 19 Oct 2021 16:21:37 +0200
 
+cppdb (0.3.1+dfsg-8ubuntu2) focal; urgency=medium
+
+  * d/p/mysql8_my_bool.patch: Reintroduce my_bool to fix build with MySQL 8.
+    (LP: #1863026)
+
+ -- Andreas Hasenack <andreas@canonical.com>  Wed, 12 Feb 2020 20:06:29 -0300
+
+cppdb (0.3.1+dfsg-8ubuntu1) eoan; urgency=medium
+
+  * Fix build against MySQL 8.0
+
+ -- Robie Basak <robie.basak@ubuntu.com>  Fri, 12 Jul 2019 13:55:32 +0000
+
 cppdb (0.3.1+dfsg-8) unstable; urgency=medium
 
   * Drop the symbols files again. It is just not sustainable.
diff -pruN 0.3.1+dfsg-9/debian/control 0.3.1+dfsg-9ubuntu1/debian/control
--- 0.3.1+dfsg-9/debian/control	2021-10-19 14:07:26.000000000 +0000
+++ 0.3.1+dfsg-9ubuntu1/debian/control	2022-05-06 14:35:04.000000000 +0000
@@ -1,6 +1,7 @@
 Source: cppdb
 Priority: optional
-Maintainer: Tobias Frost <tobi@debian.org>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Tobias Frost <tobi@debian.org>
 Build-Depends: cmake,
                debhelper-compat (= 13),
                default-libmysqlclient-dev,
diff -pruN 0.3.1+dfsg-9/debian/patches/mysql-8.0 0.3.1+dfsg-9ubuntu1/debian/patches/mysql-8.0
--- 0.3.1+dfsg-9/debian/patches/mysql-8.0	1970-01-01 00:00:00.000000000 +0000
+++ 0.3.1+dfsg-9ubuntu1/debian/patches/mysql-8.0	2022-05-06 14:35:04.000000000 +0000
@@ -0,0 +1,64 @@
+Description: Fix build to accomodate options removed in MySQL 8.0
+ Preprocessor directives are used to maintain functionality when built against
+ MariaDB or older versions of MySQL
+ .
+ Specific upstream removal notes are available at:
+ https://dev.mysql.com/doc/refman/8.0/en/mysql-nutshell.html
+ .
+ Note: it isn't clear what cppdb's behaviour should be in the face of options
+ that are no longer supported by MySQL. This patch just ignores them, which
+ seems to be the case for any other option that is currently not recognised.
+ However, upstream notes say that use of MYSQL_OPT_SSL_VERIFY_SERVER_CERT
+ should be replaced with "MYSQL_OPT_SSL_MODE with an option value of
+ SSL_MODE_REQUIRED or SSL_MODE_VERIFY_IDENTITY instead", and this isn't done
+ here. This should be reviewed to determine if it is necessary for cppdb to
+ translate the option, or if it is expected that callers will now use the
+ correct option. It may be appropriate to assert or somehow fail if
+ "opt_ssl_verify_server_cert" is set, and the same consideration may be
+ necessary for the other removed options.
+Author: Robie Basak <robie.basak@canonical.com>
+Origin: vendor
+Forwarded: https://sourceforge.net/p/cppcms/patches/26/
+Last-Update: 2022-05-12
+
+--- a/drivers/mysql_backend.cpp
++++ b/drivers/mysql_backend.cpp
+@@ -1198,11 +1198,13 @@
+ 				mysql_set_option(MYSQL_OPT_CONNECT_TIMEOUT, &connect_timeout);
+ 			}
+ 		}
++#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
+ 		if(ci.has("opt_guess_connection")) {
+ 			if(ci.get("opt_guess_connection", 1)) {
+ 				mysql_set_option(MYSQL_OPT_GUESS_CONNECTION, NULL);
+ 			}
+ 		}
++#endif
+ 		if(ci.has("opt_local_infile")) {
+ 			if(unsigned local_infile = ci.get("opt_local_infile", 0)) {
+ 				mysql_set_option(MYSQL_OPT_CONNECT_TIMEOUT, &local_infile);
+@@ -1235,6 +1237,7 @@
+ 			mysql_set_option(MYSQL_PLUGIN_DIR, plugin_dir.c_str());
+ 		}
+ #endif
++#if defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000
+ 		std::string set_client_ip = ci.get("set_client_ip", "");
+ 		if(!set_client_ip.empty()) {
+ 			mysql_set_option(MYSQL_SET_CLIENT_IP, set_client_ip.c_str());
+@@ -1255,6 +1258,7 @@
+ 				mysql_set_option(MYSQL_OPT_USE_REMOTE_CONNECTION, NULL);
+ 			}
+ 		}
++#endif
+ 		if(ci.has("opt_write_timeout")) {
+ 			if(unsigned write_timeout = ci.get("opt_write_timeout", 0)) {
+ 				mysql_set_option(MYSQL_OPT_WRITE_TIMEOUT, &write_timeout);
+@@ -1274,7 +1278,7 @@
+ 				mysql_set_option(MYSQL_REPORT_DATA_TRUNCATION, &value);
+ 			}
+ 		}
+-#if MYSQL_VERSION_ID >= 40101
++#if MYSQL_VERSION_ID >= 40101 && (defined(MARIADB_BASE_VERSION) || MYSQL_VERSION_ID < 80000)
+ 		if(ci.has("secure_auth")) {
+ 			if(unsigned secure = ci.get("secure_auth", 1)) {
+ 				my_bool value = secure;
diff -pruN 0.3.1+dfsg-9/debian/patches/mysql8_my_bool.patch 0.3.1+dfsg-9ubuntu1/debian/patches/mysql8_my_bool.patch
--- 0.3.1+dfsg-9/debian/patches/mysql8_my_bool.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.3.1+dfsg-9ubuntu1/debian/patches/mysql8_my_bool.patch	2022-05-06 14:35:04.000000000 +0000
@@ -0,0 +1,19 @@
+Description: Reintroduce my_bool to fix build with MySQL 8
+Author: Andreas Hasenack <andreas@canonical.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1863026
+Forwarded: https://sourceforge.net/p/cppcms/patches/26/
+Last-Update: 2022-05-12
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+diff --git a/drivers/mysql_backend.cpp b/drivers/mysql_backend.cpp
+index e25430d..f409bd1 100644
+--- a/drivers/mysql_backend.cpp
++++ b/drivers/mysql_backend.cpp
+@@ -20,6 +20,7 @@
+ # define CPPDB_SOURCE
+ #endif
+ #include <mysql.h>
++typedef bool my_bool;
+ 
+ #include <cppdb/backend.h>
+ #include <cppdb/errors.h>
diff -pruN 0.3.1+dfsg-9/debian/patches/series 0.3.1+dfsg-9ubuntu1/debian/patches/series
--- 0.3.1+dfsg-9/debian/patches/series	2018-04-05 19:10:53.000000000 +0000
+++ 0.3.1+dfsg-9ubuntu1/debian/patches/series	2022-05-06 14:35:04.000000000 +0000
@@ -1 +1,3 @@
 01_sqlite_backend_spellingerror.patch
+mysql-8.0
+mysql8_my_bool.patch
