configuration value gets truncated when over 128 char

Bug #1672263 reported by Satoshi MITANI
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
In Progress
Low
ccyu

Bug Description

currently, configuration_value column size is 128 char.
so configuration values over 128 char gets truncated.

Note that, MySQL 5.7.8 later default sql-mode takes over 128 char value like below.
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_sql-mode

-bash-4.2$ trove configuration-create limit_128_test ' { "sql_mode": "\"ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\"" } ' --datastore pxc --datastore_version pxc56

+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| created | 2017-03-10T05:35:31 |
| datastore_name | pxc |
| datastore_version_id | a83258f6-b3f8-4e8a-a009-a680ed2f0bad |
| datastore_version_name | pxc56 |
| description | None |
| id | 5c59bf82-cc7c-47de-a966-44941c2681e2 |
| instance_count | 0 |
| name | limit_128_test |
| updated | 2017-03-10T05:35:31 |
| values | {u'sql_mode': u'"ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SU'} |
+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+

-bash-4.2$ trove configuration-show 5c59bf82-cc7c-47de-a966-44941c2681e2
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| created | 2017-03-10T05:35:31 |
| datastore_name | pxc |
| datastore_version_name | pxc56 |
| description | None |
| id | 5c59bf82-cc7c-47de-a966-44941c2681e2 |
| instance_count | 0 |
| name | limit_128_test |
| updated | 2017-03-10T05:35:31 |
| values | {"sql_mode": "\"ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SU"} |
+------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+

ccyu (indicoliteplus)
Changed in trove:
assignee: nobody → ccyu (indicoliteplus)
status: New → Confirmed
Revision history for this message
ccyu (indicoliteplus) wrote :

review at: https://review.openstack.org/#/c/445768/

>>> sql_mode="ALLOW_INVALID_DATES,ANSI_QUOTES,ERROR_FOR_DIVISION_BY_ZERO,HIGH_NOT_PRECEDENCE,IGNORE_SPACE,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION,NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_UNSIGNED_SUBTRACTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY,PAD_CHAR_TO_FULL_LENGTH,PIPES_AS_CONCAT,REAL_AS_FLOAT,STRICT_ALL_TABLES,STRICT_TRANS_TABLES"
>>> len(sql_mode)
407

So I changed the Table configuration column value:
from String(128) to String(512).

Changed in trove:
status: Confirmed → In Progress
Revision history for this message
ccyu (indicoliteplus) wrote :
Amrith Kumar (amrith)
Changed in trove:
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.