Opened 2 years ago

Closed 7 months ago

Last modified 3 months ago

#13304 closed Bug Report - General (fixed)

FTBFS with MySQL 8.0

Reported by: ltangvald Owned by: David Hampton
Priority: minor Milestone: 31.0
Component: Plugin - MythZoneminder Version: Unspecified
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Build fails because the my_bool type has been removed in MySQL, to be replaced with either int or bool (ref: https://dev.mysql.com/doc/refman/8.0/en/c-api-data-structures.html)

To reproduce: build mythtv source with libmysqlclient-dev 8.0+

Change History (8)

comment:1 Changed 2 years ago by Gary Buhrmaster

Hopefully useful information for the MythZoneminder? wrangler....

Related to #13093 (where the use of the my_bool was added as that approach was the solution being done in other projects (now they get to change again too)).

It appears that mysql and mariadb are starting to diverge at the client API level.

comment:2 Changed 2 years ago by ltangvald

Yeah, they've been steadily diverging (generally we had more issues of this type for the transition from 5.6 to 5.7, but it varies what software is affected by each change). There's a reasonably simple way to support both by adding a precompile directive:

#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80000
typedef int reconnect_t
#else
typedef my_bool reconnect_t
#endif
reconnect_t reconnect = 1;
Last edited 2 years ago by ltangvald (previous) (diff)

comment:3 Changed 7 months ago by David Hampton

Milestone: needs_triage31.0
Owner: set to David Hampton
Status: newaccepted

comment:4 Changed 7 months ago by Lars Tangvald <lars.tangvald@…>

Resolution: fixed
Status: acceptedclosed

In e87829674/mythtv:

Fix mythzoneminder compile with MySQL 8.0.

MySQL and MariaDB are beginning to diverge at the client API level.
Add a compile time directive to user the proper type of variable for
reconnecting to a database. Fixes #13304.

Signed-off-by: David Hampton <mythtv@…>

comment:5 Changed 7 months ago by Lars Tangvald <lars.tangvald@…>

In f21b8e56b/mythtv:

Fix mythzoneminder compile with MySQL 8.0.

MySQL and MariaDB are beginning to diverge at the client API level.
Add a compile time directive to user the proper type of variable for
reconnecting to a database. Fixes #13304.

Signed-off-by: David Hampton <mythtv@…>

comment:6 Changed 7 months ago by Lars Tangvald <lars.tangvald@…>

In f21b8e56b/mythtv:

Fix mythzoneminder compile with MySQL 8.0.

MySQL and MariaDB are beginning to diverge at the client API level.
Add a compile time directive to user the proper type of variable for
reconnecting to a database. Fixes #13304.

Signed-off-by: David Hampton <mythtv@…>

comment:7 Changed 7 months ago by Gary Buhrmaster

Should this fix be backported to fixes/30 to support customers who choose to run a newer OS with MySQL 8.0 but continue with the released fixes branch?

comment:8 Changed 3 months ago by Lars Tangvald <lars.tangvald@…>

In 5a3e9d6a0/mythtv:

Fix mythzoneminder compile with MySQL 8.0.

MySQL and MariaDB are beginning to diverge at the client API level.
Add a compile time directive to user the proper type of variable for
reconnecting to a database. Fixes #13304.

Signed-off-by: David Hampton <mythtv@…>
(cherry picked from commit e87829674f941f7504bb61b8bb2309c426ef3ab6)
Signed-off-by: Stuart Auchterlonie <stuarta@…>

Note: See TracTickets for help on using tickets.