[SOLVED] [libhdbpp-mysql] mariadb support on Debian 9


I am trying to compile HDB++ on Debian 9.4 with the MySQL backend.
I would like to do something very similar to this tutorial, but for Debian 9 instead of Ubuntu.
For the moment, I am blocking on the compilation of libhdbpp-mysql (commit 025d765) because of the MariaDB version.

The compiler says:

src/LibHdb++MySQL.cpp: In member function ‘void HdbPPMySQL::store_array_json(std::__cxx11::string, std::vector<T>, std::vector<T>, int, std::__cxx11::string, int, int, Tango::AttributeDimension, Tango::AttributeDimension, double, double, std::__cxx11::string, enum_field_types, bool)’:
src/LibHdb++MySQL.cpp:2516:40: error: ‘MYSQL_TYPE_JSON’ was not declared in this scope
  plog_bind[plog_bind_ind].buffer_type= MYSQL_TYPE_JSON;
According to the MariadDB website, MYSQL_TYPE_JSON requires MariadDB 10.2, but Debian 9 has only MariaDB 10.1.

Of course, I may upgrade to Maria 10.3 by using an other repository, but if possible I would prefer to stay with MariaDB 10.1.

So this is my questions:

  • Is is possible to compile libhdbpp-mysql with MariaDB 10.1 ?
  • If not possible, can I use libhdbpp-mysql-legacy instead ?

best regards


Edited 2 years ago
Hi Sébastien,

The support for JSON arrays is quite recent in libhdbpp-mysql so I can suggest to use the latest release v1.10 (https://github.com/tango-controls-hdbpp/libhdbpp-mysql/releases) instead of the latest development version.

I am no MySQL HDB++ expert but this is what I would do if I were you.

Hoping this helps,
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Hi Reynald,

I had not noticed that there were release tags for libhdbpp-mysql.
With release v1.10, I can compile libhdbpp-mysql without issue on Debian 9.

Your tip was very helpful. Thank you.

Hi Sebastién, Reynald

Also, in my opinion this divergence between MySQL and MariaDB should be taken with care as the implementation of JSON in MySQL and MariaDB is quite different.

I would propose to fork MariaDB support from the point where the change was introduced, and continue developing it in paral.lel; or at least evaluate whether it has a bad impact in performance.

Keep on dancing,

Register or login to create to post a reply.