[ZBX-5730] "mediumtext" columns instead of "text" sometimes appear in zabbix DB schema after v1.6 Created: 2012 Oct 24 Updated: 2017 May 30 Resolved: 2015 Mar 30 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Documentation (D) |
Affects Version/s: | 1.8.15, 2.0.3, 2.1.0 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Minor |
Reporter: | Oleksii Zagorskyi | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | consistency, db, dbintegrity, dbpatches, mysql, upgrade, utf8 | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Goal of creation this issue report first of all is a some place where to describe everything. Probably we could add some notes to documentation but we will discuss this in comments. In v1.6 DB schema has 5 columns with "text" type: node_cksum.cksum history_log.value history_text.value proxy_history.value items.params Just a note - v1.8 schema has the same 5 "text" columns, v2.0 has much more "text" columns. If perform conversion to UFT8 (designed in upgrade 1.6->1.8) they all will get new "mediumtext" type. After applying 1.6->1.8 SQL patch there will remain only 4 such columns: history_log.value history_text.value proxy_history.value items.params Then after applying 1.8->2.0 SQL patch there will remain only 3 such columns: history_log.value history_text.value items.params What a problem is here? See: Sometimes people need to check DB schema to make sure that all is correct. Some real scenarios:
How to fix. ALTER TABLE node_cksum MODIFY value cksum NOT NULL; ALTER TABLE history_log MODIFY value text NOT NULL; ALTER TABLE history_text MODIFY value text NOT NULL; ALTER TABLE proxy_history MODIFY value text NOT NULL; ALTER TABLE items MODIFY params text NOT NULL; for scenario #2, #3: ALTER TABLE <tablename_here> CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; and then check and change "mediumtext" to "text" as shown above for ALL appeared "mediumtext" columns. |
Comments |
Comment by Alexander Vladishev [ 2015 Mar 30 ] |
I close the issue. In documentation shouldn't be described custom manipulations with a database and related problems. |
Comment by Oleksii Zagorskyi [ 2015 Mar 30 ] |
We could check that and fix if required by upgrade patches. |
Comment by richlv [ 2015 Mar 30 ] |
just to clarify, this could happen if a user would follow zabbix documentation, no custom modifications needed. after some discussion it has been decided that this is an edge case and there's probably no need to handle it, but this issue should pop up in search results, which is good if somebody actually steps on this zalex_ua 1st sentence sounds a bit incorrectly (can have 2 meanings). |