Bug #93603 Memory access error with alter table character change.
Submitted: 14 Dec 2018 5:07 Modified: 21 Feb 2019 2:53
Reporter: Ramesh Sivaraman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: DDL Severity:S6 (Debug Builds)
Version:8.0.13 OS:Ubuntu (16.04)
Assigned to: CPU Architecture:Any
Tags: valgrind debug

[14 Dec 2018 5:07] Ramesh Sivaraman
Description:
Memory access error with alter table character change. Please use valgrind debug build to reproduce the issue.

Attached valgrind error log

How to repeat:
Testcase

rm -Rf /dev/shm/1544698458
mkdir -p /dev/shm/1544698458/tmp

/qa/binaries/MS131218-mysql-8.0.13-linux-x86_64-val-debug/bin/mysqld --no-defaults --initialize-insecure --basedir=/qa/binaries/MS131218-mysql-8.0.13-linux-x86_64-val-debug --datadir=/dev/shm/1544698458/data

/usr/bin/valgrind.bin --suppressions=/qa/binaries/MS131218-mysql-8.0.13-linux-x86_64-val-debug/mysql-test/valgrind.supp --num-callers=40 --show-reachable=yes /qa/binaries/MS131218-mysql-8.0.13-linux-x86_64-val-debug/bin/mysqld --no-defaults --basedir=/qa/binaries/MS131218-mysql-8.0.13-linux-x86_64-val-debug --datadir=/dev/shm/1544698458/data --port=33293 --tmpdir=/dev/shm/1544698458/tmp --pid-file=/dev/shm/1544698458/pid.pid --core-file --log-error=/dev/shm/1544698458/error.log.out --socket=/dev/shm/1544698458/socket.sock &

SQL

CREATE DATABASE test;
USE test;
CREATE TABLE t1(c1 INT,c2 CHAR)PARTITION BY HASH(c1) PARTITIONS 50;
SELECT MBRTOUCHES(a.g,b.g)FROM t1 AS a JOIN t1 AS b;
alter TABLE t1 CONVERT TO CHARACTER SET latin1;
[14 Dec 2018 5:08] Ramesh Sivaraman
valgrind log

Attachment: error.log (application/octet-stream, text), 15.56 KiB.

[14 Dec 2018 8:10] MySQL Verification Team
Hello Ramesh,

Thank you for the report!

regards,
Umesh
[21 Feb 2019 2:53] Paul DuBois
Posted by developer:
 
Fixed in 8.0.16.

ALTER TABLE ... CONVERT TO CHARACTER SET could produce a
memory-access error.