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

When using MySQL 8 or above, 'function' is considered a reserved word unless quoted #2736

Merged
merged 4 commits into from
Jun 22, 2019
Merged

When using MySQL 8 or above, 'function' is considered a reserved word unless quoted #2736

merged 4 commits into from
Jun 22, 2019

Conversation

xmacan
Copy link
Member

@xmacan xmacan commented Jun 13, 2019

Problem with new MySQL version, function is reserved word now:
https://dev.mysql.com/doc/refman/8.0/en/keywords.html

2019/05/10 16:04:17 - CMDPHP SQL Backtrace: (/plugins.php[74]:api_plugin_install(), /lib/plugins.php[626]:plugin_intropage_install(), /plugins/intropage/setup.php[22]:api_plugin_register_hook(), /lib/plugins.php[736]:db_execute_prepared())
2019/05/10 16:04:17 - CMDPHP ERROR: A DB Exec Failed!, Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'function, file, status) VALUES ('intropage', 'poller_bottom', 'intropage_poller_' at line 1

@netniV
Copy link
Member

netniV commented Jun 13, 2019

I would imagine there are other uses of the plugin_hooks table that also utilise the function keyword, have you checked for them?

Also, the CHANGELOG should be updated.

@xmacan
Copy link
Member Author

xmacan commented Jun 13, 2019

yes, I checked all php, I made few grep and it seems that problem is only on one line

@cigamit
Copy link
Member

cigamit commented Jun 22, 2019

That's for doing the testing on MySQL 8.x

@cigamit cigamit merged commit 0710d27 into Cacti:develop Jun 22, 2019
@netniV netniV changed the title fix MySQL (8.0.1) reserved word function When using MySQL 8 or above, 'function' is considered a reserved word unless quoted Jul 14, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants