Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.0.32, 10.1.31, 10.2.13, 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL)
-
None
Description
Customer trying to do the following:
INSERT INTO `t1` VALUES (1,'',NULL,38391,'2017-06-24 07:35:28');
|
update t1 set directory = AES_ENCRYPT(CONVERT('test stringrererejrjerjehrjekhrjkehrjkehrkjehrjkerhkjehrjekrhkjehrkjerhjkehrkjehrkjehrjkehrjkehrjkehrjkerjkehrjkehrjkehrjke rekjhrejrejhrjehgrehjgrhjerjhegrjherejhgrjhegrjehgrjhegrejhrgjehgrjhegrjhegrjhergjhegrjhegrhjegrjerhthkjjkdhjkgdfjkgjkdgdjkfjkhgjkfdhjgjkfdghkjdfghkjfdghfjkdghkdjfghdkjfghfjkdghfkjdghkjfdghfkjdghfkdjghfkjdghfdjkghjkdfhgdfjkghfjkdghfjkdghfjdkghfjkdghkfjdghfkjdghfkjdghkjdfghfjdkghjkfdghkjdfhgjkdfhgjkfdhgkjfdghkfjdhgkjfdgdjkejktjherjthkjrethkjrethjkerthjkerhtjkerhtkjerhtjkerhtjkerhtjkrehtkjerhtkjrehtjkrehtkjrehtkjerhtkjerhtjkrehtkjrehtjkrehtkjrethjkrethkjrehtkjethjkerhtjkrehtjkretkjerhtkjrehtjkerhtjkrehtjrehtkjrekjtrfgdsfgdhjsghjgfdhjsfhjdfgdhjshjdshjfghjdsfgjhsfgjhsdfgjhdsfgjdhsfgsjhfgjhsdfgsdjhfgjdhsfdjshfgdsjhfgjsdhfdjshfgdjhsfgdjshfgjdhsfgjhsdfgjhsdgfjhsdgfjhdsgfjhsgfjhsdgfjhdsgfhjsdehkjthrkjethjkre' USING latin1), '95F5A1F52A554'), last_update= NOW();
|
Table definition:
Create Table: CREATE TABLE `t1` (
|
`id` int(11) NOT NULL,
|
`session_id` varchar(255) DEFAULT NULL,
|
`directory` mediumtext,
|
`checksum` int(10) DEFAULT NULL,
|
`last_update` datetime DEFAULT NULL,
|
PRIMARY KEY (`id`),
|
KEY `lastupdate` (`last_update`)
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
The above update saves corrupted data.
- On 10.0 it saves NULL
- On 10.1 and 10.2 it saves an encrypted version of the empty string
- This only happens when UPDATING; running SELECT AES_ENCRYPT.(CONVERT(...)) works fine!
- It appears to work fine up to some length of the string to be converted (issue does not happen if the string fed to CONVERT() is less than 700 chars or so)