[MDEV-9783] possible error with function insert() Created: 2016-03-23  Updated: 2016-04-21  Resolved: 2016-04-21

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 5.5
Fix Version/s: 5.5.48, 10.0.24, 10.1.12

Type: Bug Priority: Minor
Reporter: jose javier Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Environment:

windows 10



 Description   

with a table type:

CREATE TABLE `fcdcm001` (
	`DCOD` DOUBLE(9,0) NULL DEFAULT '0',
	`DOBS` MEDIUMTEXT NOT NULL,
	UNIQUE INDEX `DCOD` (`DCOD`)
)COLLATE='latin1_swedish_ci' ENGINE=MyISAM;

if i execute this two instructions in mariadb 5.5:

INSERT INTO FCDCM001 (dobs,dcod) values ('a',14);
update fcdcm001 set dobs=INSERT(dobs,2,10,'1234567890' ) WHERE dcod=14

result is that dcod returns 'a1234567890'

but if i use in version 10.1.12 dcod returns 'a'

¿is that an error?



 Comments   
Comment by Elena Stepanova [ 2016-04-21 ]

It was a bug, 'a' is the expected result.
The problem was fixed by the patch for MDEV-9371 – it was fixed in 5.5 tree and merged up, but 10.1 was released earlier than 5.5, so the bugfix appeared there first.

Generated at Thu Feb 08 07:37:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.