[ZBXNEXT-4569] "groups" (8.0.2) and "function" (8.0.1) are reserved words since MySQL 8.0 Created: 2017 Aug 02 Updated: 2024 Apr 10 Resolved: 2018 Jun 18 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | API (A), Documentation (D), Frontend (F), Installation (I), Server (S) |
Affects Version/s: | None |
Fix Version/s: | 4.0.0alpha7, 4.0 (plan) |
Type: | New Feature Request | Priority: | Minor |
Reporter: | Peter Pasztor | Assignee: | Vladislavs Sokurenko |
Resolution: | Fixed | Votes: | 0 |
Labels: | MySQL | ||
Σ Remaining Estimate: | Not Specified | Remaining Estimate: | Not Specified |
Σ Time Spent: | Not Specified | Time Spent: | Not Specified |
Σ Original Estimate: | Not Specified | Original Estimate: | Not Specified |
Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
Sub-Tasks: |
|
||||||||||||||||||||||||||||||||||||||||||||||||
Team: | |||||||||||||||||||||||||||||||||||||||||||||||||
Sprint: | Sprint 14, Sprint 15, Sprint 16, Sprint 32, Sprint 33, Sprint 34, Sprint 35, Sprint 36 | ||||||||||||||||||||||||||||||||||||||||||||||||
Story Points: | 2 |
Description |
Trying to install Zabbix 3.2.6, using MySQL 8.0.2 I got this message (among many similar ones): ... 26:20170801:200803.540 completed 86% of database upgrade 26:20170801:200804.646 completed 87% of database upgrade 26:20170801:200805.131 completed 88% of database upgrade 26:20170801:200805.935 [Z3005] query failed: [1064] 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 'groups (groupid)' at line 1 [alter table corr_condition_group add constraint c_corr_condition_group_2 foreign key (groupid) references groups (groupid)] 26:20170801:200805.936 database upgrade failed I checked, and as per the official MySQL documentation ( https://dev.mysql.com/doc/refman/8.0/en/keywords.html ), "groups" is added as a reserved word since version 8.0.2. Also, as the schema.sql is properly backticked - there is a chance this requires a considerable refactoring effort to fix... |
Comments |
Comment by Peter Pasztor [ 2017 Aug 02 ] |
|
Comment by Vladislavs Sokurenko [ 2017 Aug 16 ] |
I get following error 16061:20170816:123626.324 [Z3005] query failed: [1064] 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 'groups (groupid) on delete cascade' at line 1 [alter table widget_field add constraint c_widget_field_2 foreign key (value_groupid) references groups (groupid) on delete cascade] 16061:20170816:123626.324 database upgrade failed |
Comment by Rostislav Palivoda [ 2017 Sep 11 ] |
MySQL 8.0.2 not released yet. Proposed to postpone the issue until MySQL 8 official release. |
Comment by Mikhail Grigorev [ 2018 Apr 23 ] |
Hi MySQL 8.0.11 is released in 19.04.2018 When will Zabbix developers be able to add support for MySQL 8.0? Can I expect this in the next release? |
Comment by Mikhail Grigorev [ 2018 Apr 23 ] |
table groups to grp ? or table groups to groups_users ? |
Comment by Tomasz Kłoczko [ 2018 May 02 ] |
Can someone with MariaDB devel env test patch attached in Second thing: if current zabbix is not ready to be used with MySQL 8.0.x server maybe it would be good to add a check during db connection initialization and if 8.0.x server found just print error message and exit with error message? |
Comment by Vladislavs Sokurenko [ 2018 May 02 ] |
Hello kloczek if you are interested you can have a look at development branch: my_bool is used as per MySQL documentation: If we are to use _Bool then following warnings appears
main.c: In function ‘main’:
main.c:3:2: warning: ISO C90 does not support boolean types [-Wpedantic]
|
Comment by Vladislavs Sokurenko [ 2018 May 28 ] |
Implemented in:
|
Comment by richlv [ 2018 Jun 15 ] |
(1) Looks like these changes have not made it into https://www.zabbix.com/documentation/4.0/manual/installation/upgrade_notes_400 . martins-v RESOLVED in the upgrade notes for 4.0. sasha In this section, changes in the database should be mentioned. The 'groups' table has been renamed to 'hstgrp', the 'function' field in the 'functions' table - to 'name' REOPENED martins-v Thanks, updated the upgrade note entry. RESOLVED sasha It seems we use double quotes instead of single quotes. Or am I wrong? martins-v There isn't really a convention about it, because it is not that often we have to document database changes in public documentation. I try to use single quotes as much as possible in dokuwiki, because they are not smartly converted by dokuwiki and I don't have to escape the smart conversion. To me single quotes also seem more "technical" than double quotes. sasha Thanks for explanation! CLOSED |