From 33d8a28367c947dcca6481df9304ad203aea45b4 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 26 Apr 2019 17:02:15 +0200 Subject: 5.6.43-84.3 --- .../tokudb/mysql-test/tokudb_bugs/t/PS-4979.test | 12 ++++++++++ .../mysql-test/tokudb_bugs/t/PS-5158-master.opt | 2 ++ .../tokudb/mysql-test/tokudb_bugs/t/PS-5158.test | 27 ++++++++++++++++++++++ .../tokudb/mysql-test/tokudb_bugs/t/PS-5163.test | 11 +++++++++ 4 files changed, 52 insertions(+) create mode 100644 storage/tokudb/mysql-test/tokudb_bugs/t/PS-4979.test create mode 100644 storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158-master.opt create mode 100644 storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158.test create mode 100644 storage/tokudb/mysql-test/tokudb_bugs/t/PS-5163.test (limited to 'storage/tokudb/mysql-test/tokudb_bugs/t') diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/PS-4979.test b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-4979.test new file mode 100644 index 00000000000..1e4b5d11922 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-4979.test @@ -0,0 +1,12 @@ +--source include/have_tokudb.inc +# PS-4979 : Dropping TokuDB table with non-alphanumeric characters could lead +# to a crash +# +# `#mysql50#q.q` is an invalid table name, but the server side doesn't detect it +# and complain. Instead it passes in an empty table name to the engine. The +# engine expects a table name in the form of a relative path like +# "./databasename/tablename". InnoDB detects this in parsing the table name +# during the creation and returns an error. + +--error ER_GET_ERRNO +CREATE TABLE `#mysql50#q.q`(f1 INT KEY) ENGINE=TOKUDB; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158-master.opt b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158-master.opt new file mode 100644 index 00000000000..eb850c4bd78 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158-master.opt @@ -0,0 +1,2 @@ +--loose-tokudb_dir_per_db=ON + diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158.test b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158.test new file mode 100644 index 00000000000..1dea7757819 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158.test @@ -0,0 +1,27 @@ +# Test for PS-5163 : [PS8QA] handle_fatal_signal (sig=11) in DsMrr_impl::dsmrr_init +# and PS-4828 : Inserting data into TokuDB database with name that contains non-alphanumerical characters can lead to the ZN9ha_tokudb16bulk_insert_pollEPvf assertion +# +# The cause is a buffer overrun in LOADER_CONTEXT where the char buffer used for +# maintaining the proc info string was too small and no validation or prevention +# was being done to ensure the string stayed within the limits of the buffer. +# Normally this would have been difficult to hit, but, now with the combination +# of tokudb_dir_per_db=ON and the expansion of the database name from latin1 +# (or whatever) to the fscs encoding the space required for a max length +# db.table name could be quite larger than the buffer was originally sized. + +--source include/have_tokudb.inc + +--let $assert_text= Requires tokudb_dir_per_db=1 +--let $assert_cond= [SELECT @@tokudb_dir_per_db] = 1 +--source include/assert.inc + +CREATE DATABASE `new..............................................end`; +USE `new..............................................end`; +CREATE TABLE t1(a INT KEY,b INT)ENGINE=TokuDB; + +# +# TokuDB bulk_insert_poll would crash here +# +INSERT INTO t1 VALUES(1,11),(2,12),(3,13),(4,14),(5,15); +USE test; +DROP DATABASE `new..............................................end`; diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5163.test b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5163.test new file mode 100644 index 00000000000..5fc01bb5f0e --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_bugs/t/PS-5163.test @@ -0,0 +1,11 @@ +--source include/have_tokudb.inc + +CREATE TABLE t1(c1 INT,c2 INT,c3 CHAR(10),c4 CHAR(10),c5 CHAR(10),PRIMARY KEY(c1),INDEX(c3,c4(1),c5(1)),INDEX(c2)) ENGINE=TokuDB; +--error ER_DUP_ENTRY +INSERT INTO t1 VALUES(),(),(),(),(); + +# 8.0 asserts here down in data dictionary because ha_tokudb::ds_mrr did not +# properly call ds_mrr.init(this, table) +UPDATE t1 SET c1=1 WHERE c1=1 OR c2=1; + +DROP TABLE t1; -- cgit v1.2.1