summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb_bugs/t
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2019-05-04 17:04:55 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2019-05-04 17:04:55 +0200
commit8cbb14ef5d180687f131bc44a4e8fc84083d033c (patch)
tree091f11e2d20f95656a7b12294782eb0488fd4fcc /storage/tokudb/mysql-test/tokudb_bugs/t
parent4345868382ca3525de5eb432302b6b9b957b47c1 (diff)
parentb85aa20065504bdda4bc03c2bd7eb7de38865c5d (diff)
downloadmariadb-git-8cbb14ef5d180687f131bc44a4e8fc84083d033c.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'storage/tokudb/mysql-test/tokudb_bugs/t')
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158-master.opt2
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/PS-5158.test27
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/PS-5163.test11
3 files changed, 40 insertions, 0 deletions
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..e0235e7cebd
--- /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
+
+if (`SELECT @@tokudb_dir_per_db != 1`) {
+ skip Requires tokudb_dir_per_db=1;
+}
+
+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..d370bab6517
--- /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 default 0,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;