Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL 8.0.1 removes support for the my_bool datatype #995

Closed
vilhelmgray opened this issue Aug 26, 2019 · 2 comments · Fixed by #1038
Closed

MySQL 8.0.1 removes support for the my_bool datatype #995

vilhelmgray opened this issue Aug 26, 2019 · 2 comments · Fixed by #1038

Comments

@vilhelmgray
Copy link

This issue only affects MySQL; MariaDB will continue to support my_bool.

The following build error occurs when attempting to compile with MySQL 8.0.1:

motion.c: In function ‘motion_init’:
motion.c:1146:13: error: unknown type name ‘my_bool’; did you mean ‘bool’?
 1146 |             my_bool my_true = TRUE;
      |             ^~~~~~~
      |             bool
make: *** [Makefile:105: motion.o] Error 1
make: *** Waiting for unfinished jobs....

Noted in 8.0.1 changelog (https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html#mysqld-8-0-1-compiling):

The mysql.h header file now requires a C++ or C99 compiler to
compile.

The my_bool type is no longer used in MySQL source code. Any third-party code that used this type to represent C boolean variables should use the bool or int C type instead.

vilhelmgray added a commit to vilhelmgray/motion that referenced this issue Aug 26, 2019
Noted in 8.0.1 changelog (https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-1.html#mysqld-8-0-1-compiling):

The MySQL mysql.h header file now requires a C++ or C99 compiler to
compile.

The my_bool type is no longer used in MySQL source code. Any third-party
code that used this type to represent C boolean variables should use the
bool or int C type instead.

MariaDB however still uses the my_bool type, so conditional code is
added to support it. In addition, MariaDB has deprecated the
mysql_options function, so the mysql_optionsv function is used instead.

Fixes: Motion-Project#995
@tosiara
Copy link
Member

tosiara commented Sep 11, 2019

Which OS is delivering this version of MySQL?

@vilhelmgray
Copy link
Author

This was reported to me for the Motion Gentoo package: https://bugs.gentoo.org/692682
Here's the main MySQL bug page for Gentoo: https://bugs.gentoo.org/692570

I haven't tested other distros yet, but perhaps someone can verify for these other distros. The latest Ubuntu may be affected by this if it's on MySQL version 8.0.16: https://packages.ubuntu.com/eoan/mysql-server

Regardless, this change is coming from the upstream MySQL project, so a Motion user will encounter this issue if they try to use the vanilla MySQL tarball from the MySQL site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants