default deployment ends up with invalid value of query-cache-size

Bug #1296736 reported by Pierre Amadio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql (Juju Charms Collection)
Fix Released
Undecided
Jorge Niedbalski

Bug Description

Deploy mysql with default value.

From the charm config.yaml:

   query-cache-size:
        default: -1
        type: int
        description: Override the computed version from dataset-size. Still works if query-cache-type is "OFF" since sessions can override the cache type setting on their own.

The resulting /etc/mysql/my.cnf contains:
query_cache_size = -1

According to http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_query_cache_size
query_cache_size should be a positive integer ranging from 0 to 4294967295

The charm should not write a negative digit there.

Tags: charm

Related branches

Changed in mysql (Juju Charms Collection):
status: New → In Progress
assignee: nobody → Jorge Niedbalski (niedbalski)
tags: added: charm
Revision history for this message
Jorge Niedbalski (niedbalski) wrote :

I proposed a merge request for the charm. If you pass a value <= 0 and your query_cache_type is specified as ( ON, DEMAND, ) then the query_cache_size will be calculated according to the dataset type otherwise the value '0' will be saved on the my.cnf configuration.

According to the official documentation ( http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_query_cache_size ) the associated configuration value must be >= 0.

Tested on precise.

Changed in mysql (Juju Charms Collection):
status: In Progress → Fix Released
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.