Bug #26657 properties "property" column too short for multiple license key import from file
Submitted: 27 Feb 2007 0:08 Modified: 5 Mar 2007 14:28
Reporter: Sloan Childers Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S2 (Serious)
Version: OS:
Assigned to: Eric Herman CPU Architecture:Any

[27 Feb 2007 0:08] Sloan Childers
Description:
Importing multiple contract license key can overflow the properties table on insert.

I'm at schema version 27 and the results of show create table properties is as follows:

properties | CREATE TABLE `properties` (
`property` varchar(128) NOT NULL,
`value` varchar(1024) NOT NULL,
PRIMARY KEY (`property`)
ENGINE=Falcon DEFAULT CHARSET=utf8 |
-----------+----------------------------

How to repeat:
Try to import the following license key at first time startup from a file:

<?xml version="1.0"?>
<ACCOUNTS>
<ACCOUNT>
 <CONTRACT_NUMBER>2007-7031</CONTRACT_NUMBER>
 <USER_EMAIL>multiple_gold@mysql.com</USER_EMAIL>
 <STATUS>active</STATUS>
 <EXPIRATION>2008-02-07</EXPIRATION>
 <SUBSCRIPTION>MySQL Enterprise Platinum</SUBSCRIPTION>
 <LICENSES>13</LICENSES>
 
<SIGNATURE>DM0Gxjpe++EKQLOf20mnPy7XtgyHFlZuQFkpZGFLvqJZZd3J9PSDqdo/JPLA/W3ClyNicYEyoLkcSvh+hzbw6QEosUK686w5bsnz+82SDYaYegg5Z71MnGlw71jpTSc4q1QYjPS16K8GqXaHgbVx4M6xSWcmghnAgOcviXvAueU=</SIGNATURE>
</ACCOUNT>
<ACCOUNT>
 <CONTRACT_NUMBER>2007-1321</CONTRACT_NUMBER>
 <USER_EMAIL>multiple_gold@mysql.com</USER_EMAIL>
 <STATUS>active</STATUS>
 <EXPIRATION>2008-02-07</EXPIRATION>
 <SUBSCRIPTION>MySQL Enterprise Silver</SUBSCRIPTION>
 <LICENSES>42</LICENSES>
 
<SIGNATURE>BxBDeFSaQWAeZiWqEynAfhxr3zdnz38N2Ja9d3E3ImRzGij+0ZyyHzG1uk9BvOUROACHIYCR9DqkKryf7Aw27vJNRUv4McGQL3NnRjI2Euj+mRv4kMbdkxaQe4hjiMbsORmIACRUImVltYpe/3T8oLlTrAZHAvk+Y/RbYP+nrY4=</SIGNATURE>
</ACCOUNT>
</ACCOUNTS> 

This file is only 981 bytes in length but somehow I'm getting > 1024 on the actual product key insert into the properties table.

Suggested fix:
Make the properties "property" column bigger?  Say 4096 or even a text column?
[27 Feb 2007 15:43] Darren Oldag
darren oldag to review...
[27 Feb 2007 15:53] Darren Oldag
reviewed and committed by Oldag.

property value column migrated to TEXT.
[3 Mar 2007 22:25] Bill Weber
Verified value changed to text in build 1.1.0.4874.

+----------+--------------+------+-----+---------+-------+
| Field    | Type         | Null | Key | Default | Extra |
+----------+--------------+------+-----+---------+-------+
| property | varchar(128) | NO   | PRI |         |       |
| value    | text         | NO   |     |         |       |
+----------+--------------+------+-----+---------+-------+
[5 Mar 2007 14:28] Peter Lavin
Added to changelog.